blob: 56ecdb1627a5c918a79a21bef0d0c9a1c287cfa0 [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
Kirill Bespalov64617172017-07-11 14:43:14 +0300149
150Client-side RabbitMQ TLS configuration:
151---------------------------------------
152
153To enable TLS for oslo.messaging you need to provide the CA certificate.
154
155By default system-wide CA certs is used. Nothing should be specified except `ssl.enabled`.
156
157.. code-block:: yaml
158
159 nova:
160 controller:
161 ....
162 message_queue:
163 ssl:
164 enabled: True
165
166
167
168Use `cacert_file` option to specify the CA-cert file path explicitly:
169
170.. code-block:: yaml
171
172 nova:
173 controller:
174 ....
175 message_queue:
176 ssl:
177 enabled: True
178 cacert_file: /etc/ssl/rabbitmq-ca.pem
179
180To manage content of the `cacert_file` use the `cacert` option:
181
182.. code-block:: yaml
183
184 nova:
185 controller:
186 ....
187 message_queue:
188 ssl:
189 enabled: True
190 cacert: |
191
192 -----BEGIN CERTIFICATE-----
193 ...
194 -----END CERTIFICATE-------
195
196 cacert_file: /etc/openstack/rabbitmq-ca.pem
197
198
199Notice:
200 * The `message_queue.port` is set to **5671** (AMQPS) by default if `ssl.enabled=True`.
201 * 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.
202
203
Filip Pytloun4a72d792015-10-06 16:28:32 +0200204Compute nodes
205-------------
206
207Nova controller services on compute node
208
209.. code-block:: yaml
210
211 nova:
212 compute:
213 version: juno
214 enabled: true
215 virtualization: kvm
Dmitry Stremkovskiy2bcba8d2017-07-30 21:43:59 +0300216 cross_az_attach: false
Dmitry Stremkovskiy35e53b72017-07-29 12:50:39 +0300217 disk_cachemodes: network=writeback,block=none
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100218 availability_zone: availability_zone_01
Damian Szelugae1922412017-04-18 16:36:46 +0200219 aggregates:
220 - hosts_with_fc
221 - hosts_with_ssd
Filip Pytloun4a72d792015-10-06 16:28:32 +0200222 security_group: true
Petr Michalecf03e4882017-04-10 10:26:18 +0200223 resume_guests_state_on_host_boot: False
Dmitry Stremkovskiy8a0ff512017-07-25 20:54:13 +0300224 my_ip: 10.1.0.16
Filip Pytloun4a72d792015-10-06 16:28:32 +0200225 bind:
226 vnc_address: 172.20.0.100
227 vnc_port: 6080
228 vnc_name: openstack.domain.com
229 vnc_protocol: http
230 database:
231 engine: mysql
232 host: 127.0.0.1
233 port: 3306
234 name: nova
235 user: nova
236 password: pwd
237 identity:
238 engine: keystone
239 host: 127.0.0.1
240 port: 35357
241 user: nova
242 password: pwd
243 tenant: service
244 message_queue:
245 engine: rabbitmq
246 host: 127.0.0.1
247 port: 5672
248 user: openstack
249 password: pwd
250 virtual_host: '/openstack'
251 image:
252 engine: glance
253 host: 127.0.0.1
254 port: 9292
255 network:
256 engine: neutron
257 host: 127.0.0.1
258 port: 9696
259 identity:
260 engine: keystone
261 host: 127.0.0.1
262 port: 35357
263 user: neutron
264 password: pwd
265 tenant: service
266 qemu:
267 max_files: 4096
268 max_processes: 4096
Dmitry Stremkovskiy96281f52017-07-26 00:39:22 +0300269 host: node-12.domain.tld
Filip Pytloun4a72d792015-10-06 16:28:32 +0200270
Dmitry Stremkovskiy3cd6ba82017-07-25 17:15:36 +0300271Group membership for user nova (upgrade related)
272
273.. code-block:: yaml
274
275 nova:
276 compute:
277 enabled: true
278 ...
279 user:
280 groups:
281 - libvirt
Filip Pytloun4a72d792015-10-06 16:28:32 +0200282
283Nova services on compute node with OpenContrail
284
285.. code-block:: yaml
286
287 nova:
288 compute:
289 enabled: true
290 ...
291 networking: contrail
292
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200293
Filip Pytloun4a72d792015-10-06 16:28:32 +0200294Nova services on compute node with memcached caching
295
296.. code-block:: yaml
297
298 nova:
299 compute:
300 enabled: true
301 ...
302 cache:
303 engine: memcached
304 members:
305 - host: 127.0.0.1
306 port: 11211
307 - host: 127.0.0.1
308 port: 11211
309
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200310
311Client-side RabbitMQ HA setup
312
313.. code-block:: yaml
314
315 nova:
Kirill Bespalov64617172017-07-11 14:43:14 +0300316 compute:
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200317 ....
318 message_queue:
319 engine: rabbitmq
320 members:
321 - host: 10.0.16.1
322 - host: 10.0.16.2
323 - host: 10.0.16.3
324 user: openstack
325 password: pwd
326 virtual_host: '/openstack'
327 ....
328
maxstack39e6aca2016-05-04 13:50:13 +0000329Nova with ephemeral configured with Ceph
330
331.. code-block:: yaml
332
333 nova:
334 compute:
335 enabled: true
336 ...
337 ceph:
338 ephemeral: yes
339 rbd_pool: nova
340 rbd_user: nova
341 secret_uuid: 03006edd-d957-40a3-ac4c-26cd254b3731
Kalynovskyi0bc79692017-07-21 16:22:09 +0300342 ....
maxstack39e6aca2016-05-04 13:50:13 +0000343
Kalynovskyi0bc79692017-07-21 16:22:09 +0300344Nova with ephemeral configured with LVM
345
346.. code-block:: yaml
347
348 nova:
349 compute:
350 enabled: true
351 ...
352 lvm:
353 ephemeral: yes
354 images_volume_group: nova_vg
355
356 linux:
357 storage:
358 lvm:
359 nova_vg:
360 name: nova_vg
361 devices:
362 - /dev/sdf
363 - /dev/sdd
364 - /dev/sdg
365 - /dev/sde
366 - /dev/sdc
367 - /dev/sdj
368 - /dev/sdh
maxstack39e6aca2016-05-04 13:50:13 +0000369
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100370Client role
371-----------
372
Dmitry Stremkovskiy665c7282017-07-05 17:36:27 +0300373Nova configured with NFS
374
375.. code-block:: yaml
376
377 nova:
378 compute:
379 instances_path: /mnt/nova/instances
380
381 linux:
382 storage:
383 enabled: true
384 mount:
385 nfs_nova:
386 enabled: true
387 path: ${nova:compute:instances_path}
388 device: 172.31.35.145:/data
389 file_system: nfs
390 opts: rw,vers=3
391
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100392Nova flavors
393
394.. code-block:: yaml
395
396 nova:
397 client:
398 enabled: true
399 server:
400 identity:
401 flavor:
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100402 flavor1:
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100403 flavor_id: 10
404 ram: 4096
405 disk: 10
406 vcpus: 1
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100407 flavor2:
408 flavor_id: auto
409 ram: 4096
410 disk: 20
411 vcpus: 2
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100412 identity1:
413 flavor:
414 ...
415
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100416
417Availability zones
418
419.. code-block:: yaml
420
421 nova:
422 client:
423 enabled: true
424 server:
425 identity:
426 availability_zones:
427 - availability_zone_01
428 - availability_zone_02
429
Damian Szeluga5dca0f02017-04-13 17:27:15 +0200430
431
432Aggregates
433
434.. code-block:: yaml
435
436 nova:
437 client:
438 enabled: true
439 server:
440 identity:
441 aggregates:
442 - aggregate1
443 - aggregate2
444
Dmitry Stremkovskiy91f45852017-07-18 16:22:31 +0300445Upgrade levels
446
447.. code-block:: yaml
448
449 nova:
450 controller:
451 upgrade_levels:
452 compute: juno
453
454 nova:
455 compute:
456 upgrade_levels:
457 compute: juno
458
Petr Jedinýd855ef22017-03-06 22:24:33 +0100459SR-IOV
Jakub Pavlik39a05942017-02-13 23:03:08 +0100460------
461
462Add PciPassthroughFilter into scheduler filters and NICs on specific compute nodes.
463
464.. code-block:: yaml
465
466 nova:
467 controller:
468 sriov: true
469 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter"
470
471 nova:
472 compute:
473 sriov:
474 nic_one:
475 devname: eth1
476 physical_network: physnet1
477
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100478CPU pinning & Hugepages
479-----------------------
480
481CPU pinning of virtual machine instances to dedicated physical CPU cores.
482Hugepages mount point for libvirt.
483
484.. code-block:: yaml
485
486 nova:
487 controller:
488 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,NUMATopologyFilter,AggregateInstanceExtraSpecsFilter"
489
490 nova:
491 compute:
492 vcpu_pin_set: 2,3,4,5
493 hugepages:
494 mount_points:
495 - path: /mnt/hugepages_1GB
496 - path: /mnt/hugepages_2MB
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100497
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200498Custom Scheduler filters
499------------------------
500
501If you have a custom filter, that needs to be included in the scheduler, then you can include it like so:
502
503.. code-block:: yaml
504
505 nova:
506 controller:
507 scheduler_custom_filters:
508 - my_custom_driver.nova.scheduler.filters.my_custom_filter.MyCustomFilter
509
510 # Then add your custom filter on the end (make sure to include all other ones that you need as well)
511 scheduler_default_filters: "DifferentHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter,MyCustomFilter"
512
Michel Nederlofeb566f62017-04-21 15:37:47 +0200513Hardware Trip/Unmap Support
514---------------------------
515
516To enable TRIM support for ephemeral images (thru nova managed images), libvirt has this option.
517
518.. code-block:: yaml
519
520 nova:
521 compute:
522 libvirt:
523 hw_disk_discard: unmap
524
525In order to actually utilize this feature, the following metadata must be set on the image as well, so the SCSI unmap is supported.
526
527.. code-block:: bash
528
529 glance image-update --property hw_scsi_model=virtio-scsi <image>
530 glance image-update --property hw_disk_bus=scsi <image>
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100531
Jakub Pavlik7046b9c2017-09-19 12:04:19 +0200532
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000533Scheduler Host Manager
534----------------------
535
536Specify a custom host manager.
537
Thom Gerdesec00afd2017-04-07 18:06:59 +0000538libvirt CPU mode
539----------------
540
541Allow setting the model of CPU that is exposed to a VM. This allows better
542support live migration between hypervisors with different hardware, among other
543things. Defaults to host-passthrough.
544
Jakub Pavlik7046b9c2017-09-19 12:04:19 +0200545
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000546.. code-block:: yaml
547
548 nova:
549 controller:
550 scheduler_host_manager: ironic_host_manager
551
Thom Gerdesec00afd2017-04-07 18:06:59 +0000552 compute:
553 cpu_mode: host-model
554
Michel Nederloff7eefb22017-07-10 11:14:33 +0200555Nova compute workarounds
556------------------------
557
558Live snapshotting is disabled by default in nova. To enable this, it needs a manual switch.
559
560From manual:
561
562.. code-block:: yaml
563
564 # When using libvirt 1.2.2 live snapshots fail intermittently under load
565 # (likely related to concurrent libvirt/qemu operations). This config
566 # option provides a mechanism to disable live snapshot, in favor of cold
567 # snapshot, while this is resolved. Cold snapshot causes an instance
568 # outage while the guest is going through the snapshotting process.
569 #
570 # For more information, refer to the bug report:
571 #
572 # https://bugs.launchpad.net/nova/+bug/1334398
573
574Configurable pillar data:
575
576.. code-block:: yaml
577
578 nova:
579 compute:
Michel Nederlofe322ebb2017-07-10 12:29:21 +0200580 workaround:
Michel Nederloff7eefb22017-07-10 11:14:33 +0200581 disable_libvirt_livesnapshot: False
582
Michel Nederlofb51a5142017-06-27 08:31:35 +0200583Config drive options
584--------------------
585
586See example below on how to configure the options for the config drive.
587
588.. code-block:: yaml
589
590 nova:
591 compute:
592 config_drive:
593 forced: True # Default: True
594 cdrom: True # Default: False
595 format: iso9660 # Default: vfat
596 inject_password: False # Default: False
597
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000598
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100599Documentation and Bugs
600======================
601
602To learn how to install and update salt-formulas, consult the documentation
603available online at:
604
605 http://salt-formulas.readthedocs.io/
606
607In the unfortunate event that bugs are discovered, they should be reported to
608the appropriate issue tracker. Use Github issue tracker for specific salt
609formula:
610
611 https://github.com/salt-formulas/salt-formula-nova/issues
612
613For feature requests, bug reports or blueprints affecting entire ecosystem,
614use Launchpad salt-formulas project:
615
616 https://launchpad.net/salt-formulas
617
618You can also join salt-formulas-users team and subscribe to mailing list:
619
620 https://launchpad.net/~salt-formulas-users
621
622Developers wishing to work on the salt-formulas projects should always base
623their work on master branch and submit pull request against specific formula.
624
625 https://github.com/salt-formulas/salt-formula-nova
626
627Any questions or feedback is always welcome so feel free to join our IRC
628channel:
629
630 #salt-formulas @ irc.freenode.net