blob: 8f773a7ab6903efcaa16e3782d9d01e53345c349 [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
Dmitry Stremkovskiy3cd6ba82017-07-25 17:15:36 +0300283Group membership for user nova (upgrade related)
284
285.. code-block:: yaml
286
287 nova:
288 compute:
289 enabled: true
290 ...
291 user:
292 groups:
293 - libvirt
Filip Pytloun4a72d792015-10-06 16:28:32 +0200294
295Nova services on compute node with OpenContrail
296
297.. code-block:: yaml
298
299 nova:
300 compute:
301 enabled: true
302 ...
303 networking: contrail
304
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200305
Filip Pytloun4a72d792015-10-06 16:28:32 +0200306Nova services on compute node with memcached caching
307
308.. code-block:: yaml
309
310 nova:
311 compute:
312 enabled: true
313 ...
314 cache:
315 engine: memcached
316 members:
317 - host: 127.0.0.1
318 port: 11211
319 - host: 127.0.0.1
320 port: 11211
321
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200322
323Client-side RabbitMQ HA setup
324
325.. code-block:: yaml
326
327 nova:
Kirill Bespalov64617172017-07-11 14:43:14 +0300328 compute:
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200329 ....
330 message_queue:
331 engine: rabbitmq
332 members:
333 - host: 10.0.16.1
334 - host: 10.0.16.2
335 - host: 10.0.16.3
336 user: openstack
337 password: pwd
338 virtual_host: '/openstack'
339 ....
340
maxstack39e6aca2016-05-04 13:50:13 +0000341Nova with ephemeral configured with Ceph
342
343.. code-block:: yaml
344
345 nova:
346 compute:
347 enabled: true
348 ...
349 ceph:
350 ephemeral: yes
351 rbd_pool: nova
352 rbd_user: nova
353 secret_uuid: 03006edd-d957-40a3-ac4c-26cd254b3731
Kalynovskyi0bc79692017-07-21 16:22:09 +0300354 ....
maxstack39e6aca2016-05-04 13:50:13 +0000355
Kalynovskyi0bc79692017-07-21 16:22:09 +0300356Nova with ephemeral configured with LVM
357
358.. code-block:: yaml
359
360 nova:
361 compute:
362 enabled: true
363 ...
364 lvm:
365 ephemeral: yes
366 images_volume_group: nova_vg
367
368 linux:
369 storage:
370 lvm:
371 nova_vg:
372 name: nova_vg
373 devices:
374 - /dev/sdf
375 - /dev/sdd
376 - /dev/sdg
377 - /dev/sde
378 - /dev/sdc
379 - /dev/sdj
380 - /dev/sdh
maxstack39e6aca2016-05-04 13:50:13 +0000381
Oleg Iurchenko370c10d2017-10-19 14:03:37 +0300382Enable Barbican integration
383
384.. code-block:: yaml
385
386 nova:
387 compute:
388 ....
389 barbican:
390 enabled: true
391
392
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100393Client role
394-----------
395
Dmitry Stremkovskiy665c7282017-07-05 17:36:27 +0300396Nova configured with NFS
397
398.. code-block:: yaml
399
400 nova:
401 compute:
402 instances_path: /mnt/nova/instances
403
404 linux:
405 storage:
406 enabled: true
407 mount:
408 nfs_nova:
409 enabled: true
410 path: ${nova:compute:instances_path}
411 device: 172.31.35.145:/data
412 file_system: nfs
413 opts: rw,vers=3
414
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100415Nova flavors
416
417.. code-block:: yaml
418
419 nova:
420 client:
421 enabled: true
422 server:
423 identity:
424 flavor:
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100425 flavor1:
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100426 flavor_id: 10
427 ram: 4096
428 disk: 10
429 vcpus: 1
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100430 flavor2:
431 flavor_id: auto
432 ram: 4096
433 disk: 20
434 vcpus: 2
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100435 identity1:
436 flavor:
437 ...
438
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100439
440Availability zones
441
442.. code-block:: yaml
443
444 nova:
445 client:
446 enabled: true
447 server:
448 identity:
449 availability_zones:
450 - availability_zone_01
451 - availability_zone_02
452
Damian Szeluga5dca0f02017-04-13 17:27:15 +0200453
454
455Aggregates
456
457.. code-block:: yaml
458
459 nova:
460 client:
461 enabled: true
462 server:
463 identity:
464 aggregates:
465 - aggregate1
466 - aggregate2
467
Dmitry Stremkovskiy91f45852017-07-18 16:22:31 +0300468Upgrade levels
469
470.. code-block:: yaml
471
472 nova:
473 controller:
474 upgrade_levels:
475 compute: juno
476
477 nova:
478 compute:
479 upgrade_levels:
480 compute: juno
481
Petr Jedinýd855ef22017-03-06 22:24:33 +0100482SR-IOV
Jakub Pavlik39a05942017-02-13 23:03:08 +0100483------
484
485Add PciPassthroughFilter into scheduler filters and NICs on specific compute nodes.
486
487.. code-block:: yaml
488
489 nova:
490 controller:
491 sriov: true
492 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter"
493
494 nova:
495 compute:
496 sriov:
497 nic_one:
498 devname: eth1
499 physical_network: physnet1
500
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100501CPU pinning & Hugepages
502-----------------------
503
504CPU pinning of virtual machine instances to dedicated physical CPU cores.
505Hugepages mount point for libvirt.
506
507.. code-block:: yaml
508
509 nova:
510 controller:
511 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,NUMATopologyFilter,AggregateInstanceExtraSpecsFilter"
512
513 nova:
514 compute:
515 vcpu_pin_set: 2,3,4,5
516 hugepages:
517 mount_points:
518 - path: /mnt/hugepages_1GB
519 - path: /mnt/hugepages_2MB
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100520
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200521Custom Scheduler filters
522------------------------
523
524If you have a custom filter, that needs to be included in the scheduler, then you can include it like so:
525
526.. code-block:: yaml
527
528 nova:
529 controller:
530 scheduler_custom_filters:
531 - my_custom_driver.nova.scheduler.filters.my_custom_filter.MyCustomFilter
532
533 # Then add your custom filter on the end (make sure to include all other ones that you need as well)
534 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter,MyCustomFilter"
535
Michel Nederlofeb566f62017-04-21 15:37:47 +0200536Hardware Trip/Unmap Support
537---------------------------
538
539To enable TRIM support for ephemeral images (thru nova managed images), libvirt has this option.
540
541.. code-block:: yaml
542
543 nova:
544 compute:
545 libvirt:
546 hw_disk_discard: unmap
547
548In order to actually utilize this feature, the following metadata must be set on the image as well, so the SCSI unmap is supported.
549
550.. code-block:: bash
551
552 glance image-update --property hw_scsi_model=virtio-scsi <image>
553 glance image-update --property hw_disk_bus=scsi <image>
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100554
Jakub Pavlik7046b9c2017-09-19 12:04:19 +0200555
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000556Scheduler Host Manager
557----------------------
558
559Specify a custom host manager.
560
Thom Gerdesec00afd2017-04-07 18:06:59 +0000561libvirt CPU mode
562----------------
563
564Allow setting the model of CPU that is exposed to a VM. This allows better
565support live migration between hypervisors with different hardware, among other
566things. Defaults to host-passthrough.
567
Jakub Pavlik7046b9c2017-09-19 12:04:19 +0200568
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000569.. code-block:: yaml
570
571 nova:
572 controller:
573 scheduler_host_manager: ironic_host_manager
574
Thom Gerdesec00afd2017-04-07 18:06:59 +0000575 compute:
576 cpu_mode: host-model
577
Michel Nederloff7eefb22017-07-10 11:14:33 +0200578Nova compute workarounds
579------------------------
580
581Live snapshotting is disabled by default in nova. To enable this, it needs a manual switch.
582
583From manual:
584
585.. code-block:: yaml
586
587 # When using libvirt 1.2.2 live snapshots fail intermittently under load
588 # (likely related to concurrent libvirt/qemu operations). This config
589 # option provides a mechanism to disable live snapshot, in favor of cold
590 # snapshot, while this is resolved. Cold snapshot causes an instance
591 # outage while the guest is going through the snapshotting process.
592 #
593 # For more information, refer to the bug report:
594 #
595 # https://bugs.launchpad.net/nova/+bug/1334398
596
597Configurable pillar data:
598
599.. code-block:: yaml
600
601 nova:
602 compute:
Michel Nederlofe322ebb2017-07-10 12:29:21 +0200603 workaround:
Michel Nederloff7eefb22017-07-10 11:14:33 +0200604 disable_libvirt_livesnapshot: False
605
Michel Nederlofb51a5142017-06-27 08:31:35 +0200606Config drive options
607--------------------
608
609See example below on how to configure the options for the config drive.
610
611.. code-block:: yaml
612
613 nova:
614 compute:
615 config_drive:
616 forced: True # Default: True
617 cdrom: True # Default: False
618 format: iso9660 # Default: vfat
619 inject_password: False # Default: False
620
Michel Nederloff81919b2017-11-20 09:37:07 +0100621Number of concurrent live migrates
622----------------------------------
623
624Default is to have no concurrent live migrations (so 1 live-migration at a time).
625
626Excerpt from config options page (https://docs.openstack.org/ocata/config-reference/compute/config-options.html):
627
628 Maximum number of live migrations to run concurrently. This limit is
629 enforced to avoid outbound live migrations overwhelming the host/network
630 and causing failures. It is not recommended that you change this unless
631 you are very sure that doing so is safe and stable in your environment.
632
633 Possible values:
634
635 - 0 : treated as unlimited.
636 - Negative value defaults to 0.
637 - Any positive integer representing maximum number of live migrations to run concurrently.
638
639To configure this option:
640
641.. code-block:: yaml
642
643 nova:
644 compute:
645 max_concurrent_live_migrations: 1 # (1 is the default)
646
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400647Enhanced logging with logging.conf
648----------------------------------
649
650By default logging.conf is disabled.
651
652That is possible to enable per-binary logging.conf with new variables:
653 * openstack_log_appender - set it to true to enable log_config_append for all OpenStack services;
654 * openstack_fluentd_handler_enabled - set to true to enable FluentHandler for all Openstack services.
655
Dmitry Kalashnik8da249c2018-01-16 17:58:00 +0400656Only WatchedFileHandler and FluentHandler are available.
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400657
Dmitry Kalashnik8da249c2018-01-16 17:58:00 +0400658Also it is possible to configure this with pillar:
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400659
660.. code-block:: yaml
661
662 nova:
663 controller:
664 logging:
665 log_appender: true
666 log_handlers:
667 watchedfile:
668 enabled: true
669 fluentd:
670 enabled: true
671
672 compute:
673 logging:
674 log_appender: true
675 log_handlers:
676 watchedfile:
677 enabled: true
678 fluentd:
679 enabled: true
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000680
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100681Documentation and Bugs
682======================
683
684To learn how to install and update salt-formulas, consult the documentation
685available online at:
686
687 http://salt-formulas.readthedocs.io/
688
689In the unfortunate event that bugs are discovered, they should be reported to
690the appropriate issue tracker. Use Github issue tracker for specific salt
691formula:
692
693 https://github.com/salt-formulas/salt-formula-nova/issues
694
695For feature requests, bug reports or blueprints affecting entire ecosystem,
696use Launchpad salt-formulas project:
697
698 https://launchpad.net/salt-formulas
699
700You can also join salt-formulas-users team and subscribe to mailing list:
701
702 https://launchpad.net/~salt-formulas-users
703
704Developers wishing to work on the salt-formulas projects should always base
705their work on master branch and submit pull request against specific formula.
706
707 https://github.com/salt-formulas/salt-formula-nova
708
709Any questions or feedback is always welcome so feel free to join our IRC
710channel:
711
712 #salt-formulas @ irc.freenode.net