blob: fa1253fe3b021cb7746d06ec30c1315c41dd88a4 [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
Vasyl Saienko09b6ac32019-01-17 15:23:58 +020033 vif_plugging_timeout: 300
34 vif_plugging_is_fatal: false
Vasyl Saienko2adac3f2019-02-18 12:32:52 +020035 instance_build_timeout: 600
Dzmitry Stremkouski781f59e2020-01-30 18:29:29 +010036 use_cow_images: False
37 force_raw_images: True
38 snapshot_image_format: qcow2
39 images_type: default
Ivan Berezovskiyf1869a32019-11-14 20:17:58 +040040 concurrency:
41 lock_path: '/var/lib/nova/tmp'
sgarbuzcc02c7f2018-10-25 14:29:30 +030042 consoleauth:
43 token_ttl: 600
Filip Pytloun4a72d792015-10-06 16:28:32 +020044 bind:
45 public_address: 10.0.0.122
46 public_name: openstack.domain.com
47 novncproxy_port: 6080
48 database:
49 engine: mysql
50 host: 127.0.0.1
51 port: 3306
52 name: nova
53 user: nova
54 password: pwd
55 identity:
56 engine: keystone
57 host: 127.0.0.1
58 port: 35357
59 user: nova
60 password: pwd
61 tenant: service
Dzmitry Stremkouskifb2289a2019-05-26 01:20:42 +020062 interface: internal
63 valid_interfaces:
64 - internal
Filip Pytloun4a72d792015-10-06 16:28:32 +020065 message_queue:
66 engine: rabbitmq
67 host: 127.0.0.1
68 port: 5672
69 user: openstack
70 password: pwd
71 virtual_host: '/openstack'
Oleh Hryhorovf5093b82018-10-17 11:16:08 +000072 pci:
73 alias:
74 alias1:
75 device_type: "type-PF"
76 name: "a1"
77 product_id: "154d"
78 vendor_id: "8086"
Filip Pytloun4a72d792015-10-06 16:28:32 +020079 network:
80 engine: neutron
81 host: 127.0.0.1
82 port: 9696
Jakub Pavlik617a8962016-09-04 18:50:06 +020083 extension_sync_interval: 600
Filip Pytloun4a72d792015-10-06 16:28:32 +020084 identity:
85 engine: keystone
86 host: 127.0.0.1
87 port: 35357
88 user: neutron
89 password: pwd
90 tenant: service
91 metadata:
92 password: password
Petr Michalecaa23dc02016-11-29 16:30:25 +010093 audit:
94 enabled: false
Simon Pasquier8683b7a2017-02-03 16:00:16 +010095 osapi_max_limit: 500
Oleg Iurchenko370c10d2017-10-19 14:03:37 +030096 barbican:
97 enabled: true
Filip Pytloun4a72d792015-10-06 16:28:32 +020098
OlgaGusarenko9dd01c92018-07-31 00:49:30 +030099Nova services from custom package repository:
Filip Pytloun4a72d792015-10-06 16:28:32 +0200100
101.. code-block:: yaml
102
103 nova:
104 controller:
105 version: juno
106 source:
107 engine: pkg
108 address: http://...
109 ....
110
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300111Client-side RabbitMQ HA setup:
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200112
113.. code-block:: yaml
114
115 nova:
116 controller:
117 ....
118 message_queue:
119 engine: rabbitmq
120 members:
121 - host: 10.0.16.1
122 - host: 10.0.16.2
123 - host: 10.0.16.3
124 user: openstack
125 password: pwd
126 virtual_host: '/openstack'
127 ....
128
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300129Enable auditing filter, i.e: CADF:
Petr Michalecaa23dc02016-11-29 16:30:25 +0100130
131.. code-block:: yaml
132
133 nova:
134 controller:
Simon Pasquier6a3c8f72016-12-19 15:37:24 +0100135 audit:
Petr Michalecaa23dc02016-11-29 16:30:25 +0100136 enabled: true
137 ....
138 filter_factory: 'keystonemiddleware.audit:filter_factory'
139 map_file: '/etc/pycadf/nova_api_audit_map.conf'
140 ....
141
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300142Enable CORS parameters:
Ondrej Smola25b53cb2017-04-28 10:56:19 +0200143
144.. code-block:: yaml
145
146 nova:
147 controller:
148 cors:
149 allowed_origin: https:localhost.local,http:localhost.local
150 expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
151 allow_methods: GET,PUT,POST,DELETE,PATCH
152 allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
153 allow_credentials: True
154 max_age: 86400
155
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300156Configuration of the ``policy.json`` file:
Dmitry Ukov3562a082017-05-04 00:00:48 +0400157
158.. code-block:: yaml
159
160 nova:
161 controller:
162 ....
163 policy:
164 context_is_admin: 'role:admin or role:administrator'
165 'compute:create': 'rule:admin_or_owner'
166 # Add key without value to remove line from policy.json
167 'compute:create:attach_network':
Ondrej Smola25b53cb2017-04-28 10:56:19 +0200168
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300169Enable Barbican integration:
Oleg Iurchenko370c10d2017-10-19 14:03:37 +0300170
171.. code-block:: yaml
172
173 nova:
174 controller:
175 ....
176 barbican:
177 enabled: true
178
Oleh Hryhorovf5093b82018-10-17 11:16:08 +0000179Define aliases for PCI devices:
180.. code-block:: yaml
181
182 nova:
183 controller:
184 ...
185 pci:
186 alias:
187 alias1:
188 device_type: "type-PF"
189 name: "a1"
190 product_id: "154d"
191 vendor_id: "8086"
192
Jiri Broulik789179a2018-02-13 16:16:46 +0100193Enable cells update:
194
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300195.. note:: Useful when upgrading Openstack. To update cells to test
196 sync db agains duplicated production database.
Jiri Broulik789179a2018-02-13 16:16:46 +0100197
198.. code-block:: yaml
199
200 nova:
201 controller:
202 update_cells: true
203
Dzmitry Stremkouskib139f142019-11-03 10:36:46 +0100204Increase number of chunks for online db migrations:
205
206.. note:: This only should be done in offline as large number of
207 rows locked by this process may cause service outage, which
208 may not be expected.
209
210.. code-block:: yaml
211
212 nova:
213 controller:
214 db_migrations:
215 max_count: 5000000
Kirill Bespalov64617172017-07-11 14:43:14 +0300216
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300217Configuring TLS communications
218------------------------------
Kirill Bespalov64617172017-07-11 14:43:14 +0300219
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300220.. note:: By default system wide installed CA certs are used,
221 so ``cacert_file`` param is optional, as well as ``cacert``.
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300222
223- **RabbitMQ TLS**
Kirill Bespalov64617172017-07-11 14:43:14 +0300224
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300225 .. code-block:: yaml
Kirill Bespalov64617172017-07-11 14:43:14 +0300226
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300227 nova:
228 compute:
229 message_queue:
230 port: 5671
231 ssl:
232 enabled: True
233 (optional) cacert: cert body if the cacert_file does not exists
234 (optional) cacert_file: /etc/openstack/rabbitmq-ca.pem
235 (optional) version: TLSv1_2
Kirill Bespalov64617172017-07-11 14:43:14 +0300236
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300237- **MySQL TLS**
Kirill Bespalov64617172017-07-11 14:43:14 +0300238
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300239 .. code-block:: yaml
Kirill Bespalov64617172017-07-11 14:43:14 +0300240
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300241 nova:
242 controller:
243 database:
244 ssl:
245 enabled: True
246 (optional) cacert: cert body if the cacert_file does not exists
247 (optional) cacert_file: /etc/openstack/mysql-ca.pem
Kirill Bespalov64617172017-07-11 14:43:14 +0300248
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300249- **Openstack HTTPS API**
250
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300251 Set the ``https`` as protocol at ``nova:compute`` and
252 ``nova:controller`` sections :
Kirill Bespalova0eaca72017-11-20 13:40:42 +0300253
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300254 .. code-block:: yaml
Kirill Bespalov64617172017-07-11 14:43:14 +0300255
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300256 nova:
257 controller :
258 identity:
259 protocol: https
260 (optional) cacert_file: /etc/openstack/proxy.pem
261 network:
262 protocol: https
263 (optional) cacert_file: /etc/openstack/proxy.pem
264 glance:
265 protocol: https
266 (optional) cacert_file: /etc/openstack/proxy.pem
Kirill Bespalov64617172017-07-11 14:43:14 +0300267
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300268 .. code-block:: yaml
Kirill Bespalov64617172017-07-11 14:43:14 +0300269
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300270 nova:
271 compute:
272 identity:
273 protocol: https
274 (optional) cacert_file: /etc/openstack/proxy.pem
275 network:
276 protocol: https
277 (optional) cacert_file: /etc/openstack/proxy.pem
278 image:
279 protocol: https
280 (optional) cacert_file: /etc/openstack/proxy.pem
281 ironic:
282 protocol: https
283 (optional) cacert_file: /etc/openstack/proxy.pem
Kirill Bespalov64617172017-07-11 14:43:14 +0300284
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300285.. note:: Barbican, Cinder, and placement url endpoints are discovering
286 using service catalog.
Kirill Bespalov64617172017-07-11 14:43:14 +0300287
Martin Polreich65e2a142019-12-17 14:19:44 +0100288Change default service policy configuration:
289--------------------------------------------
290
291.. code-block:: yaml
292
293 nova:
294 controller:
295 policy:
296 'context_is_admin': 'role:admin or role:administrator'
297 'compute:create': 'rule:admin_or_owner'
298 # Add key without value to remove line from policy.json
299 'compute:create:attach_network':
300
Taras Khlivnyak00ce6a22021-02-03 12:13:56 +0200301Configure host_subset_size
302--------------------------
303
304.. code-block:: yaml
305
306 nova:
307 controller:
308 host_subset_size: 1
309
Martin Polreich65e2a142019-12-17 14:19:44 +0100310
Filip Pytloun4a72d792015-10-06 16:28:32 +0200311Compute nodes
312-------------
313
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300314Nova controller services on compute node:
Filip Pytloun4a72d792015-10-06 16:28:32 +0200315
316.. code-block:: yaml
317
318 nova:
319 compute:
320 version: juno
321 enabled: true
Mykyta Karpin5ef9f982019-02-07 18:40:00 +0200322 timeout_nbd: 10
323 heal_instance_info_cache_interval: 60
Dmitry Stremkovskiy2bcba8d2017-07-30 21:43:59 +0300324 cross_az_attach: false
Dmitry Stremkovskiy35e53b72017-07-29 12:50:39 +0300325 disk_cachemodes: network=writeback,block=none
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100326 availability_zone: availability_zone_01
Damian Szelugae1922412017-04-18 16:36:46 +0200327 aggregates:
328 - hosts_with_fc
329 - hosts_with_ssd
Filip Pytloun4a72d792015-10-06 16:28:32 +0200330 security_group: true
Petr Michalecf03e4882017-04-10 10:26:18 +0200331 resume_guests_state_on_host_boot: False
Michael Polenchuk159c2542018-06-09 15:31:51 +0400332 preallocate_images: space # Default is 'none'
Dmitry Stremkovskiy8a0ff512017-07-25 20:54:13 +0300333 my_ip: 10.1.0.16
Vasyl Saienko09b6ac32019-01-17 15:23:58 +0200334 vif_plugging_timeout: 300
335 vif_plugging_is_fatal: false
Ivan Berezovskiyf1869a32019-11-14 20:17:58 +0400336 concurrency:
337 lock_path: '/var/lib/nova/tmp'
Filip Pytloun4a72d792015-10-06 16:28:32 +0200338 bind:
339 vnc_address: 172.20.0.100
340 vnc_port: 6080
341 vnc_name: openstack.domain.com
342 vnc_protocol: http
343 database:
344 engine: mysql
345 host: 127.0.0.1
346 port: 3306
347 name: nova
348 user: nova
349 password: pwd
350 identity:
351 engine: keystone
352 host: 127.0.0.1
353 port: 35357
354 user: nova
355 password: pwd
356 tenant: service
357 message_queue:
358 engine: rabbitmq
359 host: 127.0.0.1
360 port: 5672
361 user: openstack
362 password: pwd
363 virtual_host: '/openstack'
364 image:
365 engine: glance
366 host: 127.0.0.1
367 port: 9292
Oleh Hryhorovf5093b82018-10-17 11:16:08 +0000368 pci:
369 alias:
370 alias1:
371 device_type: "type-PF"
372 name: "a1"
373 product_id: "154d"
374 vendor_id: "8086"
Oleksandr Pidrepnyi14f08272019-02-20 12:48:17 +0200375 passthrough_whitelist:
376 - vendor_id: "10de"
377 product_id: "1db4"
Filip Pytloun4a72d792015-10-06 16:28:32 +0200378 network:
379 engine: neutron
380 host: 127.0.0.1
381 port: 9696
382 identity:
383 engine: keystone
384 host: 127.0.0.1
385 port: 35357
386 user: neutron
387 password: pwd
388 tenant: service
389 qemu:
390 max_files: 4096
391 max_processes: 4096
Dmitry Stremkovskiy96281f52017-07-26 00:39:22 +0300392 host: node-12.domain.tld
Filip Pytloun4a72d792015-10-06 16:28:32 +0200393
Vasyl Saienkocab3a902018-07-12 13:17:17 +0300394Compute with vmware driver. Each vmware cluster requires a separate process of nova-compute.
395Each process should have uniq host identifier. However multiple computes might be running on
396single host. It is not recommended to have multiple computes running on different hosts that
397manage the same vmware cluster. To achive this pacemaker/corosync or keepalived might be used.
398
399.. code-block:: yaml
400
401 nova:
402 compute:
403 compute_driver: vmwareapi.VMwareVCDriver
404 vmware:
405 host_username: vmware
406 host_password: vmware
407 cluster_name: vmware_cluster01
408 host_ip: 1.2.3.4
409
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300410Group and user to be used for QEMU processes run by the system instance:
kkalynovskyif50f0c02017-12-12 17:52:57 +0200411
412.. code-block:: yaml
413
414 nova:
415 compute:
416 enabled: true
417 ...
418 qemu:
419 user: nova
420 group: cinder
421 dynamic_ownership: 1
422
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300423Group membership for user nova (upgrade related):
Dmitry Stremkovskiy3cd6ba82017-07-25 17:15:36 +0300424
425.. code-block:: yaml
426
427 nova:
428 compute:
429 enabled: true
430 ...
431 user:
432 groups:
433 - libvirt
Filip Pytloun4a72d792015-10-06 16:28:32 +0200434
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300435Nova services on compute node with OpenContrail:
Filip Pytloun4a72d792015-10-06 16:28:32 +0200436
437.. code-block:: yaml
438
439 nova:
440 compute:
441 enabled: true
442 ...
443 networking: contrail
444
Oleksandr Bryndziibb8abfe2018-09-28 22:21:43 +0000445Nova services on compute node with memcached caching and security strategy:
Filip Pytloun4a72d792015-10-06 16:28:32 +0200446
447.. code-block:: yaml
448
449 nova:
450 compute:
451 enabled: true
452 ...
453 cache:
454 engine: memcached
455 members:
456 - host: 127.0.0.1
457 port: 11211
458 - host: 127.0.0.1
459 port: 11211
Oleksandr Bryndziibb8abfe2018-09-28 22:21:43 +0000460 security:
461 enabled: true
462 strategy: ENCRYPT
463 secret_key: secret
Filip Pytloun4a72d792015-10-06 16:28:32 +0200464
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300465Client-side RabbitMQ HA setup:
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200466
467.. code-block:: yaml
468
469 nova:
Kirill Bespalov64617172017-07-11 14:43:14 +0300470 compute:
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200471 ....
472 message_queue:
473 engine: rabbitmq
474 members:
475 - host: 10.0.16.1
476 - host: 10.0.16.2
477 - host: 10.0.16.3
478 user: openstack
479 password: pwd
480 virtual_host: '/openstack'
481 ....
482
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300483Nova with ephemeral configured with Ceph:
maxstack39e6aca2016-05-04 13:50:13 +0000484
485.. code-block:: yaml
486
487 nova:
488 compute:
489 enabled: true
490 ...
491 ceph:
492 ephemeral: yes
493 rbd_pool: nova
494 rbd_user: nova
495 secret_uuid: 03006edd-d957-40a3-ac4c-26cd254b3731
Kalynovskyi0bc79692017-07-21 16:22:09 +0300496 ....
maxstack39e6aca2016-05-04 13:50:13 +0000497
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300498Nova with ephemeral configured with LVM:
Kalynovskyi0bc79692017-07-21 16:22:09 +0300499
500.. code-block:: yaml
501
502 nova:
503 compute:
504 enabled: true
505 ...
506 lvm:
507 ephemeral: yes
508 images_volume_group: nova_vg
509
510 linux:
511 storage:
512 lvm:
513 nova_vg:
514 name: nova_vg
515 devices:
516 - /dev/sdf
517 - /dev/sdd
518 - /dev/sdg
519 - /dev/sde
520 - /dev/sdc
521 - /dev/sdj
522 - /dev/sdh
maxstack39e6aca2016-05-04 13:50:13 +0000523
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300524Enable Barbican integration:
Oleg Iurchenko370c10d2017-10-19 14:03:37 +0300525
526.. code-block:: yaml
527
528 nova:
529 compute:
530 ....
531 barbican:
532 enabled: true
533
Oleksandr Pidrepnyi14f08272019-02-20 12:48:17 +0200534Define aliases for a PCI passthrough devices:
Oleh Hryhorovf5093b82018-10-17 11:16:08 +0000535.. code-block:: yaml
536
537 nova:
538 compute:
539 ...
540 pci:
541 alias:
542 alias1:
543 device_type: "type-PF"
544 name: "a1"
545 product_id: "154d"
546 vendor_id: "8086"
547
Oleksandr Pidrepnyi14f08272019-02-20 12:48:17 +0200548Define white list of PCI devices available to VMs:
549.. code-block:: yaml
550
551 nova:
552 compute:
553 ...
554 pci:
555 passthrough_whitelist:
556 - vendor_id: "10de"
557 product_id: "1db4"
558
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300559Nova metadata custom bindings:
Vasyl Saienko2d591282018-02-05 14:19:02 +0200560
561.. code-block:: yaml
562
563 nova:
564 controller:
565 enabled: true
566 ...
567 metadata:
568 bind:
569 address: 1.2.3.4
570 port: 8776
571
Oleh Hryhorov08482aa2018-11-19 14:07:47 +0200572Define multipath for nova compute:
573
574.. code-block:: yaml
575
576 nova:
577 compute:
578 ....
579 libvirt:
580 volume_use_multipath: True
581
Oleh Hryhorovce1f2142019-03-06 17:00:00 +0000582To disable or enable StrictHostKeyChecking and discover
583compute nodes fingerprints the below pillar should be used:
584
585.. code-block:: yaml
586
587 nova:
588 compute:
589 ....
590 openssh:
591 stricthostkeychecking: True
592 discover_compute_hosts: True
593
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100594Client role
595-----------
596
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300597Nova configured with NFS:
Dmitry Stremkovskiy665c7282017-07-05 17:36:27 +0300598
599.. code-block:: yaml
600
601 nova:
602 compute:
603 instances_path: /mnt/nova/instances
Valeriy Sakharov1ff31dc2022-09-29 14:37:33 +0400604 image_cache_manager_interval: 2400
Dmitry Stremkovskiy665c7282017-07-05 17:36:27 +0300605
606 linux:
607 storage:
608 enabled: true
609 mount:
610 nfs_nova:
611 enabled: true
612 path: ${nova:compute:instances_path}
613 device: 172.31.35.145:/data
614 file_system: nfs
615 opts: rw,vers=3
616
Valeriy Sakharov1ff31dc2022-09-29 14:37:33 +0400617.. note:: Parameter 'image_cache_manager_interval' recommended to set to 2400 for the NFS shared storage setup (PROD-36930)
618
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300619Nova flavors:
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100620
621.. code-block:: yaml
622
623 nova:
624 client:
625 enabled: true
Dzmitry Stremkouskib202adb2019-11-22 20:14:21 +0100626 resources:
627 v21:
628 admin_identity:
629 endpoint_type: internalURL
630 flavor:
631 flavor1:
632 flavor_id: 10
633 ram: 4096
634 disk: 10
635 vcpus: 1
636 flavor2:
637 flavor_id: auto
638 ram: 4096
639 disk: 20
640 vcpus: 2
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100641
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300642Availability zones:
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100643
644.. code-block:: yaml
645
646 nova:
647 client:
648 enabled: true
649 server:
650 identity:
651 availability_zones:
652 - availability_zone_01
653 - availability_zone_02
654
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300655Aggregates:
Damian Szeluga5dca0f02017-04-13 17:27:15 +0200656
657.. code-block:: yaml
658
659 nova:
660 client:
661 enabled: true
Dzmitry Stremkouskib202adb2019-11-22 20:14:21 +0100662 resources:
663 v21:
664 admin_identity:
665 aggregates:
666 aggregate1: {}
667 aggregate2:
668 metadata: "..."
Damian Szeluga5dca0f02017-04-13 17:27:15 +0200669
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300670Upgrade levels:
Dmitry Stremkovskiy91f45852017-07-18 16:22:31 +0300671
672.. code-block:: yaml
673
674 nova:
675 controller:
676 upgrade_levels:
677 compute: juno
678
679 nova:
680 compute:
681 upgrade_levels:
682 compute: juno
683
Petr Jedinýd855ef22017-03-06 22:24:33 +0100684SR-IOV
Jakub Pavlik39a05942017-02-13 23:03:08 +0100685------
686
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300687Add ``PciPassthroughFilter`` into scheduler filters and NICs on
688specific compute nodes:
Jakub Pavlik39a05942017-02-13 23:03:08 +0100689
690.. code-block:: yaml
691
692 nova:
693 controller:
694 sriov: true
sandriichenko4fe321d2018-01-22 17:34:06 +0000695 scheduler_default_filters: "DifferentHostFilter,SameHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter"
Jakub Pavlik39a05942017-02-13 23:03:08 +0100696
697 nova:
698 compute:
699 sriov:
700 nic_one:
701 devname: eth1
702 physical_network: physnet1
703
Oleh Hryhorovf5093b82018-10-17 11:16:08 +0000704.. note:: Parameters located under nova:compute:sriov:<nic_name> are copied to passthrough_whitelist parameter into
705 nova.conf file in appropriate format.
706
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100707CPU pinning & Hugepages
708-----------------------
709
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300710CPU pinning of virtual machine instances to dedicated physical
711CPU cores. Hugepages mount point for libvirt.
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100712
713.. code-block:: yaml
714
715 nova:
716 controller:
sandriichenko4fe321d2018-01-22 17:34:06 +0000717 scheduler_default_filters: "DifferentHostFilter,SameHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,NUMATopologyFilter,AggregateInstanceExtraSpecsFilter"
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100718
719 nova:
720 compute:
721 vcpu_pin_set: 2,3,4,5
722 hugepages:
723 mount_points:
724 - path: /mnt/hugepages_1GB
725 - path: /mnt/hugepages_2MB
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100726
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200727Custom Scheduler filters
728------------------------
729
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300730If you have a custom filter, that needs to be included in the
731scheduler, then you can include it like so:
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200732
733.. code-block:: yaml
734
735 nova:
736 controller:
737 scheduler_custom_filters:
738 - my_custom_driver.nova.scheduler.filters.my_custom_filter.MyCustomFilter
739
740 # 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 +0000741 scheduler_default_filters: "DifferentHostFilter,SameHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter,MyCustomFilter"
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200742
Michael Polenchuk2bce2cb2018-09-17 16:05:43 +0400743 # Since Queens version a sequence could be used as well:
744 ~scheduler_default_filters:
745 - DifferentHostFilter
746 - SameHostFilter
747 ...
748 - MyCustomFilter
749
750
Michel Nederlofeb566f62017-04-21 15:37:47 +0200751Hardware Trip/Unmap Support
752---------------------------
753
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300754To enable TRIM support for ephemeral images (thru nova managed
755images), libvirt has this option:
Michel Nederlofeb566f62017-04-21 15:37:47 +0200756
757.. code-block:: yaml
758
759 nova:
760 compute:
761 libvirt:
762 hw_disk_discard: unmap
763
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300764To actually utilize this feature, the following metadata must be
765set on the image as well, so the SCSI unmap is supported:
Michel Nederlofeb566f62017-04-21 15:37:47 +0200766
767.. code-block:: bash
768
769 glance image-update --property hw_scsi_model=virtio-scsi <image>
770 glance image-update --property hw_disk_bus=scsi <image>
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100771
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000772Scheduler Host Manager
773----------------------
774
775Specify a custom host manager.
776
Thom Gerdesec00afd2017-04-07 18:06:59 +0000777libvirt CPU mode
778----------------
779
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300780Allow setting the model of CPU that is exposed to a VM. This
781allows for better support live migration between hypervisors with
782different hardware, among other things. Defaults to host-passthrough.
Jakub Pavlik7046b9c2017-09-19 12:04:19 +0200783
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000784.. code-block:: yaml
785
786 nova:
787 controller:
788 scheduler_host_manager: ironic_host_manager
789
Thom Gerdesec00afd2017-04-07 18:06:59 +0000790 compute:
791 cpu_mode: host-model
792
Dzmitry Stremkouski7da9bf12018-04-25 22:30:37 +0200793Nova compute cpu model
794----------------------
795
796.. code-block:: yaml
797
798 nova:
799 compute:
800 cpu_mode: custom
801 libvirt:
802 cpu_model: IvyBridge
803
Oleksandr Pidrepnyid9020082019-03-04 19:18:19 +0200804RNG (Random Number Generator) device path
805----------------------
806
807The path to an RNG (Random Number Generator) device that will be used
808as the source of entropy on the host.
809The recommended source of entropy is /dev/urandom.
810Permitted options are: /dev/random, /dev/urandom or /dev/hwrng.
811Default: /dev/urandom
812
813.. code-block:: yaml
814
815 nova:
816 controller:
817 libvirt:
818 rng_dev_path: /dev/random
819
820 compute:
821 libvirt:
822 rng_dev_path: /dev/random
823
Dzmitry Stremkouski7da9bf12018-04-25 22:30:37 +0200824
Michel Nederloff7eefb22017-07-10 11:14:33 +0200825Nova compute workarounds
826------------------------
827
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300828Live snapshotting is disabled by default in nova. To enable
829this, it needs a manual switch.
Michel Nederloff7eefb22017-07-10 11:14:33 +0200830
831From manual:
832
833.. code-block:: yaml
834
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300835 When using libvirt 1.2.2 live snapshots fail intermittently under load
836 (likely related to concurrent libvirt/qemu operations). This config
837 option provides a mechanism to disable live snapshot, in favor of cold
838 snapshot, while this is resolved. Cold snapshot causes an instance
839 outage while the guest is going through the snapshotting process.
840
841 For more information, refer to the bug report:
842
843 https://bugs.launchpad.net/nova/+bug/1334398
Michel Nederloff7eefb22017-07-10 11:14:33 +0200844
845Configurable pillar data:
846
847.. code-block:: yaml
848
849 nova:
850 compute:
Michel Nederlofe322ebb2017-07-10 12:29:21 +0200851 workaround:
Michel Nederloff7eefb22017-07-10 11:14:33 +0200852 disable_libvirt_livesnapshot: False
853
Michel Nederlofb51a5142017-06-27 08:31:35 +0200854Config drive options
855--------------------
856
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300857See example below on how to configure the options for the
858config drive:
Michel Nederlofb51a5142017-06-27 08:31:35 +0200859
860.. code-block:: yaml
861
862 nova:
863 compute:
864 config_drive:
865 forced: True # Default: True
866 cdrom: True # Default: False
867 format: iso9660 # Default: vfat
868 inject_password: False # Default: False
869
Michel Nederloff81919b2017-11-20 09:37:07 +0100870Number of concurrent live migrates
871----------------------------------
872
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300873Default is to have no concurrent live migrations (so 1
874live-migration at a time).
Michel Nederloff81919b2017-11-20 09:37:07 +0100875
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300876Excerpt from config options page
877https://docs.openstack.org/ocata/config-reference/compute/config-options.html:
Michel Nederloff81919b2017-11-20 09:37:07 +0100878
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300879Maximum number of live migrations to run concurrently. This limit is
880enforced to avoid outbound live migrations overwhelming the host/network
881and causing failures. It is not recommended that you change this unless
882you are very sure that doing so is safe and stable in your environment.
Michel Nederloff81919b2017-11-20 09:37:07 +0100883
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300884Possible values:
Michel Nederloff81919b2017-11-20 09:37:07 +0100885
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300886- 0 : treated as unlimited.
887- Negative value defaults to 0.
888- Any positive integer representing maximum number of live migrations
889 to run concurrently.
Michel Nederloff81919b2017-11-20 09:37:07 +0100890
891To configure this option:
892
893.. code-block:: yaml
894
895 nova:
896 compute:
897 max_concurrent_live_migrations: 1 # (1 is the default)
898
Sergio Lystopad9d31cba2018-05-15 11:29:11 +0300899Live migration with auto converge
900----------------------------------
901
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300902Auto converge throttles down CPU if a progress of on-going live
903migration is slow
904https://docs.openstack.org/ocata/config-reference/compute/config-options.html:
Sergio Lystopad9d31cba2018-05-15 11:29:11 +0300905
906.. code-block:: yaml
907
908 nova:
909 compute:
910 libvirt:
911 live_migration_permit_auto_converge: False # (False is the default)
912
913.. code-block:: yaml
914
915 nova:
916 controller:
917 libvirt:
918 live_migration_permit_auto_converge: False # (False is the default)
919
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400920Enhanced logging with logging.conf
921----------------------------------
922
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300923By default ``logging.conf`` is disabled.
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400924
925That is possible to enable per-binary logging.conf with new variables:
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400926
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300927* ``openstack_log_appender``
928 Set to true to enable log_config_append for all OpenStack services
929
930* ``openstack_fluentd_handler_enabled``
931 Set to true to enable FluentHandler for all Openstack services
932
933* ``openstack_ossyslog_handler_enabled``
934 Set to true to enable OSSysLogHandler for all Openstack services
935
936Only ``WatchedFileHandler``, ``OSSysLogHandler``, and ``FluentHandler``
937are available.
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400938
Dmitry Kalashnik8da249c2018-01-16 17:58:00 +0400939Also it is possible to configure this with pillar:
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400940
941.. code-block:: yaml
942
943 nova:
944 controller:
945 logging:
946 log_appender: true
947 log_handlers:
948 watchedfile:
949 enabled: true
950 fluentd:
951 enabled: true
Oleksii Chupryn99e35032018-02-06 01:59:40 +0200952 ossyslog:
953 enabled: true
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400954
955 compute:
956 logging:
957 log_appender: true
958 log_handlers:
959 watchedfile:
960 enabled: true
961 fluentd:
962 enabled: true
Oleksii Chupryn99e35032018-02-06 01:59:40 +0200963 ossyslog:
964 enabled: true
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000965
Vasyl Saienko7243a952018-05-11 21:26:54 +0300966The log level might be configured per logger by using the
967following pillar structure:
968
969.. code-block:: yaml
970
971 nova:
972 compute:
973 logging:
974 loggers:
975 <logger_name>:
976 level: WARNING
977
978 nova:
979 compute:
980 logging:
981 loggers:
982 <logger_name>:
983 level: WARNING
984
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000985Configure syslog parameters for libvirtd
986----------------------------------------
987
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300988To configure syslog parameters for libvirtd the below pillar
989structure should be used with values which are supported
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000990by libvirtd. These values might be known from the documentation.
991
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300992.. code-block:: yaml
993
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000994 nova:
995 compute:
996 libvirt:
997 logging:
998 level: 3
999 filters: '3:remote 4:event'
1000 outputs: '3:syslog:libvirtd'
1001 buffer_size: 64
1002
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001003Logging controls:
Oleh Hryhorove38525d2018-05-15 08:58:59 +00001004
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001005Logging level: 4 errors, 3 warnings, 2 information, 1 debug
1006basically 1 will log everything possible ``log_level = 3``
Oleh Hryhorove38525d2018-05-15 08:58:59 +00001007
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001008Logging filters:
Oleh Hryhorove38525d2018-05-15 08:58:59 +00001009
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001010A filter allows to select a different logging level for a given category
1011of logs.
Oleh Hryhorove38525d2018-05-15 08:58:59 +00001012
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001013The format for a filter is one of:
Oleh Hryhorove38525d2018-05-15 08:58:59 +00001014
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001015* ``x:name``
1016* ``x:+name``
1017 where name is a string which is matched against source file name,
1018 e.g., ``remote``, ``qemu``, or ``util/json``, the optional ``+`` prefix
1019 tells libvirt to log stack trace for each message matching name,
1020 and x is the minimal level where matching messages should be logged:
Oleh Hryhorove38525d2018-05-15 08:58:59 +00001021
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001022* ``1: DEBUG``
1023* ``2: INFO``
1024* ``3: WARNING``
1025* ``4: ERROR``
1026
1027Multiple filter can be defined in a single @filters, they just
1028need to be separated by spaces.
1029
1030For example, to only get warning or errors from the remote layer
1031and only errors from the event layer: ``log_filters="3:remote 4:event``
1032
1033Logging outputs:
1034
1035An output is one of the places to save logging information
1036The format for an output can be:
1037
1038* ``x:stderr``
1039 Output goes to stderr
1040
1041* ``x:syslog:name``
1042 Use syslog for the output and use the given name as the ident
1043
1044* ``x:file:file_path``
1045 output to a file, with the given filepath
1046
1047 In all case the x prefix is the minimal level, acting as a filter
1048
1049* ``1: DEBUG``
1050* ``2: INFO``
1051* ``3: WARNING``
1052* ``4: ERROR``
1053
1054Multiple output can be defined, they just need to be separated by spaces.
1055For example, to log all warnings and errors to syslog under the libvirt
1056dident: ``log_outputs="3:syslog:libvirtd``
1057
1058Log debug buffer size: default 64
1059The daemon keeps an internal debug log buffer which will be dumped
1060in case of crash or upon receiving a ``SIGUSR2`` signal. This setting
1061allows to override the default buffer size in kilobytes.
1062If value is ``0`` or less the debug log buffer is deactivated
1063``log_buffer_size = 64``
1064
1065To configure the logging parameters for QEMU, the below pillar
1066structure and logging parameters should be used:
1067
1068.. code-block:: yaml
1069
1070 nova:
1071 compute:
1072 qemu:
1073 logging:
1074 handler: logd
1075 virtlog:
1076 enabled: true
1077 level: 4
1078 filters: '3:remote 3:event'
1079 outputs: '4:syslog:virtlogd'
1080 max_clients: 512
1081 max_size: 2097100
1082 max_backups: 2
Oleh Hryhorove38525d2018-05-15 08:58:59 +00001083
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +03001084Inject password to VM
1085---------------------
1086
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001087By default nova blocks up any inject to VM because
1088``inject_partition`` param is equal to ``-2``.
1089If you want to inject password to VM, you will need to
1090define ``inject_partition`` greater or equal to ``-1`` and
1091define ``inject_password`` to ``True``
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +03001092
1093For example:
1094
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001095.. code-block:: yaml
1096
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +03001097 nova:
1098 compute:
1099 inject_partition: '-1'
1100 inject_password: True
1101
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001102Allow the injection of an admin password for instance only at
1103``create`` and ``rebuild`` process.
1104
1105There is no agent needed within the image to do this. If *libguestfs* is
1106available on the host, it will be used. Otherwise *nbd* is used. The file
1107system of the image will be mounted and the admin password, which is provided
1108in the REST API call will be injected as password for the root user. If no
1109root user is available, the instance won't be launched and an error is thrown.
1110Be aware that the injection is *not* possible when the instance gets launched
1111from a volume.
1112
1113Possible values:
1114
1115* ``True``
1116 Allows the injection
1117
1118* ``False`` (default)
1119 Disallows the injection. Any via the REST API provided
1120 admin password will be silently ignored.
1121
1122Related options:
1123
1124* ``inject_partition``
1125 Decides about the discovery and usage of the file system.
1126 It also can disable the injection at all.
1127 (boolean value)
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +03001128
1129You can read more about injecting the administrator password here:
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001130https://docs.openstack.org/nova/queens/admin/admin-password-injection.html
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +03001131
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +03001132Enable libvirt control channel over TLS
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001133---------------------------------------
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +03001134
1135By default TLS is disabled.
1136
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001137Enable TLS transport:
1138
1139.. code-block:: yaml
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +03001140
1141 compute:
1142 libvirt:
1143 tls:
1144 enabled: True
1145
1146You able to set custom certificates in pillar:
1147
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001148.. code-block:: yaml
1149
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +03001150 nova:
1151 compute:
1152 libvirt:
1153 tls:
1154 key: (certificate content)
1155 cert: (certificate content)
1156 cacert: (certificate content)
1157 client:
1158 key: (certificate content)
1159 cert: (certificate content)
1160
Dmitry Teselkin77d9dac2019-04-18 16:43:50 +03001161It is possible to limit allowed SSL / TLS ciphers using libvirt's tls_priority:
1162
1163.. code-block:: yaml
1164
1165 nova:
1166 compute:
1167 libvirt:
1168 tls:
1169 priority: <TLS priority string>
1170
1171Example priority strings are:
1172
1173- The system imposed security level:
1174
1175.. code-block:: text
1176
1177 "SYSTEM"
1178
1179- The default priority without the HMAC-MD5:
1180
1181.. code-block:: text
1182
1183 "NORMAL:-MD5"
1184
1185- Specifying RSA with AES-128-CBC:
1186
1187.. code-block:: text
1188
1189 "NONE:+VERS-TLS-ALL:+MAC-ALL:+RSA:+AES-128-CBC:+SIGN-ALL:+COMP-NULL"
1190
1191- Specifying the defaults plus ARCFOUR-128:
1192
1193.. code-block:: text
1194
1195 "NORMAL:+ARCFOUR-128"
1196
1197- Enabling the 128-bit secure ciphers, while disabling TLS 1.0:
1198
1199.. code-block:: text
1200
1201 "SECURE128:-VERS-TLS1.0"
1202
1203- Enabling the 128-bit and 192-bit secure ciphers, while disabling all TLS
1204 versions except TLS 1.2:
1205
1206.. code-block:: text
1207
1208 "SECURE128:+SECURE192:-VERS-ALL:+VERS-TLS1.2"
1209
1210More on TLS Priority Strings:
1211
1212- https://gnutls.org/manual/html_node/Priority-Strings.html
1213
Vasyl Saienko11ac9732018-10-02 17:04:33 +00001214Controlling access by `tls_allowed_dn_list`.
1215Enable an access control list of client certificate Distinguished Names (DNs)
1216which can connect to the TLS port on this server. The default is that DNs are
1217not checked. This list may contain wildcards such as
1218"C=GB,ST=London,L=London,O=Libvirt Project,CN=*" See the POSIX fnmatch function
1219for the format of the wildcards.
1220Note that if this is an empty list, no client can connect.
1221Note also that GnuTLS returns DNs without spaces after commas between
1222the fields (and this is what we check against), but the openssl x509 tool
1223shows spaces.
1224
1225.. code-block:: yaml
1226
1227 nova:
1228 compute:
1229 libvirt:
1230 tls:
1231 tls_allowed_dn_list:
1232 host1:
1233 enabled: true
1234 value: 'C=foo,CN=cmp1'
1235 host2:
1236 enabled: true
1237 value: 'C=foo,CN=cmp2'
1238
1239
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +03001240You can read more about live migration over TLS here:
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001241https://wiki.libvirt.org/page/TLSCreateServerCerts
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +03001242
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001243Enable transport + authentication for VNC over TLS
1244---------------------
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001245# Only for Queens. Communication between noVNC proxy service and QEMU
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001246
1247By default communication between nova-novncproxy and qemu service is unsecure.
1248
1249compute:
1250 qemu:
1251 vnc:
1252 tls:
1253 enabled: True
1254
1255controller:
1256 novncproxy:
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001257 # This section responsible for communication between noVNC proxy and client machine
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001258 tls:
1259 enabled: True
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001260 # This section responsible for communication between nova-novncproxy and qemu service
1261 vencrypt:
1262 tls:
1263 enabled: True
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001264
1265You able to set custom certificates in pillar:
1266
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001267nova:
1268 compute:
1269 qemu:
1270 vnc:
1271 tls:
1272 cacert (certificate content)
1273 cert (certificate content)
1274 key (certificate content)
1275
1276nova:
1277 controller:
1278 novncproxy:
1279 tls:
1280 server:
1281 cert (certificate content)
1282 key (certificate content)
1283 vencrypt:
1284 tls:
1285 cacert (certificate content)
1286 cert (certificate content)
1287 key (certificate content)
1288
1289
1290You can read more about it here:
1291 https://docs.openstack.org/nova/queens/admin/remote-console-access.html
1292
1293Enable communication between noVNC proxy and client machine over TLS
1294---------------------
1295
1296By default communication between noVNC proxy and client machine is unsecure.
1297
1298 controller:
1299 novncproxy:
1300 tls:
1301 enabled: True
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001302
1303 nova:
1304 controller:
1305 novncproxy:
1306 tls:
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001307 server:
1308 cert (certificate content)
1309 key (certificate content)
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001310
1311You can read more about it here:
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001312 https://docs.openstack.org/mitaka/config-reference/dashboard/configure.html
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001313
Oleksandr Shyshko55eeac72018-08-03 18:23:28 +03001314Enable x509 and ssl communication between Nova and Galera cluster.
1315---------------------
1316By default communication between Nova and Galera is unsecure.
1317
Oleksandr Shyshkocbe87352018-09-07 13:42:57 +03001318nova:
1319 controller:
1320 database:
1321 x509:
1322 enabled: True
1323
Oleksandr Shyshko55eeac72018-08-03 18:23:28 +03001324You able to set custom certificates in pillar:
Oleksandr Shyshko55eeac72018-08-03 18:23:28 +03001325
1326nova:
1327 controller:
1328 database:
1329 x509:
Oleksandr Shyshkocbe87352018-09-07 13:42:57 +03001330 cacert: (certificate content)
1331 cert: (certificate content)
1332 key: (certificate content)
Oleksandr Shyshko55eeac72018-08-03 18:23:28 +03001333
1334You can read more about it here:
1335 https://docs.openstack.org/security-guide/databases/database-access-control.html
1336
Oleksandr Shyshkod96a0992019-03-29 11:18:25 +00001337Define config option which allows to use nova-api service behind proxy.(Only Mitaka)
1338---------------------
1339The HTTP Header that will be used to determine what the original request protocol
1340scheme was, even if it was hidden by a SSL termination proxy.
1341
1342 nova:
1343 controller:
1344 secure_proxy_ssl_header: HTTP_X_FORWARDED_PROTO
1345
1346You can read more about it here:
1347 https://docs.openstack.org/mitaka/config-reference/compute/config-options.html
1348
obryndziif7957912019-01-31 00:55:56 +00001349Nova database connection setup:
1350========
1351
1352.. code-block:: yaml
1353
1354 nova:
1355 controller:
1356 enabled: True
1357 ...
1358 database:
1359 idle_timeout: 180
1360 min_pool_size: 100
1361 max_pool_size: 700
1362 max_overflow: 100
1363 retry_interval: 5
1364 max_retries: '-1'
1365 db_max_retries: 3
1366 db_retry_interval: 1
1367 connection_debug: 10
1368 pool_timeout: 120
1369
Oleksandr Bryndzii6d821f52019-02-20 15:51:15 +02001370
1371Configure nova to use service user tokens:
1372========
1373Long-running operations such as live migration or snapshot can sometimes overrun the
1374expiry of the user token. In such cases, post operations such as cleaning up after a
1375live migration can fail when the nova-compute service needs to cleanup resources in
1376other services, such as in the block-storage (cinder) or networking (neutron) services.
1377
1378This patch enables nova to use service user tokens to supplement the regular user token
1379used to initiate the operation. The identity service (keystone) will then authenticate
1380a request using the service user token if the user token has already expired.
1381
1382.. code-block:: yaml
1383
1384 nova:
1385 controller:
1386 enabled: True
1387 ...
1388 service_user:
1389 enabled: True
1390 user_domain_id: default
1391 project_domain_id: default
1392 project_name: service
1393 username: nova
1394 password: pswd
1395
Oleksandr Bryndzii6af347b2019-04-23 15:34:42 +03001396Change default resource quotas using configmap template settings
1397========
1398
1399.. code-block:: yaml
1400
1401 nova:
1402 controller:
1403 configmap:
1404 quota:
1405 instances: 10
1406 cores: 20
1407 ram: 51200
1408 metadata_items: 128
1409 injected_files: 5
1410 injected_file_content_bytes: 10240
1411 injected_file_path_length: 255
1412 key_pairs: 100
1413 server_groups: 10
1414 server_group_members: 10
1415 reservation_expire: 86400
1416 until_refresh: 0
1417 max_age: 0
1418
Roman Lubianyif57af872020-03-26 14:08:10 +02001419Set use_db_reconnect for Nova
1420========
1421
1422.. code-block:: yaml
1423
1424 nova:
1425 controller:
1426 database:
1427 use_db_reconnect: true
1428
1429.. code-block:: yaml
1430
1431 nova:
1432 compute:
1433 database:
1434 use_db_reconnect: true
1435
Oleksii Molchanove64fca12020-11-19 22:46:05 +02001436Set qemu security_driver
1437========
1438
1439.. code-block:: yaml
1440
1441 nova:
1442 compute:
1443 security_driver: apparmor
1444
Oleksii Molchanov384ea6a2022-03-14 18:21:16 +02001445Disable new services automatically
1446========
1447
1448.. code-block:: yaml
1449
1450 nova:
1451 compute:
1452 enable_new_services: False
1453 controller:
1454 enable_new_services: False
Taras Khlivnyakb85e02d2021-08-19 09:48:56 +03001455
1456Change files/directories permissions for nova service:
1457=======================================
1458In order to change file permissions the following should be set:
1459
1460'files' - block to set permissions for files.
1461- full path to file
1462- user ( default value is 'root' ) this parameter is optional.
1463- group ( default value is 'nova' ) this parameter is optional
1464- mode ( default value is '0640' ) this parameter is optional
1465
1466'directories' - block to set permissions for directories.
1467- full path to directory
1468- user ( default value is 'root' ) this parameter is optional
1469- group ( default value is 'nova' ) this parameter is optional
1470- mode ( default value is '0750' ) this parameter is optional
1471
1472.. code-block:: yaml
1473
1474 nova:
1475 files:
1476 /etc/nova/nova.conf:
1477 user: 'root'
1478 group: 'nova'
1479 mode: '0750'
1480 directories:
1481 /etc/nova:
1482 user: 'root'
1483 group: 'nova'
1484 mode: '0750'
1485
1486
Oleh Hryhorov63ee8452018-08-14 09:16:02 +00001487Upgrades
1488========
1489
1490Each openstack formula provide set of phases (logical bloks) that will help to
1491build flexible upgrade orchestration logic for particular components. The list
1492of phases might and theirs descriptions are listed in table below:
1493
1494+-------------------------------+------------------------------------------------------+
1495| State | Description |
1496+===============================+======================================================+
1497| <app>.upgrade.service_running | Ensure that all services for particular application |
1498| | are enabled for autostart and running |
1499+-------------------------------+------------------------------------------------------+
1500| <app>.upgrade.service_stopped | Ensure that all services for particular application |
1501| | disabled for autostart and dead |
1502+-------------------------------+------------------------------------------------------+
1503| <app>.upgrade.pkgs_latest | Ensure that packages used by particular application |
1504| | are installed to latest available version. |
1505| | This will not upgrade data plane packages like qemu |
1506| | and openvswitch as usually minimal required version |
1507| | in openstack services is really old. The data plane |
1508| | packages should be upgraded separately by `apt-get |
1509| | upgrade` or `apt-get dist-upgrade` |
1510| | Applying this state will not autostart service. |
1511+-------------------------------+------------------------------------------------------+
1512| <app>.upgrade.render_config | Ensure configuration is rendered actual version. +
1513+-------------------------------+------------------------------------------------------+
1514| <app>.upgrade.pre | We assume this state is applied on all nodes in the |
1515| | cloud before running upgrade. |
1516| | Only non destructive actions will be applied during |
1517| | this phase. Perform service built in service check |
1518| | like (keystone-manage doctor and nova-status upgrade)|
1519+-------------------------------+------------------------------------------------------+
1520| <app>.upgrade.upgrade.pre | Mostly applicable for data plane nodes. During this |
1521| | phase resources will be gracefully removed from |
1522| | current node if it is allowed. Services for upgraded |
1523| | application will be set to admin disabled state to |
1524| | make sure node will not participate in resources |
1525| | scheduling. For example on gtw nodes this will set |
1526| | all agents to admin disable state and will move all |
1527| | routers to other agents. |
1528+-------------------------------+------------------------------------------------------+
1529| <app>.upgrade.upgrade | This state will basically upgrade application on |
1530| | particular target. Stop services, render |
1531| | configuration, install new packages, run offline |
1532| | dbsync (for ctl), start services. Data plane should |
1533| | not be affected, only OpenStack python services. |
1534+-------------------------------+------------------------------------------------------+
1535| <app>.upgrade.upgrade.post | Add services back to scheduling. |
1536+-------------------------------+------------------------------------------------------+
1537| <app>.upgrade.post | This phase should be launched only when upgrade of |
1538| | the cloud is completed. Cleanup temporary files, |
1539| | perform other post upgrade tasks. |
1540+-------------------------------+------------------------------------------------------+
1541| <app>.upgrade.verify | Here we will do basic health checks (API CRUD |
1542| | operations, verify do not have dead network |
1543| | agents/compute services) |
1544+-------------------------------+------------------------------------------------------+
Oleksandr Pidrepnyi60df8722019-06-07 16:18:11 +03001545
1546
1547Don't manage services scheduling while upgrade
1548----------------------------------------------
1549For some special cases, don't manage services scheduling both enable and disable
1550before and after upgrade procedure.
1551
1552If 'manage_service_maintenance: true' or not present - default behavior, disable services
1553before upgrade and enable it after upgrade.
1554If 'manage_service_maintenance: false' - don't disable and don't enable upgraded services
1555scheduling before and after upgrade.
1556
1557.. code-block:: yaml
1558
1559 nova:
1560 upgrade:
1561 manage_service_maintenance: false
Dzmitry Stremkouskic664e802020-07-06 20:02:58 +02001562
1563Execute database maintenance tasks
1564----------------------------------
1565Cleanup stale records from nova database to make it smaller.
1566This is helpful before any upgrade activity.
1567It is safe to execute it generally without maintenance window same as online db_sync.
1568
1569Enable this pillar:
1570
1571.. code-block:: yaml
1572
1573 nova:
1574 controller:
1575 db_purge:
1576 enabled: True
1577
1578Execute state nova.db.db_cleanup to purge stale records:
1579
1580.. code-block:: bash
1581
1582 salt -C 'I@nova:controller:role:primary' state.apply nova.db.db_cleanup -l debug
1583
1584Starting from rocky release it is possible to pass days parameter.
1585If you skip setting it, all records would be archived/purged:
1586
1587.. code-block:: yaml
1588
1589 nova:
1590 controller:
1591 db_purge:
1592 enabled: True
1593 days: 45
1594
1595Control pre-rocky releases parameters:
1596
1597.. code-block:: yaml
1598
1599 nova:
1600 controller:
1601 db_purge:
1602 enabled: True
1603 max_rows: 1000
1604 verbose: True
1605
1606Control rocky+ releases parameters:
1607'days' and 'all' parameters are mutually exclusive.
1608
1609.. code-block:: yaml
1610
1611 nova:
1612 controller:
1613 db_purge:
1614 enabled: True
1615 all: True
1616 verbose: True
1617 all_cells: True
Vladimir Khlyunev03ae2112020-09-15 12:39:55 +04001618
1619
1620Configure filter schedulers
1621---------------------------
1622At this moment only max_instances_per_host for NumInstancesFilter is supported.
1623
1624.. code-block:: yaml
1625
1626 nova:
1627 controller:
1628 filter_scheduler:
1629 max_instances_per_host: 50
Roman Lubianyi841a0842022-07-26 11:41:18 +02001630
1631Enable Nova nova-serialproxy service:
1632
1633.. code-block:: yaml
1634
1635 nova:
1636 controller:
1637 ....
1638 serial_proxy:
1639 enabled: True