blob: 64d546a501a5aaf632e77af1cde2c65245f5c0db [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
Oleg Iurchenko370c10d2017-10-19 14:03:37 +030074 barbican:
75 enabled: true
Filip Pytloun4a72d792015-10-06 16:28:32 +020076
Jiri Konecnye31f2c52016-04-14 17:16:02 +020077
Filip Pytloun4a72d792015-10-06 16:28:32 +020078Nova services from custom package repository
79
80.. code-block:: yaml
81
82 nova:
83 controller:
84 version: juno
85 source:
86 engine: pkg
87 address: http://...
88 ....
89
Jiri Konecnye31f2c52016-04-14 17:16:02 +020090
91Client-side RabbitMQ HA setup
92
93.. code-block:: yaml
94
95 nova:
96 controller:
97 ....
98 message_queue:
99 engine: rabbitmq
100 members:
101 - host: 10.0.16.1
102 - host: 10.0.16.2
103 - host: 10.0.16.3
104 user: openstack
105 password: pwd
106 virtual_host: '/openstack'
107 ....
108
109
Petr Michalecaa23dc02016-11-29 16:30:25 +0100110Enable auditing filter, ie: CADF
111
112.. code-block:: yaml
113
114 nova:
115 controller:
Simon Pasquier6a3c8f72016-12-19 15:37:24 +0100116 audit:
Petr Michalecaa23dc02016-11-29 16:30:25 +0100117 enabled: true
118 ....
119 filter_factory: 'keystonemiddleware.audit:filter_factory'
120 map_file: '/etc/pycadf/nova_api_audit_map.conf'
121 ....
122
123
Ondrej Smola25b53cb2017-04-28 10:56:19 +0200124Enable CORS parameters
125
126.. code-block:: yaml
127
128 nova:
129 controller:
130 cors:
131 allowed_origin: https:localhost.local,http:localhost.local
132 expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
133 allow_methods: GET,PUT,POST,DELETE,PATCH
134 allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
135 allow_credentials: True
136 max_age: 86400
137
Dmitry Ukov3562a082017-05-04 00:00:48 +0400138Configuration of policy.json file
139
140.. code-block:: yaml
141
142 nova:
143 controller:
144 ....
145 policy:
146 context_is_admin: 'role:admin or role:administrator'
147 'compute:create': 'rule:admin_or_owner'
148 # Add key without value to remove line from policy.json
149 'compute:create:attach_network':
Ondrej Smola25b53cb2017-04-28 10:56:19 +0200150
Oleg Iurchenko370c10d2017-10-19 14:03:37 +0300151Enable Barbican integration
152
153.. code-block:: yaml
154
155 nova:
156 controller:
157 ....
158 barbican:
159 enabled: true
160
Kirill Bespalov64617172017-07-11 14:43:14 +0300161
162Client-side RabbitMQ TLS configuration:
163---------------------------------------
164
165To enable TLS for oslo.messaging you need to provide the CA certificate.
166
167By default system-wide CA certs is used. Nothing should be specified except `ssl.enabled`.
168
169.. code-block:: yaml
170
171 nova:
172 controller:
173 ....
174 message_queue:
175 ssl:
176 enabled: True
177
178
179
180Use `cacert_file` option to specify the CA-cert file path explicitly:
181
182.. code-block:: yaml
183
184 nova:
185 controller:
186 ....
187 message_queue:
188 ssl:
189 enabled: True
190 cacert_file: /etc/ssl/rabbitmq-ca.pem
191
192To manage content of the `cacert_file` use the `cacert` option:
193
194.. code-block:: yaml
195
196 nova:
197 controller:
198 ....
199 message_queue:
200 ssl:
201 enabled: True
202 cacert: |
203
204 -----BEGIN CERTIFICATE-----
205 ...
206 -----END CERTIFICATE-------
207
208 cacert_file: /etc/openstack/rabbitmq-ca.pem
209
210
211Notice:
212 * The `message_queue.port` is set to **5671** (AMQPS) by default if `ssl.enabled=True`.
213 * Use `message_queue.ssl.version` if you need to specify protocol version. By default is TLSv1 for python < 2.7.9 and TLSv1_2 for version above.
214
215
Filip Pytloun4a72d792015-10-06 16:28:32 +0200216Compute nodes
217-------------
218
219Nova controller services on compute node
220
221.. code-block:: yaml
222
223 nova:
224 compute:
225 version: juno
226 enabled: true
227 virtualization: kvm
Dmitry Stremkovskiy2bcba8d2017-07-30 21:43:59 +0300228 cross_az_attach: false
Dmitry Stremkovskiy35e53b72017-07-29 12:50:39 +0300229 disk_cachemodes: network=writeback,block=none
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100230 availability_zone: availability_zone_01
Damian Szelugae1922412017-04-18 16:36:46 +0200231 aggregates:
232 - hosts_with_fc
233 - hosts_with_ssd
Filip Pytloun4a72d792015-10-06 16:28:32 +0200234 security_group: true
Petr Michalecf03e4882017-04-10 10:26:18 +0200235 resume_guests_state_on_host_boot: False
Dmitry Stremkovskiy8a0ff512017-07-25 20:54:13 +0300236 my_ip: 10.1.0.16
Filip Pytloun4a72d792015-10-06 16:28:32 +0200237 bind:
238 vnc_address: 172.20.0.100
239 vnc_port: 6080
240 vnc_name: openstack.domain.com
241 vnc_protocol: http
242 database:
243 engine: mysql
244 host: 127.0.0.1
245 port: 3306
246 name: nova
247 user: nova
248 password: pwd
249 identity:
250 engine: keystone
251 host: 127.0.0.1
252 port: 35357
253 user: nova
254 password: pwd
255 tenant: service
256 message_queue:
257 engine: rabbitmq
258 host: 127.0.0.1
259 port: 5672
260 user: openstack
261 password: pwd
262 virtual_host: '/openstack'
263 image:
264 engine: glance
265 host: 127.0.0.1
266 port: 9292
267 network:
268 engine: neutron
269 host: 127.0.0.1
270 port: 9696
271 identity:
272 engine: keystone
273 host: 127.0.0.1
274 port: 35357
275 user: neutron
276 password: pwd
277 tenant: service
278 qemu:
279 max_files: 4096
280 max_processes: 4096
Dmitry Stremkovskiy96281f52017-07-26 00:39:22 +0300281 host: node-12.domain.tld
Filip Pytloun4a72d792015-10-06 16:28:32 +0200282
kkalynovskyif50f0c02017-12-12 17:52:57 +0200283Group and user to be used for QEMU processes run by the system instance
284
285.. code-block:: yaml
286
287 nova:
288 compute:
289 enabled: true
290 ...
291 qemu:
292 user: nova
293 group: cinder
294 dynamic_ownership: 1
295
Dmitry Stremkovskiy3cd6ba82017-07-25 17:15:36 +0300296Group membership for user nova (upgrade related)
297
298.. code-block:: yaml
299
300 nova:
301 compute:
302 enabled: true
303 ...
304 user:
305 groups:
306 - libvirt
Filip Pytloun4a72d792015-10-06 16:28:32 +0200307
308Nova services on compute node with OpenContrail
309
310.. code-block:: yaml
311
312 nova:
313 compute:
314 enabled: true
315 ...
316 networking: contrail
317
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200318
Filip Pytloun4a72d792015-10-06 16:28:32 +0200319Nova services on compute node with memcached caching
320
321.. code-block:: yaml
322
323 nova:
324 compute:
325 enabled: true
326 ...
327 cache:
328 engine: memcached
329 members:
330 - host: 127.0.0.1
331 port: 11211
332 - host: 127.0.0.1
333 port: 11211
334
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200335
336Client-side RabbitMQ HA setup
337
338.. code-block:: yaml
339
340 nova:
Kirill Bespalov64617172017-07-11 14:43:14 +0300341 compute:
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200342 ....
343 message_queue:
344 engine: rabbitmq
345 members:
346 - host: 10.0.16.1
347 - host: 10.0.16.2
348 - host: 10.0.16.3
349 user: openstack
350 password: pwd
351 virtual_host: '/openstack'
352 ....
353
maxstack39e6aca2016-05-04 13:50:13 +0000354Nova with ephemeral configured with Ceph
355
356.. code-block:: yaml
357
358 nova:
359 compute:
360 enabled: true
361 ...
362 ceph:
363 ephemeral: yes
364 rbd_pool: nova
365 rbd_user: nova
366 secret_uuid: 03006edd-d957-40a3-ac4c-26cd254b3731
Kalynovskyi0bc79692017-07-21 16:22:09 +0300367 ....
maxstack39e6aca2016-05-04 13:50:13 +0000368
Kalynovskyi0bc79692017-07-21 16:22:09 +0300369Nova with ephemeral configured with LVM
370
371.. code-block:: yaml
372
373 nova:
374 compute:
375 enabled: true
376 ...
377 lvm:
378 ephemeral: yes
379 images_volume_group: nova_vg
380
381 linux:
382 storage:
383 lvm:
384 nova_vg:
385 name: nova_vg
386 devices:
387 - /dev/sdf
388 - /dev/sdd
389 - /dev/sdg
390 - /dev/sde
391 - /dev/sdc
392 - /dev/sdj
393 - /dev/sdh
maxstack39e6aca2016-05-04 13:50:13 +0000394
Oleg Iurchenko370c10d2017-10-19 14:03:37 +0300395Enable Barbican integration
396
397.. code-block:: yaml
398
399 nova:
400 compute:
401 ....
402 barbican:
403 enabled: true
404
405
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100406Client role
407-----------
408
Dmitry Stremkovskiy665c7282017-07-05 17:36:27 +0300409Nova configured with NFS
410
411.. code-block:: yaml
412
413 nova:
414 compute:
415 instances_path: /mnt/nova/instances
416
417 linux:
418 storage:
419 enabled: true
420 mount:
421 nfs_nova:
422 enabled: true
423 path: ${nova:compute:instances_path}
424 device: 172.31.35.145:/data
425 file_system: nfs
426 opts: rw,vers=3
427
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100428Nova flavors
429
430.. code-block:: yaml
431
432 nova:
433 client:
434 enabled: true
435 server:
436 identity:
437 flavor:
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100438 flavor1:
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100439 flavor_id: 10
440 ram: 4096
441 disk: 10
442 vcpus: 1
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100443 flavor2:
444 flavor_id: auto
445 ram: 4096
446 disk: 20
447 vcpus: 2
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100448 identity1:
449 flavor:
450 ...
451
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100452
453Availability zones
454
455.. code-block:: yaml
456
457 nova:
458 client:
459 enabled: true
460 server:
461 identity:
462 availability_zones:
463 - availability_zone_01
464 - availability_zone_02
465
Damian Szeluga5dca0f02017-04-13 17:27:15 +0200466
467
468Aggregates
469
470.. code-block:: yaml
471
472 nova:
473 client:
474 enabled: true
475 server:
476 identity:
477 aggregates:
478 - aggregate1
479 - aggregate2
480
Dmitry Stremkovskiy91f45852017-07-18 16:22:31 +0300481Upgrade levels
482
483.. code-block:: yaml
484
485 nova:
486 controller:
487 upgrade_levels:
488 compute: juno
489
490 nova:
491 compute:
492 upgrade_levels:
493 compute: juno
494
Petr Jedinýd855ef22017-03-06 22:24:33 +0100495SR-IOV
Jakub Pavlik39a05942017-02-13 23:03:08 +0100496------
497
498Add PciPassthroughFilter into scheduler filters and NICs on specific compute nodes.
499
500.. code-block:: yaml
501
502 nova:
503 controller:
504 sriov: true
505 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter"
506
507 nova:
508 compute:
509 sriov:
510 nic_one:
511 devname: eth1
512 physical_network: physnet1
513
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100514CPU pinning & Hugepages
515-----------------------
516
517CPU pinning of virtual machine instances to dedicated physical CPU cores.
518Hugepages mount point for libvirt.
519
520.. code-block:: yaml
521
522 nova:
523 controller:
524 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,NUMATopologyFilter,AggregateInstanceExtraSpecsFilter"
525
526 nova:
527 compute:
528 vcpu_pin_set: 2,3,4,5
529 hugepages:
530 mount_points:
531 - path: /mnt/hugepages_1GB
532 - path: /mnt/hugepages_2MB
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100533
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200534Custom Scheduler filters
535------------------------
536
537If you have a custom filter, that needs to be included in the scheduler, then you can include it like so:
538
539.. code-block:: yaml
540
541 nova:
542 controller:
543 scheduler_custom_filters:
544 - my_custom_driver.nova.scheduler.filters.my_custom_filter.MyCustomFilter
545
546 # Then add your custom filter on the end (make sure to include all other ones that you need as well)
547 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter,MyCustomFilter"
548
Michel Nederlofeb566f62017-04-21 15:37:47 +0200549Hardware Trip/Unmap Support
550---------------------------
551
552To enable TRIM support for ephemeral images (thru nova managed images), libvirt has this option.
553
554.. code-block:: yaml
555
556 nova:
557 compute:
558 libvirt:
559 hw_disk_discard: unmap
560
561In order to actually utilize this feature, the following metadata must be set on the image as well, so the SCSI unmap is supported.
562
563.. code-block:: bash
564
565 glance image-update --property hw_scsi_model=virtio-scsi <image>
566 glance image-update --property hw_disk_bus=scsi <image>
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100567
Jakub Pavlik7046b9c2017-09-19 12:04:19 +0200568
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000569Scheduler Host Manager
570----------------------
571
572Specify a custom host manager.
573
Thom Gerdesec00afd2017-04-07 18:06:59 +0000574libvirt CPU mode
575----------------
576
577Allow setting the model of CPU that is exposed to a VM. This allows better
578support live migration between hypervisors with different hardware, among other
579things. Defaults to host-passthrough.
580
Jakub Pavlik7046b9c2017-09-19 12:04:19 +0200581
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000582.. code-block:: yaml
583
584 nova:
585 controller:
586 scheduler_host_manager: ironic_host_manager
587
Thom Gerdesec00afd2017-04-07 18:06:59 +0000588 compute:
589 cpu_mode: host-model
590
Michel Nederloff7eefb22017-07-10 11:14:33 +0200591Nova compute workarounds
592------------------------
593
594Live snapshotting is disabled by default in nova. To enable this, it needs a manual switch.
595
596From manual:
597
598.. code-block:: yaml
599
600 # When using libvirt 1.2.2 live snapshots fail intermittently under load
601 # (likely related to concurrent libvirt/qemu operations). This config
602 # option provides a mechanism to disable live snapshot, in favor of cold
603 # snapshot, while this is resolved. Cold snapshot causes an instance
604 # outage while the guest is going through the snapshotting process.
605 #
606 # For more information, refer to the bug report:
607 #
608 # https://bugs.launchpad.net/nova/+bug/1334398
609
610Configurable pillar data:
611
612.. code-block:: yaml
613
614 nova:
615 compute:
Michel Nederlofe322ebb2017-07-10 12:29:21 +0200616 workaround:
Michel Nederloff7eefb22017-07-10 11:14:33 +0200617 disable_libvirt_livesnapshot: False
618
Michel Nederlofb51a5142017-06-27 08:31:35 +0200619Config drive options
620--------------------
621
622See example below on how to configure the options for the config drive.
623
624.. code-block:: yaml
625
626 nova:
627 compute:
628 config_drive:
629 forced: True # Default: True
630 cdrom: True # Default: False
631 format: iso9660 # Default: vfat
632 inject_password: False # Default: False
633
Michel Nederloff81919b2017-11-20 09:37:07 +0100634Number of concurrent live migrates
635----------------------------------
636
637Default is to have no concurrent live migrations (so 1 live-migration at a time).
638
639Excerpt from config options page (https://docs.openstack.org/ocata/config-reference/compute/config-options.html):
640
641 Maximum number of live migrations to run concurrently. This limit is
642 enforced to avoid outbound live migrations overwhelming the host/network
643 and causing failures. It is not recommended that you change this unless
644 you are very sure that doing so is safe and stable in your environment.
645
646 Possible values:
647
648 - 0 : treated as unlimited.
649 - Negative value defaults to 0.
650 - Any positive integer representing maximum number of live migrations to run concurrently.
651
652To configure this option:
653
654.. code-block:: yaml
655
656 nova:
657 compute:
658 max_concurrent_live_migrations: 1 # (1 is the default)
659
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000660
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100661Documentation and Bugs
662======================
663
664To learn how to install and update salt-formulas, consult the documentation
665available online at:
666
667 http://salt-formulas.readthedocs.io/
668
669In the unfortunate event that bugs are discovered, they should be reported to
670the appropriate issue tracker. Use Github issue tracker for specific salt
671formula:
672
673 https://github.com/salt-formulas/salt-formula-nova/issues
674
675For feature requests, bug reports or blueprints affecting entire ecosystem,
676use Launchpad salt-formulas project:
677
678 https://launchpad.net/salt-formulas
679
680You can also join salt-formulas-users team and subscribe to mailing list:
681
682 https://launchpad.net/~salt-formulas-users
683
684Developers wishing to work on the salt-formulas projects should always base
685their work on master branch and submit pull request against specific formula.
686
687 https://github.com/salt-formulas/salt-formula-nova
688
689Any questions or feedback is always welcome so feel free to join our IRC
690channel:
691
692 #salt-formulas @ irc.freenode.net