blob: da983138ef991a8e80f0e70017e365ec62f9f639 [file] [log] [blame]
Filip Pytloun4a72d792015-10-06 16:28:32 +02001
Aleš Komárek72152852017-04-11 13:48:48 +02002============
3Nova Formula
4============
Filip Pytloun4a72d792015-10-06 16:28:32 +02005
Jakub Pavlikfcf34f82016-05-20 09:35:51 +02006OpenStack Nova provides a cloud computing fabric controller, supporting a wide
7variety of virtualization technologies, including KVM, Xen, LXC, VMware, and
8more. In addition to its native API, it includes compatibility with the
9commonly encountered Amazon EC2 and S3 APIs.
Filip Pytloun4a72d792015-10-06 16:28:32 +020010
Aleš Komárek72152852017-04-11 13:48:48 +020011Sample Pillars
Filip Pytloun4a72d792015-10-06 16:28:32 +020012==============
13
14Controller nodes
15----------------
16
17Nova services on the controller node
18
19.. code-block:: yaml
20
21 nova:
22 controller:
23 version: juno
24 enabled: true
25 security_group: true
Lachlan Evensonb72de502016-01-20 15:34:04 -080026 cpu_allocation_ratio: 8.0
27 ram_allocation_ratio: 1.0
Jiri Konecny9344a372016-03-21 19:25:48 +010028 disk_allocation_ratio: 1.0
Dmitry Stremkovskiy2bcba8d2017-07-30 21:43:59 +030029 cross_az_attach: false
Jiri Konecnyb5a80e42016-03-22 11:51:01 +010030 workers: 8
Jakub Pavlik617a8962016-09-04 18:50:06 +020031 report_interval: 60
Filip Pytloun4a72d792015-10-06 16:28:32 +020032 bind:
33 public_address: 10.0.0.122
34 public_name: openstack.domain.com
35 novncproxy_port: 6080
36 database:
37 engine: mysql
38 host: 127.0.0.1
39 port: 3306
40 name: nova
41 user: nova
42 password: pwd
43 identity:
44 engine: keystone
45 host: 127.0.0.1
46 port: 35357
47 user: nova
48 password: pwd
49 tenant: service
50 message_queue:
51 engine: rabbitmq
52 host: 127.0.0.1
53 port: 5672
54 user: openstack
55 password: pwd
56 virtual_host: '/openstack'
57 network:
58 engine: neutron
59 host: 127.0.0.1
60 port: 9696
Jakub Pavlik617a8962016-09-04 18:50:06 +020061 extension_sync_interval: 600
Filip Pytloun4a72d792015-10-06 16:28:32 +020062 identity:
63 engine: keystone
64 host: 127.0.0.1
65 port: 35357
66 user: neutron
67 password: pwd
68 tenant: service
69 metadata:
70 password: password
Petr Michalecaa23dc02016-11-29 16:30:25 +010071 audit:
72 enabled: false
Simon Pasquier8683b7a2017-02-03 16:00:16 +010073 osapi_max_limit: 500
Filip Pytloun4a72d792015-10-06 16:28:32 +020074
Jiri Konecnye31f2c52016-04-14 17:16:02 +020075
Filip Pytloun4a72d792015-10-06 16:28:32 +020076Nova services from custom package repository
77
78.. code-block:: yaml
79
80 nova:
81 controller:
82 version: juno
83 source:
84 engine: pkg
85 address: http://...
86 ....
87
Jiri Konecnye31f2c52016-04-14 17:16:02 +020088
89Client-side RabbitMQ HA setup
90
91.. code-block:: yaml
92
93 nova:
94 controller:
95 ....
96 message_queue:
97 engine: rabbitmq
98 members:
99 - host: 10.0.16.1
100 - host: 10.0.16.2
101 - host: 10.0.16.3
102 user: openstack
103 password: pwd
104 virtual_host: '/openstack'
105 ....
106
107
Petr Michalecaa23dc02016-11-29 16:30:25 +0100108Enable auditing filter, ie: CADF
109
110.. code-block:: yaml
111
112 nova:
113 controller:
Simon Pasquier6a3c8f72016-12-19 15:37:24 +0100114 audit:
Petr Michalecaa23dc02016-11-29 16:30:25 +0100115 enabled: true
116 ....
117 filter_factory: 'keystonemiddleware.audit:filter_factory'
118 map_file: '/etc/pycadf/nova_api_audit_map.conf'
119 ....
120
121
Ondrej Smola25b53cb2017-04-28 10:56:19 +0200122Enable CORS parameters
123
124.. code-block:: yaml
125
126 nova:
127 controller:
128 cors:
129 allowed_origin: https:localhost.local,http:localhost.local
130 expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
131 allow_methods: GET,PUT,POST,DELETE,PATCH
132 allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
133 allow_credentials: True
134 max_age: 86400
135
Dmitry Ukov3562a082017-05-04 00:00:48 +0400136Configuration of policy.json file
137
138.. code-block:: yaml
139
140 nova:
141 controller:
142 ....
143 policy:
144 context_is_admin: 'role:admin or role:administrator'
145 'compute:create': 'rule:admin_or_owner'
146 # Add key without value to remove line from policy.json
147 'compute:create:attach_network':
Ondrej Smola25b53cb2017-04-28 10:56:19 +0200148
Filip Pytloun4a72d792015-10-06 16:28:32 +0200149Compute nodes
150-------------
151
152Nova controller services on compute node
153
154.. code-block:: yaml
155
156 nova:
157 compute:
158 version: juno
159 enabled: true
160 virtualization: kvm
Dmitry Stremkovskiy2bcba8d2017-07-30 21:43:59 +0300161 cross_az_attach: false
Dmitry Stremkovskiy35e53b72017-07-29 12:50:39 +0300162 disk_cachemodes: network=writeback,block=none
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100163 availability_zone: availability_zone_01
Damian Szelugae1922412017-04-18 16:36:46 +0200164 aggregates:
165 - hosts_with_fc
166 - hosts_with_ssd
Filip Pytloun4a72d792015-10-06 16:28:32 +0200167 security_group: true
Petr Michalecf03e4882017-04-10 10:26:18 +0200168 resume_guests_state_on_host_boot: False
Dmitry Stremkovskiy8a0ff512017-07-25 20:54:13 +0300169 my_ip: 10.1.0.16
Filip Pytloun4a72d792015-10-06 16:28:32 +0200170 bind:
171 vnc_address: 172.20.0.100
172 vnc_port: 6080
173 vnc_name: openstack.domain.com
174 vnc_protocol: http
175 database:
176 engine: mysql
177 host: 127.0.0.1
178 port: 3306
179 name: nova
180 user: nova
181 password: pwd
182 identity:
183 engine: keystone
184 host: 127.0.0.1
185 port: 35357
186 user: nova
187 password: pwd
188 tenant: service
189 message_queue:
190 engine: rabbitmq
191 host: 127.0.0.1
192 port: 5672
193 user: openstack
194 password: pwd
195 virtual_host: '/openstack'
196 image:
197 engine: glance
198 host: 127.0.0.1
199 port: 9292
200 network:
201 engine: neutron
202 host: 127.0.0.1
203 port: 9696
204 identity:
205 engine: keystone
206 host: 127.0.0.1
207 port: 35357
208 user: neutron
209 password: pwd
210 tenant: service
211 qemu:
212 max_files: 4096
213 max_processes: 4096
Dmitry Stremkovskiy96281f52017-07-26 00:39:22 +0300214 host: node-12.domain.tld
Filip Pytloun4a72d792015-10-06 16:28:32 +0200215
Dmitry Stremkovskiy3cd6ba82017-07-25 17:15:36 +0300216Group membership for user nova (upgrade related)
217
218.. code-block:: yaml
219
220 nova:
221 compute:
222 enabled: true
223 ...
224 user:
225 groups:
226 - libvirt
227
Filip Pytloun4a72d792015-10-06 16:28:32 +0200228Nova services on compute node with OpenContrail
229
230.. code-block:: yaml
231
232 nova:
233 compute:
234 enabled: true
235 ...
236 networking: contrail
237
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200238
Filip Pytloun4a72d792015-10-06 16:28:32 +0200239Nova services on compute node with memcached caching
240
241.. code-block:: yaml
242
243 nova:
244 compute:
245 enabled: true
246 ...
247 cache:
248 engine: memcached
249 members:
250 - host: 127.0.0.1
251 port: 11211
252 - host: 127.0.0.1
253 port: 11211
254
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200255
256Client-side RabbitMQ HA setup
257
258.. code-block:: yaml
259
260 nova:
261 controller:
262 ....
263 message_queue:
264 engine: rabbitmq
265 members:
266 - host: 10.0.16.1
267 - host: 10.0.16.2
268 - host: 10.0.16.3
269 user: openstack
270 password: pwd
271 virtual_host: '/openstack'
272 ....
273
maxstack39e6aca2016-05-04 13:50:13 +0000274
275Nova with ephemeral configured with Ceph
276
277.. code-block:: yaml
278
279 nova:
280 compute:
281 enabled: true
282 ...
283 ceph:
284 ephemeral: yes
285 rbd_pool: nova
286 rbd_user: nova
287 secret_uuid: 03006edd-d957-40a3-ac4c-26cd254b3731
288
289
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100290Client role
291-----------
292
Dmitry Stremkovskiy665c7282017-07-05 17:36:27 +0300293Nova configured with NFS
294
295.. code-block:: yaml
296
297 nova:
298 compute:
299 instances_path: /mnt/nova/instances
300
301 linux:
302 storage:
303 enabled: true
304 mount:
305 nfs_nova:
306 enabled: true
307 path: ${nova:compute:instances_path}
308 device: 172.31.35.145:/data
309 file_system: nfs
310 opts: rw,vers=3
311
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100312Nova flavors
313
314.. code-block:: yaml
315
316 nova:
317 client:
318 enabled: true
319 server:
320 identity:
321 flavor:
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100322 flavor1:
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100323 flavor_id: 10
324 ram: 4096
325 disk: 10
326 vcpus: 1
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100327 flavor2:
328 flavor_id: auto
329 ram: 4096
330 disk: 20
331 vcpus: 2
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100332 identity1:
333 flavor:
334 ...
335
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100336
337Availability zones
338
339.. code-block:: yaml
340
341 nova:
342 client:
343 enabled: true
344 server:
345 identity:
346 availability_zones:
347 - availability_zone_01
348 - availability_zone_02
349
Damian Szeluga5dca0f02017-04-13 17:27:15 +0200350
351
352Aggregates
353
354.. code-block:: yaml
355
356 nova:
357 client:
358 enabled: true
359 server:
360 identity:
361 aggregates:
362 - aggregate1
363 - aggregate2
364
Dmitry Stremkovskiy91f45852017-07-18 16:22:31 +0300365Upgrade levels
366
367.. code-block:: yaml
368
369 nova:
370 controller:
371 upgrade_levels:
372 compute: juno
373
374 nova:
375 compute:
376 upgrade_levels:
377 compute: juno
378
Petr Jedinýd855ef22017-03-06 22:24:33 +0100379SR-IOV
Jakub Pavlik39a05942017-02-13 23:03:08 +0100380------
381
382Add PciPassthroughFilter into scheduler filters and NICs on specific compute nodes.
383
384.. code-block:: yaml
385
386 nova:
387 controller:
388 sriov: true
389 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter"
390
391 nova:
392 compute:
393 sriov:
394 nic_one:
395 devname: eth1
396 physical_network: physnet1
397
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100398CPU pinning & Hugepages
399-----------------------
400
401CPU pinning of virtual machine instances to dedicated physical CPU cores.
402Hugepages mount point for libvirt.
403
404.. code-block:: yaml
405
406 nova:
407 controller:
408 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,NUMATopologyFilter,AggregateInstanceExtraSpecsFilter"
409
410 nova:
411 compute:
412 vcpu_pin_set: 2,3,4,5
413 hugepages:
414 mount_points:
415 - path: /mnt/hugepages_1GB
416 - path: /mnt/hugepages_2MB
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100417
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200418Custom Scheduler filters
419------------------------
420
421If you have a custom filter, that needs to be included in the scheduler, then you can include it like so:
422
423.. code-block:: yaml
424
425 nova:
426 controller:
427 scheduler_custom_filters:
428 - my_custom_driver.nova.scheduler.filters.my_custom_filter.MyCustomFilter
429
430 # Then add your custom filter on the end (make sure to include all other ones that you need as well)
431 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter,MyCustomFilter"
432
Michel Nederlofeb566f62017-04-21 15:37:47 +0200433Hardware Trip/Unmap Support
434---------------------------
435
436To enable TRIM support for ephemeral images (thru nova managed images), libvirt has this option.
437
438.. code-block:: yaml
439
440 nova:
441 compute:
442 libvirt:
443 hw_disk_discard: unmap
444
445In order to actually utilize this feature, the following metadata must be set on the image as well, so the SCSI unmap is supported.
446
447.. code-block:: bash
448
449 glance image-update --property hw_scsi_model=virtio-scsi <image>
450 glance image-update --property hw_disk_bus=scsi <image>
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100451
Thom Gerdesec00afd2017-04-07 18:06:59 +0000452libvirt CPU mode
453----------------
454
455Allow setting the model of CPU that is exposed to a VM. This allows better
456support live migration between hypervisors with different hardware, among other
457things. Defaults to host-passthrough.
458
459.. code-block:: yaml
460
461 nova:
462 compute:
463 cpu_mode: host-model
464
Michel Nederloff7eefb22017-07-10 11:14:33 +0200465Nova compute workarounds
466------------------------
467
468Live snapshotting is disabled by default in nova. To enable this, it needs a manual switch.
469
470From manual:
471
472.. code-block:: yaml
473
474 # When using libvirt 1.2.2 live snapshots fail intermittently under load
475 # (likely related to concurrent libvirt/qemu operations). This config
476 # option provides a mechanism to disable live snapshot, in favor of cold
477 # snapshot, while this is resolved. Cold snapshot causes an instance
478 # outage while the guest is going through the snapshotting process.
479 #
480 # For more information, refer to the bug report:
481 #
482 # https://bugs.launchpad.net/nova/+bug/1334398
483
484Configurable pillar data:
485
486.. code-block:: yaml
487
488 nova:
489 compute:
Michel Nederlofe322ebb2017-07-10 12:29:21 +0200490 workaround:
Michel Nederloff7eefb22017-07-10 11:14:33 +0200491 disable_libvirt_livesnapshot: False
492
Michel Nederlofb51a5142017-06-27 08:31:35 +0200493Config drive options
494--------------------
495
496See example below on how to configure the options for the config drive.
497
498.. code-block:: yaml
499
500 nova:
501 compute:
502 config_drive:
503 forced: True # Default: True
504 cdrom: True # Default: False
505 format: iso9660 # Default: vfat
506 inject_password: False # Default: False
507
Thom Gerdesec00afd2017-04-07 18:06:59 +0000508
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100509Documentation and Bugs
510======================
511
512To learn how to install and update salt-formulas, consult the documentation
513available online at:
514
515 http://salt-formulas.readthedocs.io/
516
517In the unfortunate event that bugs are discovered, they should be reported to
518the appropriate issue tracker. Use Github issue tracker for specific salt
519formula:
520
521 https://github.com/salt-formulas/salt-formula-nova/issues
522
523For feature requests, bug reports or blueprints affecting entire ecosystem,
524use Launchpad salt-formulas project:
525
526 https://launchpad.net/salt-formulas
527
528You can also join salt-formulas-users team and subscribe to mailing list:
529
530 https://launchpad.net/~salt-formulas-users
531
532Developers wishing to work on the salt-formulas projects should always base
533their work on master branch and submit pull request against specific formula.
534
535 https://github.com/salt-formulas/salt-formula-nova
536
537Any questions or feedback is always welcome so feel free to join our IRC
538channel:
539
540 #salt-formulas @ irc.freenode.net