blob: 42ba8db06936e52bee4e4d24cd7a9596cd824503 [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
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300359Nova services on compute node with memcached caching:
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
374
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300375Client-side RabbitMQ HA setup:
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200376
377.. code-block:: yaml
378
379 nova:
Kirill Bespalov64617172017-07-11 14:43:14 +0300380 compute:
Jiri Konecnye31f2c52016-04-14 17:16:02 +0200381 ....
382 message_queue:
383 engine: rabbitmq
384 members:
385 - host: 10.0.16.1
386 - host: 10.0.16.2
387 - host: 10.0.16.3
388 user: openstack
389 password: pwd
390 virtual_host: '/openstack'
391 ....
392
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300393Nova with ephemeral configured with Ceph:
maxstack39e6aca2016-05-04 13:50:13 +0000394
395.. code-block:: yaml
396
397 nova:
398 compute:
399 enabled: true
400 ...
401 ceph:
402 ephemeral: yes
403 rbd_pool: nova
404 rbd_user: nova
405 secret_uuid: 03006edd-d957-40a3-ac4c-26cd254b3731
Kalynovskyi0bc79692017-07-21 16:22:09 +0300406 ....
maxstack39e6aca2016-05-04 13:50:13 +0000407
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300408Nova with ephemeral configured with LVM:
Kalynovskyi0bc79692017-07-21 16:22:09 +0300409
410.. code-block:: yaml
411
412 nova:
413 compute:
414 enabled: true
415 ...
416 lvm:
417 ephemeral: yes
418 images_volume_group: nova_vg
419
420 linux:
421 storage:
422 lvm:
423 nova_vg:
424 name: nova_vg
425 devices:
426 - /dev/sdf
427 - /dev/sdd
428 - /dev/sdg
429 - /dev/sde
430 - /dev/sdc
431 - /dev/sdj
432 - /dev/sdh
maxstack39e6aca2016-05-04 13:50:13 +0000433
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300434Enable Barbican integration:
Oleg Iurchenko370c10d2017-10-19 14:03:37 +0300435
436.. code-block:: yaml
437
438 nova:
439 compute:
440 ....
441 barbican:
442 enabled: true
443
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300444Nova metadata custom bindings:
Vasyl Saienko2d591282018-02-05 14:19:02 +0200445
446.. code-block:: yaml
447
448 nova:
449 controller:
450 enabled: true
451 ...
452 metadata:
453 bind:
454 address: 1.2.3.4
455 port: 8776
456
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100457Client role
458-----------
459
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300460Nova configured with NFS:
Dmitry Stremkovskiy665c7282017-07-05 17:36:27 +0300461
462.. code-block:: yaml
463
464 nova:
465 compute:
466 instances_path: /mnt/nova/instances
467
468 linux:
469 storage:
470 enabled: true
471 mount:
472 nfs_nova:
473 enabled: true
474 path: ${nova:compute:instances_path}
475 device: 172.31.35.145:/data
476 file_system: nfs
477 opts: rw,vers=3
478
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300479Nova flavors:
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100480
481.. code-block:: yaml
482
483 nova:
484 client:
485 enabled: true
486 server:
487 identity:
488 flavor:
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100489 flavor1:
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100490 flavor_id: 10
491 ram: 4096
492 disk: 10
493 vcpus: 1
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100494 flavor2:
495 flavor_id: auto
496 ram: 4096
497 disk: 20
498 vcpus: 2
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100499 identity1:
500 flavor:
501 ...
502
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300503Availability zones:
Jiri Broulik70d9e3f2017-02-15 18:37:13 +0100504
505.. code-block:: yaml
506
507 nova:
508 client:
509 enabled: true
510 server:
511 identity:
512 availability_zones:
513 - availability_zone_01
514 - availability_zone_02
515
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300516Aggregates:
Damian Szeluga5dca0f02017-04-13 17:27:15 +0200517
518.. code-block:: yaml
519
520 nova:
521 client:
522 enabled: true
523 server:
524 identity:
525 aggregates:
526 - aggregate1
527 - aggregate2
528
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300529Upgrade levels:
Dmitry Stremkovskiy91f45852017-07-18 16:22:31 +0300530
531.. code-block:: yaml
532
533 nova:
534 controller:
535 upgrade_levels:
536 compute: juno
537
538 nova:
539 compute:
540 upgrade_levels:
541 compute: juno
542
Petr Jedinýd855ef22017-03-06 22:24:33 +0100543SR-IOV
Jakub Pavlik39a05942017-02-13 23:03:08 +0100544------
545
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300546Add ``PciPassthroughFilter`` into scheduler filters and NICs on
547specific compute nodes:
Jakub Pavlik39a05942017-02-13 23:03:08 +0100548
549.. code-block:: yaml
550
551 nova:
552 controller:
553 sriov: true
sandriichenko4fe321d2018-01-22 17:34:06 +0000554 scheduler_default_filters: "DifferentHostFilter,SameHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter"
Jakub Pavlik39a05942017-02-13 23:03:08 +0100555
556 nova:
557 compute:
558 sriov:
559 nic_one:
560 devname: eth1
561 physical_network: physnet1
562
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100563CPU pinning & Hugepages
564-----------------------
565
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300566CPU pinning of virtual machine instances to dedicated physical
567CPU cores. Hugepages mount point for libvirt.
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100568
569.. code-block:: yaml
570
571 nova:
572 controller:
sandriichenko4fe321d2018-01-22 17:34:06 +0000573 scheduler_default_filters: "DifferentHostFilter,SameHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,NUMATopologyFilter,AggregateInstanceExtraSpecsFilter"
Jakub Pavlik26fb85c2017-02-16 22:29:22 +0100574
575 nova:
576 compute:
577 vcpu_pin_set: 2,3,4,5
578 hugepages:
579 mount_points:
580 - path: /mnt/hugepages_1GB
581 - path: /mnt/hugepages_2MB
Jiri Broulik0ce9fc92017-02-01 23:10:40 +0100582
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200583Custom Scheduler filters
584------------------------
585
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300586If you have a custom filter, that needs to be included in the
587scheduler, then you can include it like so:
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200588
589.. code-block:: yaml
590
591 nova:
592 controller:
593 scheduler_custom_filters:
594 - my_custom_driver.nova.scheduler.filters.my_custom_filter.MyCustomFilter
595
596 # 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 +0000597 scheduler_default_filters: "DifferentHostFilter,SameHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter,MyCustomFilter"
Michel Nederlof171c7ac2017-04-13 12:54:14 +0200598
Michel Nederlofeb566f62017-04-21 15:37:47 +0200599Hardware Trip/Unmap Support
600---------------------------
601
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300602To enable TRIM support for ephemeral images (thru nova managed
603images), libvirt has this option:
Michel Nederlofeb566f62017-04-21 15:37:47 +0200604
605.. code-block:: yaml
606
607 nova:
608 compute:
609 libvirt:
610 hw_disk_discard: unmap
611
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300612To actually utilize this feature, the following metadata must be
613set on the image as well, so the SCSI unmap is supported:
Michel Nederlofeb566f62017-04-21 15:37:47 +0200614
615.. code-block:: bash
616
617 glance image-update --property hw_scsi_model=virtio-scsi <image>
618 glance image-update --property hw_disk_bus=scsi <image>
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +0100619
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000620Scheduler Host Manager
621----------------------
622
623Specify a custom host manager.
624
Thom Gerdesec00afd2017-04-07 18:06:59 +0000625libvirt CPU mode
626----------------
627
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300628Allow setting the model of CPU that is exposed to a VM. This
629allows for better support live migration between hypervisors with
630different hardware, among other things. Defaults to host-passthrough.
Jakub Pavlik7046b9c2017-09-19 12:04:19 +0200631
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000632.. code-block:: yaml
633
634 nova:
635 controller:
636 scheduler_host_manager: ironic_host_manager
637
Thom Gerdesec00afd2017-04-07 18:06:59 +0000638 compute:
639 cpu_mode: host-model
640
Dzmitry Stremkouski7da9bf12018-04-25 22:30:37 +0200641Nova compute cpu model
642----------------------
643
644.. code-block:: yaml
645
646 nova:
647 compute:
648 cpu_mode: custom
649 libvirt:
650 cpu_model: IvyBridge
651
652
Michel Nederloff7eefb22017-07-10 11:14:33 +0200653Nova compute workarounds
654------------------------
655
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300656Live snapshotting is disabled by default in nova. To enable
657this, it needs a manual switch.
Michel Nederloff7eefb22017-07-10 11:14:33 +0200658
659From manual:
660
661.. code-block:: yaml
662
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300663 When using libvirt 1.2.2 live snapshots fail intermittently under load
664 (likely related to concurrent libvirt/qemu operations). This config
665 option provides a mechanism to disable live snapshot, in favor of cold
666 snapshot, while this is resolved. Cold snapshot causes an instance
667 outage while the guest is going through the snapshotting process.
668
669 For more information, refer to the bug report:
670
671 https://bugs.launchpad.net/nova/+bug/1334398
Michel Nederloff7eefb22017-07-10 11:14:33 +0200672
673Configurable pillar data:
674
675.. code-block:: yaml
676
677 nova:
678 compute:
Michel Nederlofe322ebb2017-07-10 12:29:21 +0200679 workaround:
Michel Nederloff7eefb22017-07-10 11:14:33 +0200680 disable_libvirt_livesnapshot: False
681
Michel Nederlofb51a5142017-06-27 08:31:35 +0200682Config drive options
683--------------------
684
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300685See example below on how to configure the options for the
686config drive:
Michel Nederlofb51a5142017-06-27 08:31:35 +0200687
688.. code-block:: yaml
689
690 nova:
691 compute:
692 config_drive:
693 forced: True # Default: True
694 cdrom: True # Default: False
695 format: iso9660 # Default: vfat
696 inject_password: False # Default: False
697
Michel Nederloff81919b2017-11-20 09:37:07 +0100698Number of concurrent live migrates
699----------------------------------
700
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300701Default is to have no concurrent live migrations (so 1
702live-migration at a time).
Michel Nederloff81919b2017-11-20 09:37:07 +0100703
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300704Excerpt from config options page
705https://docs.openstack.org/ocata/config-reference/compute/config-options.html:
Michel Nederloff81919b2017-11-20 09:37:07 +0100706
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300707Maximum number of live migrations to run concurrently. This limit is
708enforced to avoid outbound live migrations overwhelming the host/network
709and causing failures. It is not recommended that you change this unless
710you are very sure that doing so is safe and stable in your environment.
Michel Nederloff81919b2017-11-20 09:37:07 +0100711
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300712Possible values:
Michel Nederloff81919b2017-11-20 09:37:07 +0100713
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300714- 0 : treated as unlimited.
715- Negative value defaults to 0.
716- Any positive integer representing maximum number of live migrations
717 to run concurrently.
Michel Nederloff81919b2017-11-20 09:37:07 +0100718
719To configure this option:
720
721.. code-block:: yaml
722
723 nova:
724 compute:
725 max_concurrent_live_migrations: 1 # (1 is the default)
726
Sergio Lystopad9d31cba2018-05-15 11:29:11 +0300727Live migration with auto converge
728----------------------------------
729
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300730Auto converge throttles down CPU if a progress of on-going live
731migration is slow
732https://docs.openstack.org/ocata/config-reference/compute/config-options.html:
Sergio Lystopad9d31cba2018-05-15 11:29:11 +0300733
734.. code-block:: yaml
735
736 nova:
737 compute:
738 libvirt:
739 live_migration_permit_auto_converge: False # (False is the default)
740
741.. code-block:: yaml
742
743 nova:
744 controller:
745 libvirt:
746 live_migration_permit_auto_converge: False # (False is the default)
747
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400748Enhanced logging with logging.conf
749----------------------------------
750
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300751By default ``logging.conf`` is disabled.
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400752
753That is possible to enable per-binary logging.conf with new variables:
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400754
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300755* ``openstack_log_appender``
756 Set to true to enable log_config_append for all OpenStack services
757
758* ``openstack_fluentd_handler_enabled``
759 Set to true to enable FluentHandler for all Openstack services
760
761* ``openstack_ossyslog_handler_enabled``
762 Set to true to enable OSSysLogHandler for all Openstack services
763
764Only ``WatchedFileHandler``, ``OSSysLogHandler``, and ``FluentHandler``
765are available.
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400766
Dmitry Kalashnik8da249c2018-01-16 17:58:00 +0400767Also it is possible to configure this with pillar:
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400768
769.. code-block:: yaml
770
771 nova:
772 controller:
773 logging:
774 log_appender: true
775 log_handlers:
776 watchedfile:
777 enabled: true
778 fluentd:
779 enabled: true
Oleksii Chupryn99e35032018-02-06 01:59:40 +0200780 ossyslog:
781 enabled: true
Dmitry Kalashnike58fe082017-12-01 16:31:14 +0400782
783 compute:
784 logging:
785 log_appender: true
786 log_handlers:
787 watchedfile:
788 enabled: true
789 fluentd:
790 enabled: true
Oleksii Chupryn99e35032018-02-06 01:59:40 +0200791 ossyslog:
792 enabled: true
Thom Gerdesf582f1e2017-05-02 18:05:50 +0000793
Vasyl Saienko7243a952018-05-11 21:26:54 +0300794The log level might be configured per logger by using the
795following pillar structure:
796
797.. code-block:: yaml
798
799 nova:
800 compute:
801 logging:
802 loggers:
803 <logger_name>:
804 level: WARNING
805
806 nova:
807 compute:
808 logging:
809 loggers:
810 <logger_name>:
811 level: WARNING
812
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000813Configure syslog parameters for libvirtd
814----------------------------------------
815
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300816To configure syslog parameters for libvirtd the below pillar
817structure should be used with values which are supported
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000818by libvirtd. These values might be known from the documentation.
819
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300820.. code-block:: yaml
821
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000822 nova:
823 compute:
824 libvirt:
825 logging:
826 level: 3
827 filters: '3:remote 4:event'
828 outputs: '3:syslog:libvirtd'
829 buffer_size: 64
830
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300831Logging controls:
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000832
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300833Logging level: 4 errors, 3 warnings, 2 information, 1 debug
834basically 1 will log everything possible ``log_level = 3``
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000835
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300836Logging filters:
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000837
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300838A filter allows to select a different logging level for a given category
839of logs.
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000840
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300841The format for a filter is one of:
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000842
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300843* ``x:name``
844* ``x:+name``
845 where name is a string which is matched against source file name,
846 e.g., ``remote``, ``qemu``, or ``util/json``, the optional ``+`` prefix
847 tells libvirt to log stack trace for each message matching name,
848 and x is the minimal level where matching messages should be logged:
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000849
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300850* ``1: DEBUG``
851* ``2: INFO``
852* ``3: WARNING``
853* ``4: ERROR``
854
855Multiple filter can be defined in a single @filters, they just
856need to be separated by spaces.
857
858For example, to only get warning or errors from the remote layer
859and only errors from the event layer: ``log_filters="3:remote 4:event``
860
861Logging outputs:
862
863An output is one of the places to save logging information
864The format for an output can be:
865
866* ``x:stderr``
867 Output goes to stderr
868
869* ``x:syslog:name``
870 Use syslog for the output and use the given name as the ident
871
872* ``x:file:file_path``
873 output to a file, with the given filepath
874
875 In all case the x prefix is the minimal level, acting as a filter
876
877* ``1: DEBUG``
878* ``2: INFO``
879* ``3: WARNING``
880* ``4: ERROR``
881
882Multiple output can be defined, they just need to be separated by spaces.
883For example, to log all warnings and errors to syslog under the libvirt
884dident: ``log_outputs="3:syslog:libvirtd``
885
886Log debug buffer size: default 64
887The daemon keeps an internal debug log buffer which will be dumped
888in case of crash or upon receiving a ``SIGUSR2`` signal. This setting
889allows to override the default buffer size in kilobytes.
890If value is ``0`` or less the debug log buffer is deactivated
891``log_buffer_size = 64``
892
893To configure the logging parameters for QEMU, the below pillar
894structure and logging parameters should be used:
895
896.. code-block:: yaml
897
898 nova:
899 compute:
900 qemu:
901 logging:
902 handler: logd
903 virtlog:
904 enabled: true
905 level: 4
906 filters: '3:remote 3:event'
907 outputs: '4:syslog:virtlogd'
908 max_clients: 512
909 max_size: 2097100
910 max_backups: 2
Oleh Hryhorove38525d2018-05-15 08:58:59 +0000911
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +0300912Inject password to VM
913---------------------
914
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300915By default nova blocks up any inject to VM because
916``inject_partition`` param is equal to ``-2``.
917If you want to inject password to VM, you will need to
918define ``inject_partition`` greater or equal to ``-1`` and
919define ``inject_password`` to ``True``
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +0300920
921For example:
922
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300923.. code-block:: yaml
924
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +0300925 nova:
926 compute:
927 inject_partition: '-1'
928 inject_password: True
929
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300930Allow the injection of an admin password for instance only at
931``create`` and ``rebuild`` process.
932
933There is no agent needed within the image to do this. If *libguestfs* is
934available on the host, it will be used. Otherwise *nbd* is used. The file
935system of the image will be mounted and the admin password, which is provided
936in the REST API call will be injected as password for the root user. If no
937root user is available, the instance won't be launched and an error is thrown.
938Be aware that the injection is *not* possible when the instance gets launched
939from a volume.
940
941Possible values:
942
943* ``True``
944 Allows the injection
945
946* ``False`` (default)
947 Disallows the injection. Any via the REST API provided
948 admin password will be silently ignored.
949
950Related options:
951
952* ``inject_partition``
953 Decides about the discovery and usage of the file system.
954 It also can disable the injection at all.
955 (boolean value)
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +0300956
957You can read more about injecting the administrator password here:
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300958https://docs.openstack.org/nova/queens/admin/admin-password-injection.html
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +0300959
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +0300960Enable libvirt control channel over TLS
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300961---------------------------------------
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +0300962
963By default TLS is disabled.
964
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300965Enable TLS transport:
966
967.. code-block:: yaml
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +0300968
969 compute:
970 libvirt:
971 tls:
972 enabled: True
973
974You able to set custom certificates in pillar:
975
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300976.. code-block:: yaml
977
Oleksandr Shyshko1c020d12018-05-24 12:47:08 +0300978 nova:
979 compute:
980 libvirt:
981 tls:
982 key: (certificate content)
983 cert: (certificate content)
984 cacert: (certificate content)
985 client:
986 key: (certificate content)
987 cert: (certificate content)
988
989You can read more about live migration over TLS here:
OlgaGusarenko9dd01c92018-07-31 00:49:30 +0300990https://wiki.libvirt.org/page/TLSCreateServerCerts
Oleksandr Shyshko981b4fa2018-05-02 15:39:30 +0300991
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +0300992Enable transport + authentication for VNC over TLS
993---------------------
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +0300994# Only for Queens. Communication between noVNC proxy service and QEMU
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +0300995
996By default communication between nova-novncproxy and qemu service is unsecure.
997
998compute:
999 qemu:
1000 vnc:
1001 tls:
1002 enabled: True
1003
1004controller:
1005 novncproxy:
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001006 # This section responsible for communication between noVNC proxy and client machine
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001007 tls:
1008 enabled: True
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001009 # This section responsible for communication between nova-novncproxy and qemu service
1010 vencrypt:
1011 tls:
1012 enabled: True
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001013
1014You able to set custom certificates in pillar:
1015
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001016nova:
1017 compute:
1018 qemu:
1019 vnc:
1020 tls:
1021 cacert (certificate content)
1022 cert (certificate content)
1023 key (certificate content)
1024
1025nova:
1026 controller:
1027 novncproxy:
1028 tls:
1029 server:
1030 cert (certificate content)
1031 key (certificate content)
1032 vencrypt:
1033 tls:
1034 cacert (certificate content)
1035 cert (certificate content)
1036 key (certificate content)
1037
1038
1039You can read more about it here:
1040 https://docs.openstack.org/nova/queens/admin/remote-console-access.html
1041
1042Enable communication between noVNC proxy and client machine over TLS
1043---------------------
1044
1045By default communication between noVNC proxy and client machine is unsecure.
1046
1047 controller:
1048 novncproxy:
1049 tls:
1050 enabled: True
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001051
1052 nova:
1053 controller:
1054 novncproxy:
1055 tls:
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001056 server:
1057 cert (certificate content)
1058 key (certificate content)
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001059
1060You can read more about it here:
Oleksandr Shyshkod8337cf2018-07-11 17:55:58 +03001061 https://docs.openstack.org/mitaka/config-reference/dashboard/configure.html
Oleksandr Shyshko1195fca2018-07-09 18:22:59 +03001062
Oleksandr Shyshko55eeac72018-08-03 18:23:28 +03001063Enable x509 and ssl communication between Nova and Galera cluster.
1064---------------------
1065By default communication between Nova and Galera is unsecure.
1066
Oleksandr Shyshkocbe87352018-09-07 13:42:57 +03001067nova:
1068 controller:
1069 database:
1070 x509:
1071 enabled: True
1072
Oleksandr Shyshko55eeac72018-08-03 18:23:28 +03001073You able to set custom certificates in pillar:
Oleksandr Shyshko55eeac72018-08-03 18:23:28 +03001074
1075nova:
1076 controller:
1077 database:
1078 x509:
Oleksandr Shyshkocbe87352018-09-07 13:42:57 +03001079 cacert: (certificate content)
1080 cert: (certificate content)
1081 key: (certificate content)
Oleksandr Shyshko55eeac72018-08-03 18:23:28 +03001082
1083You can read more about it here:
1084 https://docs.openstack.org/security-guide/databases/database-access-control.html
1085
Oleh Hryhorov63ee8452018-08-14 09:16:02 +00001086Upgrades
1087========
1088
1089Each openstack formula provide set of phases (logical bloks) that will help to
1090build flexible upgrade orchestration logic for particular components. The list
1091of phases might and theirs descriptions are listed in table below:
1092
1093+-------------------------------+------------------------------------------------------+
1094| State | Description |
1095+===============================+======================================================+
1096| <app>.upgrade.service_running | Ensure that all services for particular application |
1097| | are enabled for autostart and running |
1098+-------------------------------+------------------------------------------------------+
1099| <app>.upgrade.service_stopped | Ensure that all services for particular application |
1100| | disabled for autostart and dead |
1101+-------------------------------+------------------------------------------------------+
1102| <app>.upgrade.pkgs_latest | Ensure that packages used by particular application |
1103| | are installed to latest available version. |
1104| | This will not upgrade data plane packages like qemu |
1105| | and openvswitch as usually minimal required version |
1106| | in openstack services is really old. The data plane |
1107| | packages should be upgraded separately by `apt-get |
1108| | upgrade` or `apt-get dist-upgrade` |
1109| | Applying this state will not autostart service. |
1110+-------------------------------+------------------------------------------------------+
1111| <app>.upgrade.render_config | Ensure configuration is rendered actual version. +
1112+-------------------------------+------------------------------------------------------+
1113| <app>.upgrade.pre | We assume this state is applied on all nodes in the |
1114| | cloud before running upgrade. |
1115| | Only non destructive actions will be applied during |
1116| | this phase. Perform service built in service check |
1117| | like (keystone-manage doctor and nova-status upgrade)|
1118+-------------------------------+------------------------------------------------------+
1119| <app>.upgrade.upgrade.pre | Mostly applicable for data plane nodes. During this |
1120| | phase resources will be gracefully removed from |
1121| | current node if it is allowed. Services for upgraded |
1122| | application will be set to admin disabled state to |
1123| | make sure node will not participate in resources |
1124| | scheduling. For example on gtw nodes this will set |
1125| | all agents to admin disable state and will move all |
1126| | routers to other agents. |
1127+-------------------------------+------------------------------------------------------+
1128| <app>.upgrade.upgrade | This state will basically upgrade application on |
1129| | particular target. Stop services, render |
1130| | configuration, install new packages, run offline |
1131| | dbsync (for ctl), start services. Data plane should |
1132| | not be affected, only OpenStack python services. |
1133+-------------------------------+------------------------------------------------------+
1134| <app>.upgrade.upgrade.post | Add services back to scheduling. |
1135+-------------------------------+------------------------------------------------------+
1136| <app>.upgrade.post | This phase should be launched only when upgrade of |
1137| | the cloud is completed. Cleanup temporary files, |
1138| | perform other post upgrade tasks. |
1139+-------------------------------+------------------------------------------------------+
1140| <app>.upgrade.verify | Here we will do basic health checks (API CRUD |
1141| | operations, verify do not have dead network |
1142| | agents/compute services) |
1143+-------------------------------+------------------------------------------------------+
1144
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +01001145Documentation and Bugs
1146======================
1147
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001148* http://salt-formulas.readthedocs.io/
1149 Learn how to install and update salt-formulas
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +01001150
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001151* https://github.com/salt-formulas/salt-formula-nova/issues
1152 In the unfortunate event that bugs are discovered, report the issue to the
1153 appropriate issue tracker. Use the Github issue tracker for a specific salt
1154 formula
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +01001155
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001156* https://launchpad.net/salt-formulas
1157 For feature requests, bug reports, or blueprints affecting the entire
1158 ecosystem, use the Launchpad salt-formulas project
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +01001159
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001160* https://launchpad.net/~salt-formulas-users
1161 Join the salt-formulas-users team and subscribe to mailing list if required
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +01001162
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001163* https://github.com/salt-formulas/salt-formula-nova
1164 Develop the salt-formulas projects in the master branch and then submit pull
1165 requests against a specific formula
Filip Pytloun5bc9e9f2017-02-02 13:05:40 +01001166
OlgaGusarenko9dd01c92018-07-31 00:49:30 +03001167* #salt-formulas @ irc.freenode.net
1168 Use this IRC channel in case of any questions or feedback which is always
1169 welcome