blob: 7aaedd954a3672ffd870e6dffbb89b132293287d [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
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300162Configuring TLS communications
163------------------------------
Kirill Bespalov64617172017-07-11 14:43:14 +0300164
Kirill Bespalov64617172017-07-11 14:43:14 +0300165
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300166**Note:** by default system wide installed CA certs are used, so ``cacert_file`` param is optional, as well as ``cacert``.
167
168
169
170- **RabbitMQ TLS**
Kirill Bespalov64617172017-07-11 14:43:14 +0300171
172.. code-block:: yaml
173
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300174 nova:
175 compute:
Kirill Bespalov64617172017-07-11 14:43:14 +0300176 message_queue:
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300177 port: 5671
Kirill Bespalov64617172017-07-11 14:43:14 +0300178 ssl:
179 enabled: True
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300180 (optional) cacert: cert body if the cacert_file does not exists
181 (optional) cacert_file: /etc/openstack/rabbitmq-ca.pem
182 (optional) version: TLSv1_2
Kirill Bespalov64617172017-07-11 14:43:14 +0300183
184
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300185- **MySQL TLS**
Kirill Bespalov64617172017-07-11 14:43:14 +0300186
187.. code-block:: yaml
188
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300189 nova:
190 controller:
191 database:
Kirill Bespalov64617172017-07-11 14:43:14 +0300192 ssl:
193 enabled: True
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300194 (optional) cacert: cert body if the cacert_file does not exists
195 (optional) cacert_file: /etc/openstack/mysql-ca.pem
Kirill Bespalov64617172017-07-11 14:43:14 +0300196
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300197- **Openstack HTTPS API**
198
199
200Set the ``https`` as protocol at ``nova:compute`` and ``nova:controller`` sections :
Kirill Bespalov64617172017-07-11 14:43:14 +0300201
202.. code-block:: yaml
203
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300204 nova:
205 controller :
206 identity:
207 protocol: https
208 (optional) cacert_file: /etc/openstack/proxy.pem
209 network:
210 protocol: https
211 (optional) cacert_file: /etc/openstack/proxy.pem
212 glance:
213 protocol: https
214 (optional) cacert_file: /etc/openstack/proxy.pem
Kirill Bespalov64617172017-07-11 14:43:14 +0300215
216
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300217.. code-block:: yaml
218
219 nova:
220 compute:
221 identity:
222 protocol: https
223 (optional) cacert_file: /etc/openstack/proxy.pem
224 network:
225 protocol: https
226 (optional) cacert_file: /etc/openstack/proxy.pem
227 image:
228 protocol: https
229 (optional) cacert_file: /etc/openstack/proxy.pem
230 ironic:
231 protocol: https
232 (optional) cacert_file: /etc/openstack/proxy.pem
233
234
235**Note:** the barbican, cinder and placement url endpoints are discovering using service catalog.
Kirill Bespalov64617172017-07-11 14:43:14 +0300236
237
Filip Pytloun4a72d792015-10-06 16:28:32 +0200238Compute nodes
239-------------
240
241Nova controller services on compute node
242
243.. code-block:: yaml
244
245 nova:
246 compute:
247 version: juno
248 enabled: true
249 virtualization: kvm
Dmitry Stremkovskiy2bcba8d2017-07-30 21:43:59 +0300250 cross_az_attach: false
Dmitry Stremkovskiy35e53b72017-07-29 12:50:39 +0300251 disk_cachemodes: network=writeback,block=none
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100252 availability_zone: availability_zone_01
Damian Szelugae1922412017-04-18 16:36:46 +0200253 aggregates:
254 - hosts_with_fc
255 - hosts_with_ssd
Filip Pytloun4a72d792015-10-06 16:28:32 +0200256 security_group: true
Petr Michalecf03e4882017-04-10 10:26:18 +0200257 resume_guests_state_on_host_boot: False
Dmitry Stremkovskiy8a0ff512017-07-25 20:54:13 +0300258 my_ip: 10.1.0.16
Filip Pytloun4a72d792015-10-06 16:28:32 +0200259 bind:
260 vnc_address: 172.20.0.100
261 vnc_port: 6080
262 vnc_name: openstack.domain.com
263 vnc_protocol: http
264 database:
265 engine: mysql
266 host: 127.0.0.1
267 port: 3306
268 name: nova
269 user: nova
270 password: pwd
271 identity:
272 engine: keystone
273 host: 127.0.0.1
274 port: 35357
275 user: nova
276 password: pwd
277 tenant: service
278 message_queue:
279 engine: rabbitmq
280 host: 127.0.0.1
281 port: 5672
282 user: openstack
283 password: pwd
284 virtual_host: '/openstack'
285 image:
286 engine: glance
287 host: 127.0.0.1
288 port: 9292
289 network:
290 engine: neutron
291 host: 127.0.0.1
292 port: 9696
293 identity:
294 engine: keystone
295 host: 127.0.0.1
296 port: 35357
297 user: neutron
298 password: pwd
299 tenant: service
300 qemu:
301 max_files: 4096
302 max_processes: 4096
Dmitry Stremkovskiy96281f52017-07-26 00:39:22 +0300303 host: node-12.domain.tld
Filip Pytloun4a72d792015-10-06 16:28:32 +0200304
Dmitry Stremkovskiy3cd6ba82017-07-25 17:15:36 +0300305Group membership for user nova (upgrade related)
306
307.. code-block:: yaml
308
309 nova:
310 compute:
311 enabled: true
312 ...
313 user:
314 groups:
315 - libvirt
Filip Pytloun4a72d792015-10-06 16:28:32 +0200316
317Nova services on compute node with OpenContrail
318
319.. code-block:: yaml
320
321 nova:
322 compute:
323 enabled: true
324 ...
325 networking: contrail
326
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200327
Filip Pytloun4a72d792015-10-06 16:28:32 +0200328Nova services on compute node with memcached caching
329
330.. code-block:: yaml
331
332 nova:
333 compute:
334 enabled: true
335 ...
336 cache:
337 engine: memcached
338 members:
339 - host: 127.0.0.1
340 port: 11211
341 - host: 127.0.0.1
342 port: 11211
343
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200344
345Client-side RabbitMQ HA setup
346
347.. code-block:: yaml
348
349 nova:
Kirill Bespalov64617172017-07-11 14:43:14 +0300350 compute:
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200351 ....
352 message_queue:
353 engine: rabbitmq
354 members:
355 - host: 10.0.16.1
356 - host: 10.0.16.2
357 - host: 10.0.16.3
358 user: openstack
359 password: pwd
360 virtual_host: '/openstack'
361 ....
362
maxstack39e6aca2016-05-04 13:50:13 +0000363Nova with ephemeral configured with Ceph
364
365.. code-block:: yaml
366
367 nova:
368 compute:
369 enabled: true
370 ...
371 ceph:
372 ephemeral: yes
373 rbd_pool: nova
374 rbd_user: nova
375 secret_uuid: 03006edd-d957-40a3-ac4c-26cd254b3731
Kalynovskyi0bc79692017-07-21 16:22:09 +0300376 ....
maxstack39e6aca2016-05-04 13:50:13 +0000377
Kalynovskyi0bc79692017-07-21 16:22:09 +0300378Nova with ephemeral configured with LVM
379
380.. code-block:: yaml
381
382 nova:
383 compute:
384 enabled: true
385 ...
386 lvm:
387 ephemeral: yes
388 images_volume_group: nova_vg
389
390 linux:
391 storage:
392 lvm:
393 nova_vg:
394 name: nova_vg
395 devices:
396 - /dev/sdf
397 - /dev/sdd
398 - /dev/sdg
399 - /dev/sde
400 - /dev/sdc
401 - /dev/sdj
402 - /dev/sdh
maxstack39e6aca2016-05-04 13:50:13 +0000403
Oleg Iurchenko370c10d2017-10-19 14:03:37 +0300404Enable Barbican integration
405
406.. code-block:: yaml
407
408 nova:
409 compute:
410 ....
411 barbican:
412 enabled: true
413
414
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100415Client role
416-----------
417
Dmitry Stremkovskiy665c7282017-07-05 17:36:27 +0300418Nova configured with NFS
419
420.. code-block:: yaml
421
422 nova:
423 compute:
424 instances_path: /mnt/nova/instances
425
426 linux:
427 storage:
428 enabled: true
429 mount:
430 nfs_nova:
431 enabled: true
432 path: ${nova:compute:instances_path}
433 device: 172.31.35.145:/data
434 file_system: nfs
435 opts: rw,vers=3
436
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100437Nova flavors
438
439.. code-block:: yaml
440
441 nova:
442 client:
443 enabled: true
444 server:
445 identity:
446 flavor:
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100447 flavor1:
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100448 flavor_id: 10
449 ram: 4096
450 disk: 10
451 vcpus: 1
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100452 flavor2:
453 flavor_id: auto
454 ram: 4096
455 disk: 20
456 vcpus: 2
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100457 identity1:
458 flavor:
459 ...
460
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100461
462Availability zones
463
464.. code-block:: yaml
465
466 nova:
467 client:
468 enabled: true
469 server:
470 identity:
471 availability_zones:
472 - availability_zone_01
473 - availability_zone_02
474
Damian Szeluga5dca0f02017-04-13 17:27:15 +0200475
476
477Aggregates
478
479.. code-block:: yaml
480
481 nova:
482 client:
483 enabled: true
484 server:
485 identity:
486 aggregates:
487 - aggregate1
488 - aggregate2
489
Dmitry Stremkovskiy91f45852017-07-18 16:22:31 +0300490Upgrade levels
491
492.. code-block:: yaml
493
494 nova:
495 controller:
496 upgrade_levels:
497 compute: juno
498
499 nova:
500 compute:
501 upgrade_levels:
502 compute: juno
503
Petr Jedinýd855ef22017-03-06 22:24:33 +0100504SR-IOV
Jakub Pavlik39a05942017-02-13 23:03:08 +0100505------
506
507Add PciPassthroughFilter into scheduler filters and NICs on specific compute nodes.
508
509.. code-block:: yaml
510
511 nova:
512 controller:
513 sriov: true
514 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter"
515
516 nova:
517 compute:
518 sriov:
519 nic_one:
520 devname: eth1
521 physical_network: physnet1
522
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100523CPU pinning & Hugepages
524-----------------------
525
526CPU pinning of virtual machine instances to dedicated physical CPU cores.
527Hugepages mount point for libvirt.
528
529.. code-block:: yaml
530
531 nova:
532 controller:
533 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,NUMATopologyFilter,AggregateInstanceExtraSpecsFilter"
534
535 nova:
536 compute:
537 vcpu_pin_set: 2,3,4,5
538 hugepages:
539 mount_points:
540 - path: /mnt/hugepages_1GB
541 - path: /mnt/hugepages_2MB
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100542
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200543Custom Scheduler filters
544------------------------
545
546If you have a custom filter, that needs to be included in the scheduler, then you can include it like so:
547
548.. code-block:: yaml
549
550 nova:
551 controller:
552 scheduler_custom_filters:
553 - my_custom_driver.nova.scheduler.filters.my_custom_filter.MyCustomFilter
554
555 # Then add your custom filter on the end (make sure to include all other ones that you need as well)
556 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter,MyCustomFilter"
557
Michel Nederlofeb566f62017-04-21 15:37:47 +0200558Hardware Trip/Unmap Support
559---------------------------
560
561To enable TRIM support for ephemeral images (thru nova managed images), libvirt has this option.
562
563.. code-block:: yaml
564
565 nova:
566 compute:
567 libvirt:
568 hw_disk_discard: unmap
569
570In order to actually utilize this feature, the following metadata must be set on the image as well, so the SCSI unmap is supported.
571
572.. code-block:: bash
573
574 glance image-update --property hw_scsi_model=virtio-scsi <image>
575 glance image-update --property hw_disk_bus=scsi <image>
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100576
Jakub Pavlik7046b9c2017-09-19 12:04:19 +0200577
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000578Scheduler Host Manager
579----------------------
580
581Specify a custom host manager.
582
Thom Gerdesec00afd2017-04-07 18:06:59 +0000583libvirt CPU mode
584----------------
585
586Allow setting the model of CPU that is exposed to a VM. This allows better
587support live migration between hypervisors with different hardware, among other
588things. Defaults to host-passthrough.
589
Jakub Pavlik7046b9c2017-09-19 12:04:19 +0200590
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000591.. code-block:: yaml
592
593 nova:
594 controller:
595 scheduler_host_manager: ironic_host_manager
596
Thom Gerdesec00afd2017-04-07 18:06:59 +0000597 compute:
598 cpu_mode: host-model
599
Michel Nederloff7eefb22017-07-10 11:14:33 +0200600Nova compute workarounds
601------------------------
602
603Live snapshotting is disabled by default in nova. To enable this, it needs a manual switch.
604
605From manual:
606
607.. code-block:: yaml
608
609 # When using libvirt 1.2.2 live snapshots fail intermittently under load
610 # (likely related to concurrent libvirt/qemu operations). This config
611 # option provides a mechanism to disable live snapshot, in favor of cold
612 # snapshot, while this is resolved. Cold snapshot causes an instance
613 # outage while the guest is going through the snapshotting process.
614 #
615 # For more information, refer to the bug report:
616 #
617 # https://bugs.launchpad.net/nova/+bug/1334398
618
619Configurable pillar data:
620
621.. code-block:: yaml
622
623 nova:
624 compute:
Michel Nederlofe322ebb2017-07-10 12:29:21 +0200625 workaround:
Michel Nederloff7eefb22017-07-10 11:14:33 +0200626 disable_libvirt_livesnapshot: False
627
Michel Nederlofb51a5142017-06-27 08:31:35 +0200628Config drive options
629--------------------
630
631See example below on how to configure the options for the config drive.
632
633.. code-block:: yaml
634
635 nova:
636 compute:
637 config_drive:
638 forced: True # Default: True
639 cdrom: True # Default: False
640 format: iso9660 # Default: vfat
641 inject_password: False # Default: False
642
Michel Nederloff81919b2017-11-20 09:37:07 +0100643Number of concurrent live migrates
644----------------------------------
645
646Default is to have no concurrent live migrations (so 1 live-migration at a time).
647
648Excerpt from config options page (https://docs.openstack.org/ocata/config-reference/compute/config-options.html):
649
650 Maximum number of live migrations to run concurrently. This limit is
651 enforced to avoid outbound live migrations overwhelming the host/network
652 and causing failures. It is not recommended that you change this unless
653 you are very sure that doing so is safe and stable in your environment.
654
655 Possible values:
656
657 - 0 : treated as unlimited.
658 - Negative value defaults to 0.
659 - Any positive integer representing maximum number of live migrations to run concurrently.
660
661To configure this option:
662
663.. code-block:: yaml
664
665 nova:
666 compute:
667 max_concurrent_live_migrations: 1 # (1 is the default)
668
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000669
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100670Documentation and Bugs
671======================
672
673To learn how to install and update salt-formulas, consult the documentation
674available online at:
675
676 http://salt-formulas.readthedocs.io/
677
678In the unfortunate event that bugs are discovered, they should be reported to
679the appropriate issue tracker. Use Github issue tracker for specific salt
680formula:
681
682 https://github.com/salt-formulas/salt-formula-nova/issues
683
684For feature requests, bug reports or blueprints affecting entire ecosystem,
685use Launchpad salt-formulas project:
686
687 https://launchpad.net/salt-formulas
688
689You can also join salt-formulas-users team and subscribe to mailing list:
690
691 https://launchpad.net/~salt-formulas-users
692
693Developers wishing to work on the salt-formulas projects should always base
694their work on master branch and submit pull request against specific formula.
695
696 https://github.com/salt-formulas/salt-formula-nova
697
698Any questions or feedback is always welcome so feel free to join our IRC
699channel:
700
701 #salt-formulas @ irc.freenode.net