blob: 673df92279c44f0530bc8210fe6daa50f129664e [file] [log] [blame]
Filip Pytloun4a72d792015-10-06 16:28:32 +02001
Aleš Komárek72152852017-04-11 13:48:48 +02002============
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03003Usage
Aleš Komárek72152852017-04-11 13:48:48 +02004============
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
OlgaGusarenko9dd01c92018-07-31 00:49:30 +030017Nova services on the controller node:
Filip Pytloun4a72d792015-10-06 16:28:32 +020018
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
Michel Nederlof8ff99332017-10-23 14:29:15 +020032 dhcp_domain: novalocal
Filip Pytloun4a72d792015-10-06 16:28:32 +020033 bind:
34 public_address: 10.0.0.122
35 public_name: openstack.domain.com
36 novncproxy_port: 6080
37 database:
38 engine: mysql
39 host: 127.0.0.1
40 port: 3306
41 name: nova
42 user: nova
43 password: pwd
44 identity:
45 engine: keystone
46 host: 127.0.0.1
47 port: 35357
48 user: nova
49 password: pwd
50 tenant: service
51 message_queue:
52 engine: rabbitmq
53 host: 127.0.0.1
54 port: 5672
55 user: openstack
56 password: pwd
57 virtual_host: '/openstack'
58 network:
59 engine: neutron
60 host: 127.0.0.1
61 port: 9696
Jakub Pavlik617a8962016-09-04 18:50:06 +020062 extension_sync_interval: 600
Filip Pytloun4a72d792015-10-06 16:28:32 +020063 identity:
64 engine: keystone
65 host: 127.0.0.1
66 port: 35357
67 user: neutron
68 password: pwd
69 tenant: service
70 metadata:
71 password: password
Petr Michalecaa23dc02016-11-29 16:30:25 +010072 audit:
73 enabled: false
Simon Pasquier8683b7a2017-02-03 16:00:16 +010074 osapi_max_limit: 500
Oleg Iurchenko370c10d2017-10-19 14:03:37 +030075 barbican:
76 enabled: true
Filip Pytloun4a72d792015-10-06 16:28:32 +020077
OlgaGusarenko9dd01c92018-07-31 00:49:30 +030078Nova services from custom package repository:
Filip Pytloun4a72d792015-10-06 16:28:32 +020079
80.. code-block:: yaml
81
82 nova:
83 controller:
84 version: juno
85 source:
86 engine: pkg
87 address: http://...
88 ....
89
OlgaGusarenko9dd01c92018-07-31 00:49:30 +030090Client-side RabbitMQ HA setup:
Jiri Konecnye31f2c52016-04-14 17:16:02 +020091
92.. code-block:: yaml
93
94 nova:
95 controller:
96 ....
97 message_queue:
98 engine: rabbitmq
99 members:
100 - host: 10.0.16.1
101 - host: 10.0.16.2
102 - host: 10.0.16.3
103 user: openstack
104 password: pwd
105 virtual_host: '/openstack'
106 ....
107
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300108Enable auditing filter, i.e: CADF:
Petr Michalecaa23dc02016-11-29 16:30:25 +0100109
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
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300121Enable CORS parameters:
Ondrej Smola25b53cb2017-04-28 10:56:19 +0200122
123.. code-block:: yaml
124
125 nova:
126 controller:
127 cors:
128 allowed_origin: https:localhost.local,http:localhost.local
129 expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
130 allow_methods: GET,PUT,POST,DELETE,PATCH
131 allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
132 allow_credentials: True
133 max_age: 86400
134
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300135Configuration of the ``policy.json`` file:
Dmitry Ukov3562a082017-05-04 00:00:48 +0400136
137.. code-block:: yaml
138
139 nova:
140 controller:
141 ....
142 policy:
143 context_is_admin: 'role:admin or role:administrator'
144 'compute:create': 'rule:admin_or_owner'
145 # Add key without value to remove line from policy.json
146 'compute:create:attach_network':
Ondrej Smola25b53cb2017-04-28 10:56:19 +0200147
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300148Enable Barbican integration:
Oleg Iurchenko370c10d2017-10-19 14:03:37 +0300149
150.. code-block:: yaml
151
152 nova:
153 controller:
154 ....
155 barbican:
156 enabled: true
157
Jiri Broulik789179a2018-02-13 16:16:46 +0100158Enable cells update:
159
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300160.. note:: Useful when upgrading Openstack. To update cells to test
161 sync db agains duplicated production database.
Jiri Broulik789179a2018-02-13 16:16:46 +0100162
163.. code-block:: yaml
164
165 nova:
166 controller:
167 update_cells: true
168
Kirill Bespalov64617172017-07-11 14:43:14 +0300169
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300170Configuring TLS communications
171------------------------------
Kirill Bespalov64617172017-07-11 14:43:14 +0300172
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300173.. note:: By default system wide installed CA certs are used,
174 so ``cacert_file`` param is optional, as well as ``cacert``.
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300175
176- **RabbitMQ TLS**
Kirill Bespalov64617172017-07-11 14:43:14 +0300177
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300178 .. code-block:: yaml
Kirill Bespalov64617172017-07-11 14:43:14 +0300179
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300180 nova:
181 compute:
182 message_queue:
183 port: 5671
184 ssl:
185 enabled: True
186 (optional) cacert: cert body if the cacert_file does not exists
187 (optional) cacert_file: /etc/openstack/rabbitmq-ca.pem
188 (optional) version: TLSv1_2
Kirill Bespalov64617172017-07-11 14:43:14 +0300189
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300190- **MySQL TLS**
Kirill Bespalov64617172017-07-11 14:43:14 +0300191
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300192 .. code-block:: yaml
Kirill Bespalov64617172017-07-11 14:43:14 +0300193
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300194 nova:
195 controller:
196 database:
197 ssl:
198 enabled: True
199 (optional) cacert: cert body if the cacert_file does not exists
200 (optional) cacert_file: /etc/openstack/mysql-ca.pem
Kirill Bespalov64617172017-07-11 14:43:14 +0300201
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300202- **Openstack HTTPS API**
203
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300204 Set the ``https`` as protocol at ``nova:compute`` and
205 ``nova:controller`` sections :
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300206
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300207 .. code-block:: yaml
Kirill Bespalov64617172017-07-11 14:43:14 +0300208
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300209 nova:
210 controller :
211 identity:
212 protocol: https
213 (optional) cacert_file: /etc/openstack/proxy.pem
214 network:
215 protocol: https
216 (optional) cacert_file: /etc/openstack/proxy.pem
217 glance:
218 protocol: https
219 (optional) cacert_file: /etc/openstack/proxy.pem
Kirill Bespalov64617172017-07-11 14:43:14 +0300220
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300221 .. code-block:: yaml
Kirill Bespalov64617172017-07-11 14:43:14 +0300222
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300223 nova:
224 compute:
225 identity:
226 protocol: https
227 (optional) cacert_file: /etc/openstack/proxy.pem
228 network:
229 protocol: https
230 (optional) cacert_file: /etc/openstack/proxy.pem
231 image:
232 protocol: https
233 (optional) cacert_file: /etc/openstack/proxy.pem
234 ironic:
235 protocol: https
236 (optional) cacert_file: /etc/openstack/proxy.pem
Kirill Bespalov64617172017-07-11 14:43:14 +0300237
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300238.. note:: Barbican, Cinder, and placement url endpoints are discovering
239 using service catalog.
Kirill Bespalov64617172017-07-11 14:43:14 +0300240
Filip Pytloun4a72d792015-10-06 16:28:32 +0200241Compute nodes
242-------------
243
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300244Nova controller services on compute node:
Filip Pytloun4a72d792015-10-06 16:28:32 +0200245
246.. code-block:: yaml
247
248 nova:
249 compute:
250 version: juno
251 enabled: true
Dmitry Stremkovskiy2bcba8d2017-07-30 21:43:59 +0300252 cross_az_attach: false
Dmitry Stremkovskiy35e53b72017-07-29 12:50:39 +0300253 disk_cachemodes: network=writeback,block=none
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100254 availability_zone: availability_zone_01
Damian Szelugae1922412017-04-18 16:36:46 +0200255 aggregates:
256 - hosts_with_fc
257 - hosts_with_ssd
Filip Pytloun4a72d792015-10-06 16:28:32 +0200258 security_group: true
Petr Michalecf03e4882017-04-10 10:26:18 +0200259 resume_guests_state_on_host_boot: False
Michael Polenchuk159c2542018-06-09 15:31:51 +0400260 preallocate_images: space # Default is 'none'
Dmitry Stremkovskiy8a0ff512017-07-25 20:54:13 +0300261 my_ip: 10.1.0.16
Filip Pytloun4a72d792015-10-06 16:28:32 +0200262 bind:
263 vnc_address: 172.20.0.100
264 vnc_port: 6080
265 vnc_name: openstack.domain.com
266 vnc_protocol: http
267 database:
268 engine: mysql
269 host: 127.0.0.1
270 port: 3306
271 name: nova
272 user: nova
273 password: pwd
274 identity:
275 engine: keystone
276 host: 127.0.0.1
277 port: 35357
278 user: nova
279 password: pwd
280 tenant: service
281 message_queue:
282 engine: rabbitmq
283 host: 127.0.0.1
284 port: 5672
285 user: openstack
286 password: pwd
287 virtual_host: '/openstack'
288 image:
289 engine: glance
290 host: 127.0.0.1
291 port: 9292
292 network:
293 engine: neutron
294 host: 127.0.0.1
295 port: 9696
296 identity:
297 engine: keystone
298 host: 127.0.0.1
299 port: 35357
300 user: neutron
301 password: pwd
302 tenant: service
303 qemu:
304 max_files: 4096
305 max_processes: 4096
Dmitry Stremkovskiy96281f52017-07-26 00:39:22 +0300306 host: node-12.domain.tld
Filip Pytloun4a72d792015-10-06 16:28:32 +0200307
Vasyl Saienkocab3a902018-07-12 13:17:17 +0300308Compute with vmware driver. Each vmware cluster requires a separate process of nova-compute.
309Each process should have uniq host identifier. However multiple computes might be running on
310single host. It is not recommended to have multiple computes running on different hosts that
311manage the same vmware cluster. To achive this pacemaker/corosync or keepalived might be used.
312
313.. code-block:: yaml
314
315 nova:
316 compute:
317 compute_driver: vmwareapi.VMwareVCDriver
318 vmware:
319 host_username: vmware
320 host_password: vmware
321 cluster_name: vmware_cluster01
322 host_ip: 1.2.3.4
323
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300324Group and user to be used for QEMU processes run by the system instance:
kkalynovskyif50f0c02017-12-12 17:52:57 +0200325
326.. code-block:: yaml
327
328 nova:
329 compute:
330 enabled: true
331 ...
332 qemu:
333 user: nova
334 group: cinder
335 dynamic_ownership: 1
336
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300337Group membership for user nova (upgrade related):
Dmitry Stremkovskiy3cd6ba82017-07-25 17:15:36 +0300338
339.. code-block:: yaml
340
341 nova:
342 compute:
343 enabled: true
344 ...
345 user:
346 groups:
347 - libvirt
Filip Pytloun4a72d792015-10-06 16:28:32 +0200348
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300349Nova services on compute node with OpenContrail:
Filip Pytloun4a72d792015-10-06 16:28:32 +0200350
351.. code-block:: yaml
352
353 nova:
354 compute:
355 enabled: true
356 ...
357 networking: contrail
358
Oleksandr Bryndziibb8abfe2018-09-28 22:21:43 +0000359Nova services on compute node with memcached caching and security strategy:
Filip Pytloun4a72d792015-10-06 16:28:32 +0200360
361.. code-block:: yaml
362
363 nova:
364 compute:
365 enabled: true
366 ...
367 cache:
368 engine: memcached
369 members:
370 - host: 127.0.0.1
371 port: 11211
372 - host: 127.0.0.1
373 port: 11211
Oleksandr Bryndziibb8abfe2018-09-28 22:21:43 +0000374 security:
375 enabled: true
376 strategy: ENCRYPT
377 secret_key: secret
Filip Pytloun4a72d792015-10-06 16:28:32 +0200378
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300379Client-side RabbitMQ HA setup:
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200380
381.. code-block:: yaml
382
383 nova:
Kirill Bespalov64617172017-07-11 14:43:14 +0300384 compute:
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200385 ....
386 message_queue:
387 engine: rabbitmq
388 members:
389 - host: 10.0.16.1
390 - host: 10.0.16.2
391 - host: 10.0.16.3
392 user: openstack
393 password: pwd
394 virtual_host: '/openstack'
395 ....
396
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300397Nova with ephemeral configured with Ceph:
maxstack39e6aca2016-05-04 13:50:13 +0000398
399.. code-block:: yaml
400
401 nova:
402 compute:
403 enabled: true
404 ...
405 ceph:
406 ephemeral: yes
407 rbd_pool: nova
408 rbd_user: nova
409 secret_uuid: 03006edd-d957-40a3-ac4c-26cd254b3731
Kalynovskyi0bc79692017-07-21 16:22:09 +0300410 ....
maxstack39e6aca2016-05-04 13:50:13 +0000411
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300412Nova with ephemeral configured with LVM:
Kalynovskyi0bc79692017-07-21 16:22:09 +0300413
414.. code-block:: yaml
415
416 nova:
417 compute:
418 enabled: true
419 ...
420 lvm:
421 ephemeral: yes
422 images_volume_group: nova_vg
423
424 linux:
425 storage:
426 lvm:
427 nova_vg:
428 name: nova_vg
429 devices:
430 - /dev/sdf
431 - /dev/sdd
432 - /dev/sdg
433 - /dev/sde
434 - /dev/sdc
435 - /dev/sdj
436 - /dev/sdh
maxstack39e6aca2016-05-04 13:50:13 +0000437
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300438Enable Barbican integration:
Oleg Iurchenko370c10d2017-10-19 14:03:37 +0300439
440.. code-block:: yaml
441
442 nova:
443 compute:
444 ....
445 barbican:
446 enabled: true
447
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300448Nova metadata custom bindings:
Vasyl Saienko2d591282018-02-05 14:19:02 +0200449
450.. code-block:: yaml
451
452 nova:
453 controller:
454 enabled: true
455 ...
456 metadata:
457 bind:
458 address: 1.2.3.4
459 port: 8776
460
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100461Client role
462-----------
463
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300464Nova configured with NFS:
Dmitry Stremkovskiy665c7282017-07-05 17:36:27 +0300465
466.. code-block:: yaml
467
468 nova:
469 compute:
470 instances_path: /mnt/nova/instances
471
472 linux:
473 storage:
474 enabled: true
475 mount:
476 nfs_nova:
477 enabled: true
478 path: ${nova:compute:instances_path}
479 device: 172.31.35.145:/data
480 file_system: nfs
481 opts: rw,vers=3
482
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300483Nova flavors:
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100484
485.. code-block:: yaml
486
487 nova:
488 client:
489 enabled: true
490 server:
491 identity:
492 flavor:
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100493 flavor1:
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100494 flavor_id: 10
495 ram: 4096
496 disk: 10
497 vcpus: 1
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100498 flavor2:
499 flavor_id: auto
500 ram: 4096
501 disk: 20
502 vcpus: 2
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100503 identity1:
504 flavor:
505 ...
506
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300507Availability zones:
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100508
509.. code-block:: yaml
510
511 nova:
512 client:
513 enabled: true
514 server:
515 identity:
516 availability_zones:
517 - availability_zone_01
518 - availability_zone_02
519
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300520Aggregates:
Damian Szeluga5dca0f02017-04-13 17:27:15 +0200521
522.. code-block:: yaml
523
524 nova:
525 client:
526 enabled: true
527 server:
528 identity:
529 aggregates:
530 - aggregate1
531 - aggregate2
532
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300533Upgrade levels:
Dmitry Stremkovskiy91f45852017-07-18 16:22:31 +0300534
535.. code-block:: yaml
536
537 nova:
538 controller:
539 upgrade_levels:
540 compute: juno
541
542 nova:
543 compute:
544 upgrade_levels:
545 compute: juno
546
Petr Jedinýd855ef22017-03-06 22:24:33 +0100547SR-IOV
Jakub Pavlik39a05942017-02-13 23:03:08 +0100548------
549
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300550Add ``PciPassthroughFilter`` into scheduler filters and NICs on
551specific compute nodes:
Jakub Pavlik39a05942017-02-13 23:03:08 +0100552
553.. code-block:: yaml
554
555 nova:
556 controller:
557 sriov: true
sandriichenko4fe321d2018-01-22 17:34:06 +0000558 scheduler_default_filters: "DifferentHostFilter,SameHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter"
Jakub Pavlik39a05942017-02-13 23:03:08 +0100559
560 nova:
561 compute:
562 sriov:
563 nic_one:
564 devname: eth1
565 physical_network: physnet1
566
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100567CPU pinning & Hugepages
568-----------------------
569
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300570CPU pinning of virtual machine instances to dedicated physical
571CPU cores. Hugepages mount point for libvirt.
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100572
573.. code-block:: yaml
574
575 nova:
576 controller:
sandriichenko4fe321d2018-01-22 17:34:06 +0000577 scheduler_default_filters: "DifferentHostFilter,SameHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,NUMATopologyFilter,AggregateInstanceExtraSpecsFilter"
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100578
579 nova:
580 compute:
581 vcpu_pin_set: 2,3,4,5
582 hugepages:
583 mount_points:
584 - path: /mnt/hugepages_1GB
585 - path: /mnt/hugepages_2MB
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100586
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200587Custom Scheduler filters
588------------------------
589
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300590If you have a custom filter, that needs to be included in the
591scheduler, then you can include it like so:
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200592
593.. code-block:: yaml
594
595 nova:
596 controller:
597 scheduler_custom_filters:
598 - my_custom_driver.nova.scheduler.filters.my_custom_filter.MyCustomFilter
599
600 # Then add your custom filter on the end (make sure to include all other ones that you need as well)
sandriichenko4fe321d2018-01-22 17:34:06 +0000601 scheduler_default_filters: "DifferentHostFilter,SameHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter,MyCustomFilter"
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200602
Michel Nederlofeb566f62017-04-21 15:37:47 +0200603Hardware Trip/Unmap Support
604---------------------------
605
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300606To enable TRIM support for ephemeral images (thru nova managed
607images), libvirt has this option:
Michel Nederlofeb566f62017-04-21 15:37:47 +0200608
609.. code-block:: yaml
610
611 nova:
612 compute:
613 libvirt:
614 hw_disk_discard: unmap
615
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300616To actually utilize this feature, the following metadata must be
617set on the image as well, so the SCSI unmap is supported:
Michel Nederlofeb566f62017-04-21 15:37:47 +0200618
619.. code-block:: bash
620
621 glance image-update --property hw_scsi_model=virtio-scsi <image>
622 glance image-update --property hw_disk_bus=scsi <image>
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100623
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000624Scheduler Host Manager
625----------------------
626
627Specify a custom host manager.
628
Thom Gerdesec00afd2017-04-07 18:06:59 +0000629libvirt CPU mode
630----------------
631
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300632Allow setting the model of CPU that is exposed to a VM. This
633allows for better support live migration between hypervisors with
634different hardware, among other things. Defaults to host-passthrough.
Jakub Pavlik7046b9c2017-09-19 12:04:19 +0200635
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000636.. code-block:: yaml
637
638 nova:
639 controller:
640 scheduler_host_manager: ironic_host_manager
641
Thom Gerdesec00afd2017-04-07 18:06:59 +0000642 compute:
643 cpu_mode: host-model
644
Dzmitry Stremkouski7da9bf12018-04-25 22:30:37 +0200645Nova compute cpu model
646----------------------
647
648.. code-block:: yaml
649
650 nova:
651 compute:
652 cpu_mode: custom
653 libvirt:
654 cpu_model: IvyBridge
655
656
Michel Nederloff7eefb22017-07-10 11:14:33 +0200657Nova compute workarounds
658------------------------
659
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300660Live snapshotting is disabled by default in nova. To enable
661this, it needs a manual switch.
Michel Nederloff7eefb22017-07-10 11:14:33 +0200662
663From manual:
664
665.. code-block:: yaml
666
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300667 When using libvirt 1.2.2 live snapshots fail intermittently under load
668 (likely related to concurrent libvirt/qemu operations). This config
669 option provides a mechanism to disable live snapshot, in favor of cold
670 snapshot, while this is resolved. Cold snapshot causes an instance
671 outage while the guest is going through the snapshotting process.
672
673 For more information, refer to the bug report:
674
675 https://bugs.launchpad.net/nova/+bug/1334398
Michel Nederloff7eefb22017-07-10 11:14:33 +0200676
677Configurable pillar data:
678
679.. code-block:: yaml
680
681 nova:
682 compute:
Michel Nederlofe322ebb2017-07-10 12:29:21 +0200683 workaround:
Michel Nederloff7eefb22017-07-10 11:14:33 +0200684 disable_libvirt_livesnapshot: False
685
Michel Nederlofb51a5142017-06-27 08:31:35 +0200686Config drive options
687--------------------
688
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300689See example below on how to configure the options for the
690config drive:
Michel Nederlofb51a5142017-06-27 08:31:35 +0200691
692.. code-block:: yaml
693
694 nova:
695 compute:
696 config_drive:
697 forced: True # Default: True
698 cdrom: True # Default: False
699 format: iso9660 # Default: vfat
700 inject_password: False # Default: False
701
Michel Nederloff81919b2017-11-20 09:37:07 +0100702Number of concurrent live migrates
703----------------------------------
704
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300705Default is to have no concurrent live migrations (so 1
706live-migration at a time).
Michel Nederloff81919b2017-11-20 09:37:07 +0100707
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300708Excerpt from config options page
709https://docs.openstack.org/ocata/config-reference/compute/config-options.html:
Michel Nederloff81919b2017-11-20 09:37:07 +0100710
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300711Maximum number of live migrations to run concurrently. This limit is
712enforced to avoid outbound live migrations overwhelming the host/network
713and causing failures. It is not recommended that you change this unless
714you are very sure that doing so is safe and stable in your environment.
Michel Nederloff81919b2017-11-20 09:37:07 +0100715
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300716Possible values:
Michel Nederloff81919b2017-11-20 09:37:07 +0100717
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300718- 0 : treated as unlimited.
719- Negative value defaults to 0.
720- Any positive integer representing maximum number of live migrations
721 to run concurrently.
Michel Nederloff81919b2017-11-20 09:37:07 +0100722
723To configure this option:
724
725.. code-block:: yaml
726
727 nova:
728 compute:
729 max_concurrent_live_migrations: 1 # (1 is the default)
730
Sergio Lystopad9d31cba2018-05-15 11:29:11 +0300731Live migration with auto converge
732----------------------------------
733
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300734Auto converge throttles down CPU if a progress of on-going live
735migration is slow
736https://docs.openstack.org/ocata/config-reference/compute/config-options.html:
Sergio Lystopad9d31cba2018-05-15 11:29:11 +0300737
738.. code-block:: yaml
739
740 nova:
741 compute:
742 libvirt:
743 live_migration_permit_auto_converge: False # (False is the default)
744
745.. code-block:: yaml
746
747 nova:
748 controller:
749 libvirt:
750 live_migration_permit_auto_converge: False # (False is the default)
751
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400752Enhanced logging with logging.conf
753----------------------------------
754
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300755By default ``logging.conf`` is disabled.
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400756
757That is possible to enable per-binary logging.conf with new variables:
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400758
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300759* ``openstack_log_appender``
760 Set to true to enable log_config_append for all OpenStack services
761
762* ``openstack_fluentd_handler_enabled``
763 Set to true to enable FluentHandler for all Openstack services
764
765* ``openstack_ossyslog_handler_enabled``
766 Set to true to enable OSSysLogHandler for all Openstack services
767
768Only ``WatchedFileHandler``, ``OSSysLogHandler``, and ``FluentHandler``
769are available.
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400770
Dmitry Kalashnik8da249c2018-01-16 17:58:00 +0400771Also it is possible to configure this with pillar:
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400772
773.. code-block:: yaml
774
775 nova:
776 controller:
777 logging:
778 log_appender: true
779 log_handlers:
780 watchedfile:
781 enabled: true
782 fluentd:
783 enabled: true
Oleksii Chupryn99e35032018-02-06 01:59:40 +0200784 ossyslog:
785 enabled: true
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400786
787 compute:
788 logging:
789 log_appender: true
790 log_handlers:
791 watchedfile:
792 enabled: true
793 fluentd:
794 enabled: true
Oleksii Chupryn99e35032018-02-06 01:59:40 +0200795 ossyslog:
796 enabled: true
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000797
Vasyl Saienko7243a952018-05-11 21:26:54 +0300798The log level might be configured per logger by using the
799following pillar structure:
800
801.. code-block:: yaml
802
803 nova:
804 compute:
805 logging:
806 loggers:
807 <logger_name>:
808 level: WARNING
809
810 nova:
811 compute:
812 logging:
813 loggers:
814 <logger_name>:
815 level: WARNING
816
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000817Configure syslog parameters for libvirtd
818----------------------------------------
819
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300820To configure syslog parameters for libvirtd the below pillar
821structure should be used with values which are supported
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000822by libvirtd. These values might be known from the documentation.
823
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300824.. code-block:: yaml
825
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000826 nova:
827 compute:
828 libvirt:
829 logging:
830 level: 3
831 filters: '3:remote 4:event'
832 outputs: '3:syslog:libvirtd'
833 buffer_size: 64
834
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300835Logging controls:
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000836
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300837Logging level: 4 errors, 3 warnings, 2 information, 1 debug
838basically 1 will log everything possible ``log_level = 3``
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000839
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300840Logging filters:
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000841
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300842A filter allows to select a different logging level for a given category
843of logs.
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000844
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300845The format for a filter is one of:
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000846
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300847* ``x:name``
848* ``x:+name``
849 where name is a string which is matched against source file name,
850 e.g., ``remote``, ``qemu``, or ``util/json``, the optional ``+`` prefix
851 tells libvirt to log stack trace for each message matching name,
852 and x is the minimal level where matching messages should be logged:
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000853
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300854* ``1: DEBUG``
855* ``2: INFO``
856* ``3: WARNING``
857* ``4: ERROR``
858
859Multiple filter can be defined in a single @filters, they just
860need to be separated by spaces.
861
862For example, to only get warning or errors from the remote layer
863and only errors from the event layer: ``log_filters="3:remote 4:event``
864
865Logging outputs:
866
867An output is one of the places to save logging information
868The format for an output can be:
869
870* ``x:stderr``
871 Output goes to stderr
872
873* ``x:syslog:name``
874 Use syslog for the output and use the given name as the ident
875
876* ``x:file:file_path``
877 output to a file, with the given filepath
878
879 In all case the x prefix is the minimal level, acting as a filter
880
881* ``1: DEBUG``
882* ``2: INFO``
883* ``3: WARNING``
884* ``4: ERROR``
885
886Multiple output can be defined, they just need to be separated by spaces.
887For example, to log all warnings and errors to syslog under the libvirt
888dident: ``log_outputs="3:syslog:libvirtd``
889
890Log debug buffer size: default 64
891The daemon keeps an internal debug log buffer which will be dumped
892in case of crash or upon receiving a ``SIGUSR2`` signal. This setting
893allows to override the default buffer size in kilobytes.
894If value is ``0`` or less the debug log buffer is deactivated
895``log_buffer_size = 64``
896
897To configure the logging parameters for QEMU, the below pillar
898structure and logging parameters should be used:
899
900.. code-block:: yaml
901
902 nova:
903 compute:
904 qemu:
905 logging:
906 handler: logd
907 virtlog:
908 enabled: true
909 level: 4
910 filters: '3:remote 3:event'
911 outputs: '4:syslog:virtlogd'
912 max_clients: 512
913 max_size: 2097100
914 max_backups: 2
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000915
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +0300916Inject password to VM
917---------------------
918
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300919By default nova blocks up any inject to VM because
920``inject_partition`` param is equal to ``-2``.
921If you want to inject password to VM, you will need to
922define ``inject_partition`` greater or equal to ``-1`` and
923define ``inject_password`` to ``True``
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +0300924
925For example:
926
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300927.. code-block:: yaml
928
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +0300929 nova:
930 compute:
931 inject_partition: '-1'
932 inject_password: True
933
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300934Allow the injection of an admin password for instance only at
935``create`` and ``rebuild`` process.
936
937There is no agent needed within the image to do this. If *libguestfs* is
938available on the host, it will be used. Otherwise *nbd* is used. The file
939system of the image will be mounted and the admin password, which is provided
940in the REST API call will be injected as password for the root user. If no
941root user is available, the instance won't be launched and an error is thrown.
942Be aware that the injection is *not* possible when the instance gets launched
943from a volume.
944
945Possible values:
946
947* ``True``
948 Allows the injection
949
950* ``False`` (default)
951 Disallows the injection. Any via the REST API provided
952 admin password will be silently ignored.
953
954Related options:
955
956* ``inject_partition``
957 Decides about the discovery and usage of the file system.
958 It also can disable the injection at all.
959 (boolean value)
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +0300960
961You can read more about injecting the administrator password here:
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300962https://docs.openstack.org/nova/queens/admin/admin-password-injection.html
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +0300963
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +0300964Enable libvirt control channel over TLS
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300965---------------------------------------
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +0300966
967By default TLS is disabled.
968
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300969Enable TLS transport:
970
971.. code-block:: yaml
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +0300972
973 compute:
974 libvirt:
975 tls:
976 enabled: True
977
978You able to set custom certificates in pillar:
979
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300980.. code-block:: yaml
981
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +0300982 nova:
983 compute:
984 libvirt:
985 tls:
986 key: (certificate content)
987 cert: (certificate content)
988 cacert: (certificate content)
989 client:
990 key: (certificate content)
991 cert: (certificate content)
992
993You can read more about live migration over TLS here:
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300994https://wiki.libvirt.org/page/TLSCreateServerCerts
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +0300995
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +0300996Enable transport + authentication for VNC over TLS
997---------------------
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +0300998# Only for Queens. Communication between noVNC proxy service and QEMU
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +0300999
1000By default communication between nova-novncproxy and qemu service is unsecure.
1001
1002compute:
1003 qemu:
1004 vnc:
1005 tls:
1006 enabled: True
1007
1008controller:
1009 novncproxy:
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001010 # This section responsible for communication between noVNC proxy and client machine
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001011 tls:
1012 enabled: True
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001013 # This section responsible for communication between nova-novncproxy and qemu service
1014 vencrypt:
1015 tls:
1016 enabled: True
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001017
1018You able to set custom certificates in pillar:
1019
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001020nova:
1021 compute:
1022 qemu:
1023 vnc:
1024 tls:
1025 cacert (certificate content)
1026 cert (certificate content)
1027 key (certificate content)
1028
1029nova:
1030 controller:
1031 novncproxy:
1032 tls:
1033 server:
1034 cert (certificate content)
1035 key (certificate content)
1036 vencrypt:
1037 tls:
1038 cacert (certificate content)
1039 cert (certificate content)
1040 key (certificate content)
1041
1042
1043You can read more about it here:
1044 https://docs.openstack.org/nova/queens/admin/remote-console-access.html
1045
1046Enable communication between noVNC proxy and client machine over TLS
1047---------------------
1048
1049By default communication between noVNC proxy and client machine is unsecure.
1050
1051 controller:
1052 novncproxy:
1053 tls:
1054 enabled: True
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001055
1056 nova:
1057 controller:
1058 novncproxy:
1059 tls:
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001060 server:
1061 cert (certificate content)
1062 key (certificate content)
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001063
1064You can read more about it here:
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001065 https://docs.openstack.org/mitaka/config-reference/dashboard/configure.html
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001066
Oleksandr Shyshko55eeac72018-08-03 18:23:28 +03001067Enable x509 and ssl communication between Nova and Galera cluster.
1068---------------------
1069By default communication between Nova and Galera is unsecure.
1070
Oleksandr Shyshkocbe87352018-09-07 13:42:57 +03001071nova:
1072 controller:
1073 database:
1074 x509:
1075 enabled: True
1076
Oleksandr Shyshko55eeac72018-08-03 18:23:28 +03001077You able to set custom certificates in pillar:
Oleksandr Shyshko55eeac72018-08-03 18:23:28 +03001078
1079nova:
1080 controller:
1081 database:
1082 x509:
Oleksandr Shyshkocbe87352018-09-07 13:42:57 +03001083 cacert: (certificate content)
1084 cert: (certificate content)
1085 key: (certificate content)
Oleksandr Shyshko55eeac72018-08-03 18:23:28 +03001086
1087You can read more about it here:
1088 https://docs.openstack.org/security-guide/databases/database-access-control.html
1089
Oleh Hryhorov63ee8452018-08-14 09:16:02 +00001090Upgrades
1091========
1092
1093Each openstack formula provide set of phases (logical bloks) that will help to
1094build flexible upgrade orchestration logic for particular components. The list
1095of phases might and theirs descriptions are listed in table below:
1096
1097+-------------------------------+------------------------------------------------------+
1098| State | Description |
1099+===============================+======================================================+
1100| <app>.upgrade.service_running | Ensure that all services for particular application |
1101| | are enabled for autostart and running |
1102+-------------------------------+------------------------------------------------------+
1103| <app>.upgrade.service_stopped | Ensure that all services for particular application |
1104| | disabled for autostart and dead |
1105+-------------------------------+------------------------------------------------------+
1106| <app>.upgrade.pkgs_latest | Ensure that packages used by particular application |
1107| | are installed to latest available version. |
1108| | This will not upgrade data plane packages like qemu |
1109| | and openvswitch as usually minimal required version |
1110| | in openstack services is really old. The data plane |
1111| | packages should be upgraded separately by `apt-get |
1112| | upgrade` or `apt-get dist-upgrade` |
1113| | Applying this state will not autostart service. |
1114+-------------------------------+------------------------------------------------------+
1115| <app>.upgrade.render_config | Ensure configuration is rendered actual version. +
1116+-------------------------------+------------------------------------------------------+
1117| <app>.upgrade.pre | We assume this state is applied on all nodes in the |
1118| | cloud before running upgrade. |
1119| | Only non destructive actions will be applied during |
1120| | this phase. Perform service built in service check |
1121| | like (keystone-manage doctor and nova-status upgrade)|
1122+-------------------------------+------------------------------------------------------+
1123| <app>.upgrade.upgrade.pre | Mostly applicable for data plane nodes. During this |
1124| | phase resources will be gracefully removed from |
1125| | current node if it is allowed. Services for upgraded |
1126| | application will be set to admin disabled state to |
1127| | make sure node will not participate in resources |
1128| | scheduling. For example on gtw nodes this will set |
1129| | all agents to admin disable state and will move all |
1130| | routers to other agents. |
1131+-------------------------------+------------------------------------------------------+
1132| <app>.upgrade.upgrade | This state will basically upgrade application on |
1133| | particular target. Stop services, render |
1134| | configuration, install new packages, run offline |
1135| | dbsync (for ctl), start services. Data plane should |
1136| | not be affected, only OpenStack python services. |
1137+-------------------------------+------------------------------------------------------+
1138| <app>.upgrade.upgrade.post | Add services back to scheduling. |
1139+-------------------------------+------------------------------------------------------+
1140| <app>.upgrade.post | This phase should be launched only when upgrade of |
1141| | the cloud is completed. Cleanup temporary files, |
1142| | perform other post upgrade tasks. |
1143+-------------------------------+------------------------------------------------------+
1144| <app>.upgrade.verify | Here we will do basic health checks (API CRUD |
1145| | operations, verify do not have dead network |
1146| | agents/compute services) |
1147+-------------------------------+------------------------------------------------------+
1148
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +01001149Documentation and Bugs
1150======================
1151
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001152* http://salt-formulas.readthedocs.io/
1153 Learn how to install and update salt-formulas
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +01001154
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001155* https://github.com/salt-formulas/salt-formula-nova/issues
1156 In the unfortunate event that bugs are discovered, report the issue to the
1157 appropriate issue tracker. Use the Github issue tracker for a specific salt
1158 formula
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +01001159
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001160* https://launchpad.net/salt-formulas
1161 For feature requests, bug reports, or blueprints affecting the entire
1162 ecosystem, use the Launchpad salt-formulas project
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +01001163
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001164* https://launchpad.net/~salt-formulas-users
1165 Join the salt-formulas-users team and subscribe to mailing list if required
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +01001166
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001167* https://github.com/salt-formulas/salt-formula-nova
1168 Develop the salt-formulas projects in the master branch and then submit pull
1169 requests against a specific formula
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +01001170
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001171* #salt-formulas @ irc.freenode.net
1172 Use this IRC channel in case of any questions or feedback which is always
1173 welcome