Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 1 | |
Aleš Komárek | 7215285 | 2017-04-11 13:48:48 +0200 | [diff] [blame] | 2 | ============ |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 3 | Usage |
Aleš Komárek | 7215285 | 2017-04-11 13:48:48 +0200 | [diff] [blame] | 4 | ============ |
Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 5 | |
Jakub Pavlik | fcf34f8 | 2016-05-20 09:35:51 +0200 | [diff] [blame] | 6 | OpenStack Nova provides a cloud computing fabric controller, supporting a wide |
| 7 | variety of virtualization technologies, including KVM, Xen, LXC, VMware, and |
| 8 | more. In addition to its native API, it includes compatibility with the |
| 9 | commonly encountered Amazon EC2 and S3 APIs. |
Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 10 | |
Aleš Komárek | 7215285 | 2017-04-11 13:48:48 +0200 | [diff] [blame] | 11 | Sample Pillars |
Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 12 | ============== |
| 13 | |
| 14 | Controller nodes |
| 15 | ---------------- |
| 16 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 17 | Nova services on the controller node: |
Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 18 | |
| 19 | .. code-block:: yaml |
| 20 | |
| 21 | nova: |
| 22 | controller: |
| 23 | version: juno |
| 24 | enabled: true |
| 25 | security_group: true |
Lachlan Evenson | b72de50 | 2016-01-20 15:34:04 -0800 | [diff] [blame] | 26 | cpu_allocation_ratio: 8.0 |
| 27 | ram_allocation_ratio: 1.0 |
Jiri Konecny | 9344a37 | 2016-03-21 19:25:48 +0100 | [diff] [blame] | 28 | disk_allocation_ratio: 1.0 |
Dmitry Stremkovskiy | 2bcba8d | 2017-07-30 21:43:59 +0300 | [diff] [blame] | 29 | cross_az_attach: false |
Jiri Konecny | b5a80e4 | 2016-03-22 11:51:01 +0100 | [diff] [blame] | 30 | workers: 8 |
Jakub Pavlik | 617a896 | 2016-09-04 18:50:06 +0200 | [diff] [blame] | 31 | report_interval: 60 |
Michel Nederlof | 8ff9933 | 2017-10-23 14:29:15 +0200 | [diff] [blame] | 32 | dhcp_domain: novalocal |
Vasyl Saienko | 09b6ac3 | 2019-01-17 15:23:58 +0200 | [diff] [blame] | 33 | vif_plugging_timeout: 300 |
| 34 | vif_plugging_is_fatal: false |
Vasyl Saienko | 2adac3f | 2019-02-18 12:32:52 +0200 | [diff] [blame] | 35 | instance_build_timeout: 600 |
Dzmitry Stremkouski | 781f59e | 2020-01-30 18:29:29 +0100 | [diff] [blame] | 36 | use_cow_images: False |
| 37 | force_raw_images: True |
| 38 | snapshot_image_format: qcow2 |
| 39 | images_type: default |
Ivan Berezovskiy | f1869a3 | 2019-11-14 20:17:58 +0400 | [diff] [blame] | 40 | concurrency: |
| 41 | lock_path: '/var/lib/nova/tmp' |
sgarbuz | cc02c7f | 2018-10-25 14:29:30 +0300 | [diff] [blame] | 42 | consoleauth: |
| 43 | token_ttl: 600 |
Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 44 | 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 Stremkouski | fb2289a | 2019-05-26 01:20:42 +0200 | [diff] [blame] | 62 | interface: internal |
| 63 | valid_interfaces: |
| 64 | - internal |
Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 65 | 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 Hryhorov | f5093b8 | 2018-10-17 11:16:08 +0000 | [diff] [blame] | 72 | pci: |
| 73 | alias: |
| 74 | alias1: |
| 75 | device_type: "type-PF" |
| 76 | name: "a1" |
| 77 | product_id: "154d" |
| 78 | vendor_id: "8086" |
Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 79 | network: |
| 80 | engine: neutron |
| 81 | host: 127.0.0.1 |
| 82 | port: 9696 |
Jakub Pavlik | 617a896 | 2016-09-04 18:50:06 +0200 | [diff] [blame] | 83 | extension_sync_interval: 600 |
Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 84 | 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 Michalec | aa23dc0 | 2016-11-29 16:30:25 +0100 | [diff] [blame] | 93 | audit: |
| 94 | enabled: false |
Simon Pasquier | 8683b7a | 2017-02-03 16:00:16 +0100 | [diff] [blame] | 95 | osapi_max_limit: 500 |
Oleg Iurchenko | 370c10d | 2017-10-19 14:03:37 +0300 | [diff] [blame] | 96 | barbican: |
| 97 | enabled: true |
Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 98 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 99 | Nova services from custom package repository: |
Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 100 | |
| 101 | .. code-block:: yaml |
| 102 | |
| 103 | nova: |
| 104 | controller: |
| 105 | version: juno |
| 106 | source: |
| 107 | engine: pkg |
| 108 | address: http://... |
| 109 | .... |
| 110 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 111 | Client-side RabbitMQ HA setup: |
Jiri Konecny | e31f2c5 | 2016-04-14 17:16:02 +0200 | [diff] [blame] | 112 | |
| 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 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 129 | Enable auditing filter, i.e: CADF: |
Petr Michalec | aa23dc0 | 2016-11-29 16:30:25 +0100 | [diff] [blame] | 130 | |
| 131 | .. code-block:: yaml |
| 132 | |
| 133 | nova: |
| 134 | controller: |
Simon Pasquier | 6a3c8f7 | 2016-12-19 15:37:24 +0100 | [diff] [blame] | 135 | audit: |
Petr Michalec | aa23dc0 | 2016-11-29 16:30:25 +0100 | [diff] [blame] | 136 | enabled: true |
| 137 | .... |
| 138 | filter_factory: 'keystonemiddleware.audit:filter_factory' |
| 139 | map_file: '/etc/pycadf/nova_api_audit_map.conf' |
| 140 | .... |
| 141 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 142 | Enable CORS parameters: |
Ondrej Smola | 25b53cb | 2017-04-28 10:56:19 +0200 | [diff] [blame] | 143 | |
| 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 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 156 | Configuration of the ``policy.json`` file: |
Dmitry Ukov | 3562a08 | 2017-05-04 00:00:48 +0400 | [diff] [blame] | 157 | |
| 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 Smola | 25b53cb | 2017-04-28 10:56:19 +0200 | [diff] [blame] | 168 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 169 | Enable Barbican integration: |
Oleg Iurchenko | 370c10d | 2017-10-19 14:03:37 +0300 | [diff] [blame] | 170 | |
| 171 | .. code-block:: yaml |
| 172 | |
| 173 | nova: |
| 174 | controller: |
| 175 | .... |
| 176 | barbican: |
| 177 | enabled: true |
| 178 | |
Oleh Hryhorov | f5093b8 | 2018-10-17 11:16:08 +0000 | [diff] [blame] | 179 | Define 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 Broulik | 789179a | 2018-02-13 16:16:46 +0100 | [diff] [blame] | 193 | Enable cells update: |
| 194 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 195 | .. note:: Useful when upgrading Openstack. To update cells to test |
| 196 | sync db agains duplicated production database. |
Jiri Broulik | 789179a | 2018-02-13 16:16:46 +0100 | [diff] [blame] | 197 | |
| 198 | .. code-block:: yaml |
| 199 | |
| 200 | nova: |
| 201 | controller: |
| 202 | update_cells: true |
| 203 | |
Dzmitry Stremkouski | b139f14 | 2019-11-03 10:36:46 +0100 | [diff] [blame] | 204 | Increase 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 Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 216 | |
Kirill Bespalov | a0eaca7 | 2017-11-20 13:40:42 +0300 | [diff] [blame] | 217 | Configuring TLS communications |
| 218 | ------------------------------ |
Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 219 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 220 | .. note:: By default system wide installed CA certs are used, |
| 221 | so ``cacert_file`` param is optional, as well as ``cacert``. |
Kirill Bespalov | a0eaca7 | 2017-11-20 13:40:42 +0300 | [diff] [blame] | 222 | |
| 223 | - **RabbitMQ TLS** |
Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 224 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 225 | .. code-block:: yaml |
Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 226 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 227 | 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 Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 236 | |
Kirill Bespalov | a0eaca7 | 2017-11-20 13:40:42 +0300 | [diff] [blame] | 237 | - **MySQL TLS** |
Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 238 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 239 | .. code-block:: yaml |
Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 240 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 241 | 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 Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 248 | |
Kirill Bespalov | a0eaca7 | 2017-11-20 13:40:42 +0300 | [diff] [blame] | 249 | - **Openstack HTTPS API** |
| 250 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 251 | Set the ``https`` as protocol at ``nova:compute`` and |
| 252 | ``nova:controller`` sections : |
Kirill Bespalov | a0eaca7 | 2017-11-20 13:40:42 +0300 | [diff] [blame] | 253 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 254 | .. code-block:: yaml |
Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 255 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 256 | 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 Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 267 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 268 | .. code-block:: yaml |
Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 269 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 270 | 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 Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 284 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 285 | .. note:: Barbican, Cinder, and placement url endpoints are discovering |
| 286 | using service catalog. |
Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 287 | |
Martin Polreich | 65e2a14 | 2019-12-17 14:19:44 +0100 | [diff] [blame] | 288 | Change 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 Khlivnyak | 00ce6a2 | 2021-02-03 12:13:56 +0200 | [diff] [blame] | 301 | Configure host_subset_size |
| 302 | -------------------------- |
| 303 | |
| 304 | .. code-block:: yaml |
| 305 | |
| 306 | nova: |
| 307 | controller: |
| 308 | host_subset_size: 1 |
| 309 | |
Martin Polreich | 65e2a14 | 2019-12-17 14:19:44 +0100 | [diff] [blame] | 310 | |
Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 311 | Compute nodes |
| 312 | ------------- |
| 313 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 314 | Nova controller services on compute node: |
Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 315 | |
| 316 | .. code-block:: yaml |
| 317 | |
| 318 | nova: |
| 319 | compute: |
| 320 | version: juno |
| 321 | enabled: true |
Mykyta Karpin | 5ef9f98 | 2019-02-07 18:40:00 +0200 | [diff] [blame] | 322 | timeout_nbd: 10 |
| 323 | heal_instance_info_cache_interval: 60 |
Dmitry Stremkovskiy | 2bcba8d | 2017-07-30 21:43:59 +0300 | [diff] [blame] | 324 | cross_az_attach: false |
Dmitry Stremkovskiy | 35e53b7 | 2017-07-29 12:50:39 +0300 | [diff] [blame] | 325 | disk_cachemodes: network=writeback,block=none |
Jiri Broulik | 70d9e3f | 2017-02-15 18:37:13 +0100 | [diff] [blame] | 326 | availability_zone: availability_zone_01 |
Damian Szeluga | e192241 | 2017-04-18 16:36:46 +0200 | [diff] [blame] | 327 | aggregates: |
| 328 | - hosts_with_fc |
| 329 | - hosts_with_ssd |
Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 330 | security_group: true |
Petr Michalec | f03e488 | 2017-04-10 10:26:18 +0200 | [diff] [blame] | 331 | resume_guests_state_on_host_boot: False |
Michael Polenchuk | 159c254 | 2018-06-09 15:31:51 +0400 | [diff] [blame] | 332 | preallocate_images: space # Default is 'none' |
Dmitry Stremkovskiy | 8a0ff51 | 2017-07-25 20:54:13 +0300 | [diff] [blame] | 333 | my_ip: 10.1.0.16 |
Vasyl Saienko | 09b6ac3 | 2019-01-17 15:23:58 +0200 | [diff] [blame] | 334 | vif_plugging_timeout: 300 |
| 335 | vif_plugging_is_fatal: false |
Ivan Berezovskiy | f1869a3 | 2019-11-14 20:17:58 +0400 | [diff] [blame] | 336 | concurrency: |
| 337 | lock_path: '/var/lib/nova/tmp' |
Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 338 | 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 Hryhorov | f5093b8 | 2018-10-17 11:16:08 +0000 | [diff] [blame] | 368 | pci: |
| 369 | alias: |
| 370 | alias1: |
| 371 | device_type: "type-PF" |
| 372 | name: "a1" |
| 373 | product_id: "154d" |
| 374 | vendor_id: "8086" |
Oleksandr Pidrepnyi | 14f0827 | 2019-02-20 12:48:17 +0200 | [diff] [blame] | 375 | passthrough_whitelist: |
| 376 | - vendor_id: "10de" |
| 377 | product_id: "1db4" |
Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 378 | 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 Stremkovskiy | 96281f5 | 2017-07-26 00:39:22 +0300 | [diff] [blame] | 392 | host: node-12.domain.tld |
Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 393 | |
Vasyl Saienko | cab3a90 | 2018-07-12 13:17:17 +0300 | [diff] [blame] | 394 | Compute with vmware driver. Each vmware cluster requires a separate process of nova-compute. |
| 395 | Each process should have uniq host identifier. However multiple computes might be running on |
| 396 | single host. It is not recommended to have multiple computes running on different hosts that |
| 397 | manage 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 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 410 | Group and user to be used for QEMU processes run by the system instance: |
kkalynovskyi | f50f0c0 | 2017-12-12 17:52:57 +0200 | [diff] [blame] | 411 | |
| 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 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 423 | Group membership for user nova (upgrade related): |
Dmitry Stremkovskiy | 3cd6ba8 | 2017-07-25 17:15:36 +0300 | [diff] [blame] | 424 | |
| 425 | .. code-block:: yaml |
| 426 | |
| 427 | nova: |
| 428 | compute: |
| 429 | enabled: true |
| 430 | ... |
| 431 | user: |
| 432 | groups: |
| 433 | - libvirt |
Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 434 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 435 | Nova services on compute node with OpenContrail: |
Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 436 | |
| 437 | .. code-block:: yaml |
| 438 | |
| 439 | nova: |
| 440 | compute: |
| 441 | enabled: true |
| 442 | ... |
| 443 | networking: contrail |
| 444 | |
Oleksandr Bryndzii | bb8abfe | 2018-09-28 22:21:43 +0000 | [diff] [blame] | 445 | Nova services on compute node with memcached caching and security strategy: |
Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 446 | |
| 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 Bryndzii | bb8abfe | 2018-09-28 22:21:43 +0000 | [diff] [blame] | 460 | security: |
| 461 | enabled: true |
| 462 | strategy: ENCRYPT |
| 463 | secret_key: secret |
Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 464 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 465 | Client-side RabbitMQ HA setup: |
Jiri Konecny | e31f2c5 | 2016-04-14 17:16:02 +0200 | [diff] [blame] | 466 | |
| 467 | .. code-block:: yaml |
| 468 | |
| 469 | nova: |
Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 470 | compute: |
Jiri Konecny | e31f2c5 | 2016-04-14 17:16:02 +0200 | [diff] [blame] | 471 | .... |
| 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 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 483 | Nova with ephemeral configured with Ceph: |
maxstack | 39e6aca | 2016-05-04 13:50:13 +0000 | [diff] [blame] | 484 | |
| 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 |
Kalynovskyi | 0bc7969 | 2017-07-21 16:22:09 +0300 | [diff] [blame] | 496 | .... |
maxstack | 39e6aca | 2016-05-04 13:50:13 +0000 | [diff] [blame] | 497 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 498 | Nova with ephemeral configured with LVM: |
Kalynovskyi | 0bc7969 | 2017-07-21 16:22:09 +0300 | [diff] [blame] | 499 | |
| 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 |
maxstack | 39e6aca | 2016-05-04 13:50:13 +0000 | [diff] [blame] | 523 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 524 | Enable Barbican integration: |
Oleg Iurchenko | 370c10d | 2017-10-19 14:03:37 +0300 | [diff] [blame] | 525 | |
| 526 | .. code-block:: yaml |
| 527 | |
| 528 | nova: |
| 529 | compute: |
| 530 | .... |
| 531 | barbican: |
| 532 | enabled: true |
| 533 | |
Oleksandr Pidrepnyi | 14f0827 | 2019-02-20 12:48:17 +0200 | [diff] [blame] | 534 | Define aliases for a PCI passthrough devices: |
Oleh Hryhorov | f5093b8 | 2018-10-17 11:16:08 +0000 | [diff] [blame] | 535 | .. 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 Pidrepnyi | 14f0827 | 2019-02-20 12:48:17 +0200 | [diff] [blame] | 548 | Define 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 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 559 | Nova metadata custom bindings: |
Vasyl Saienko | 2d59128 | 2018-02-05 14:19:02 +0200 | [diff] [blame] | 560 | |
| 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 Hryhorov | 08482aa | 2018-11-19 14:07:47 +0200 | [diff] [blame] | 572 | Define multipath for nova compute: |
| 573 | |
| 574 | .. code-block:: yaml |
| 575 | |
| 576 | nova: |
| 577 | compute: |
| 578 | .... |
| 579 | libvirt: |
| 580 | volume_use_multipath: True |
| 581 | |
Oleh Hryhorov | ce1f214 | 2019-03-06 17:00:00 +0000 | [diff] [blame] | 582 | To disable or enable StrictHostKeyChecking and discover |
| 583 | compute 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 Broulik | 0ce9fc9 | 2017-02-01 23:10:40 +0100 | [diff] [blame] | 594 | Client role |
| 595 | ----------- |
| 596 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 597 | Nova configured with NFS: |
Dmitry Stremkovskiy | 665c728 | 2017-07-05 17:36:27 +0300 | [diff] [blame] | 598 | |
| 599 | .. code-block:: yaml |
| 600 | |
| 601 | nova: |
| 602 | compute: |
| 603 | instances_path: /mnt/nova/instances |
| 604 | |
| 605 | linux: |
| 606 | storage: |
| 607 | enabled: true |
| 608 | mount: |
| 609 | nfs_nova: |
| 610 | enabled: true |
| 611 | path: ${nova:compute:instances_path} |
| 612 | device: 172.31.35.145:/data |
| 613 | file_system: nfs |
| 614 | opts: rw,vers=3 |
| 615 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 616 | Nova flavors: |
Jiri Broulik | 0ce9fc9 | 2017-02-01 23:10:40 +0100 | [diff] [blame] | 617 | |
| 618 | .. code-block:: yaml |
| 619 | |
| 620 | nova: |
| 621 | client: |
| 622 | enabled: true |
Dzmitry Stremkouski | b202adb | 2019-11-22 20:14:21 +0100 | [diff] [blame] | 623 | resources: |
| 624 | v21: |
| 625 | admin_identity: |
| 626 | endpoint_type: internalURL |
| 627 | flavor: |
| 628 | flavor1: |
| 629 | flavor_id: 10 |
| 630 | ram: 4096 |
| 631 | disk: 10 |
| 632 | vcpus: 1 |
| 633 | flavor2: |
| 634 | flavor_id: auto |
| 635 | ram: 4096 |
| 636 | disk: 20 |
| 637 | vcpus: 2 |
Jiri Broulik | 0ce9fc9 | 2017-02-01 23:10:40 +0100 | [diff] [blame] | 638 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 639 | Availability zones: |
Jiri Broulik | 70d9e3f | 2017-02-15 18:37:13 +0100 | [diff] [blame] | 640 | |
| 641 | .. code-block:: yaml |
| 642 | |
| 643 | nova: |
| 644 | client: |
| 645 | enabled: true |
| 646 | server: |
| 647 | identity: |
| 648 | availability_zones: |
| 649 | - availability_zone_01 |
| 650 | - availability_zone_02 |
| 651 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 652 | Aggregates: |
Damian Szeluga | 5dca0f0 | 2017-04-13 17:27:15 +0200 | [diff] [blame] | 653 | |
| 654 | .. code-block:: yaml |
| 655 | |
| 656 | nova: |
| 657 | client: |
| 658 | enabled: true |
Dzmitry Stremkouski | b202adb | 2019-11-22 20:14:21 +0100 | [diff] [blame] | 659 | resources: |
| 660 | v21: |
| 661 | admin_identity: |
| 662 | aggregates: |
| 663 | aggregate1: {} |
| 664 | aggregate2: |
| 665 | metadata: "..." |
Damian Szeluga | 5dca0f0 | 2017-04-13 17:27:15 +0200 | [diff] [blame] | 666 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 667 | Upgrade levels: |
Dmitry Stremkovskiy | 91f4585 | 2017-07-18 16:22:31 +0300 | [diff] [blame] | 668 | |
| 669 | .. code-block:: yaml |
| 670 | |
| 671 | nova: |
| 672 | controller: |
| 673 | upgrade_levels: |
| 674 | compute: juno |
| 675 | |
| 676 | nova: |
| 677 | compute: |
| 678 | upgrade_levels: |
| 679 | compute: juno |
| 680 | |
Petr Jediný | d855ef2 | 2017-03-06 22:24:33 +0100 | [diff] [blame] | 681 | SR-IOV |
Jakub Pavlik | 39a0594 | 2017-02-13 23:03:08 +0100 | [diff] [blame] | 682 | ------ |
| 683 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 684 | Add ``PciPassthroughFilter`` into scheduler filters and NICs on |
| 685 | specific compute nodes: |
Jakub Pavlik | 39a0594 | 2017-02-13 23:03:08 +0100 | [diff] [blame] | 686 | |
| 687 | .. code-block:: yaml |
| 688 | |
| 689 | nova: |
| 690 | controller: |
| 691 | sriov: true |
sandriichenko | 4fe321d | 2018-01-22 17:34:06 +0000 | [diff] [blame] | 692 | scheduler_default_filters: "DifferentHostFilter,SameHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter" |
Jakub Pavlik | 39a0594 | 2017-02-13 23:03:08 +0100 | [diff] [blame] | 693 | |
| 694 | nova: |
| 695 | compute: |
| 696 | sriov: |
| 697 | nic_one: |
| 698 | devname: eth1 |
| 699 | physical_network: physnet1 |
| 700 | |
Oleh Hryhorov | f5093b8 | 2018-10-17 11:16:08 +0000 | [diff] [blame] | 701 | .. note:: Parameters located under nova:compute:sriov:<nic_name> are copied to passthrough_whitelist parameter into |
| 702 | nova.conf file in appropriate format. |
| 703 | |
Jakub Pavlik | 26fb85c | 2017-02-16 22:29:22 +0100 | [diff] [blame] | 704 | CPU pinning & Hugepages |
| 705 | ----------------------- |
| 706 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 707 | CPU pinning of virtual machine instances to dedicated physical |
| 708 | CPU cores. Hugepages mount point for libvirt. |
Jakub Pavlik | 26fb85c | 2017-02-16 22:29:22 +0100 | [diff] [blame] | 709 | |
| 710 | .. code-block:: yaml |
| 711 | |
| 712 | nova: |
| 713 | controller: |
sandriichenko | 4fe321d | 2018-01-22 17:34:06 +0000 | [diff] [blame] | 714 | scheduler_default_filters: "DifferentHostFilter,SameHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,NUMATopologyFilter,AggregateInstanceExtraSpecsFilter" |
Jakub Pavlik | 26fb85c | 2017-02-16 22:29:22 +0100 | [diff] [blame] | 715 | |
| 716 | nova: |
| 717 | compute: |
| 718 | vcpu_pin_set: 2,3,4,5 |
| 719 | hugepages: |
| 720 | mount_points: |
| 721 | - path: /mnt/hugepages_1GB |
| 722 | - path: /mnt/hugepages_2MB |
Jiri Broulik | 0ce9fc9 | 2017-02-01 23:10:40 +0100 | [diff] [blame] | 723 | |
Michel Nederlof | 171c7ac | 2017-04-13 12:54:14 +0200 | [diff] [blame] | 724 | Custom Scheduler filters |
| 725 | ------------------------ |
| 726 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 727 | If you have a custom filter, that needs to be included in the |
| 728 | scheduler, then you can include it like so: |
Michel Nederlof | 171c7ac | 2017-04-13 12:54:14 +0200 | [diff] [blame] | 729 | |
| 730 | .. code-block:: yaml |
| 731 | |
| 732 | nova: |
| 733 | controller: |
| 734 | scheduler_custom_filters: |
| 735 | - my_custom_driver.nova.scheduler.filters.my_custom_filter.MyCustomFilter |
| 736 | |
| 737 | # Then add your custom filter on the end (make sure to include all other ones that you need as well) |
sandriichenko | 4fe321d | 2018-01-22 17:34:06 +0000 | [diff] [blame] | 738 | scheduler_default_filters: "DifferentHostFilter,SameHostFilter,RetryFilter,AvailabilityZoneFilter,RamFilter,CoreFilter,DiskFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,PciPassthroughFilter,MyCustomFilter" |
Michel Nederlof | 171c7ac | 2017-04-13 12:54:14 +0200 | [diff] [blame] | 739 | |
Michael Polenchuk | 2bce2cb | 2018-09-17 16:05:43 +0400 | [diff] [blame] | 740 | # Since Queens version a sequence could be used as well: |
| 741 | ~scheduler_default_filters: |
| 742 | - DifferentHostFilter |
| 743 | - SameHostFilter |
| 744 | ... |
| 745 | - MyCustomFilter |
| 746 | |
| 747 | |
Michel Nederlof | eb566f6 | 2017-04-21 15:37:47 +0200 | [diff] [blame] | 748 | Hardware Trip/Unmap Support |
| 749 | --------------------------- |
| 750 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 751 | To enable TRIM support for ephemeral images (thru nova managed |
| 752 | images), libvirt has this option: |
Michel Nederlof | eb566f6 | 2017-04-21 15:37:47 +0200 | [diff] [blame] | 753 | |
| 754 | .. code-block:: yaml |
| 755 | |
| 756 | nova: |
| 757 | compute: |
| 758 | libvirt: |
| 759 | hw_disk_discard: unmap |
| 760 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 761 | To actually utilize this feature, the following metadata must be |
| 762 | set on the image as well, so the SCSI unmap is supported: |
Michel Nederlof | eb566f6 | 2017-04-21 15:37:47 +0200 | [diff] [blame] | 763 | |
| 764 | .. code-block:: bash |
| 765 | |
| 766 | glance image-update --property hw_scsi_model=virtio-scsi <image> |
| 767 | glance image-update --property hw_disk_bus=scsi <image> |
Filip Pytloun | 5bc9e9f | 2017-02-02 13:05:40 +0100 | [diff] [blame] | 768 | |
Thom Gerdes | f582f1e | 2017-05-02 18:05:50 +0000 | [diff] [blame] | 769 | Scheduler Host Manager |
| 770 | ---------------------- |
| 771 | |
| 772 | Specify a custom host manager. |
| 773 | |
Thom Gerdes | ec00afd | 2017-04-07 18:06:59 +0000 | [diff] [blame] | 774 | libvirt CPU mode |
| 775 | ---------------- |
| 776 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 777 | Allow setting the model of CPU that is exposed to a VM. This |
| 778 | allows for better support live migration between hypervisors with |
| 779 | different hardware, among other things. Defaults to host-passthrough. |
Jakub Pavlik | 7046b9c | 2017-09-19 12:04:19 +0200 | [diff] [blame] | 780 | |
Thom Gerdes | f582f1e | 2017-05-02 18:05:50 +0000 | [diff] [blame] | 781 | .. code-block:: yaml |
| 782 | |
| 783 | nova: |
| 784 | controller: |
| 785 | scheduler_host_manager: ironic_host_manager |
| 786 | |
Thom Gerdes | ec00afd | 2017-04-07 18:06:59 +0000 | [diff] [blame] | 787 | compute: |
| 788 | cpu_mode: host-model |
| 789 | |
Dzmitry Stremkouski | 7da9bf1 | 2018-04-25 22:30:37 +0200 | [diff] [blame] | 790 | Nova compute cpu model |
| 791 | ---------------------- |
| 792 | |
| 793 | .. code-block:: yaml |
| 794 | |
| 795 | nova: |
| 796 | compute: |
| 797 | cpu_mode: custom |
| 798 | libvirt: |
| 799 | cpu_model: IvyBridge |
| 800 | |
Oleksandr Pidrepnyi | d902008 | 2019-03-04 19:18:19 +0200 | [diff] [blame] | 801 | RNG (Random Number Generator) device path |
| 802 | ---------------------- |
| 803 | |
| 804 | The path to an RNG (Random Number Generator) device that will be used |
| 805 | as the source of entropy on the host. |
| 806 | The recommended source of entropy is /dev/urandom. |
| 807 | Permitted options are: /dev/random, /dev/urandom or /dev/hwrng. |
| 808 | Default: /dev/urandom |
| 809 | |
| 810 | .. code-block:: yaml |
| 811 | |
| 812 | nova: |
| 813 | controller: |
| 814 | libvirt: |
| 815 | rng_dev_path: /dev/random |
| 816 | |
| 817 | compute: |
| 818 | libvirt: |
| 819 | rng_dev_path: /dev/random |
| 820 | |
Dzmitry Stremkouski | 7da9bf1 | 2018-04-25 22:30:37 +0200 | [diff] [blame] | 821 | |
Michel Nederlof | f7eefb2 | 2017-07-10 11:14:33 +0200 | [diff] [blame] | 822 | Nova compute workarounds |
| 823 | ------------------------ |
| 824 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 825 | Live snapshotting is disabled by default in nova. To enable |
| 826 | this, it needs a manual switch. |
Michel Nederlof | f7eefb2 | 2017-07-10 11:14:33 +0200 | [diff] [blame] | 827 | |
| 828 | From manual: |
| 829 | |
| 830 | .. code-block:: yaml |
| 831 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 832 | When using libvirt 1.2.2 live snapshots fail intermittently under load |
| 833 | (likely related to concurrent libvirt/qemu operations). This config |
| 834 | option provides a mechanism to disable live snapshot, in favor of cold |
| 835 | snapshot, while this is resolved. Cold snapshot causes an instance |
| 836 | outage while the guest is going through the snapshotting process. |
| 837 | |
| 838 | For more information, refer to the bug report: |
| 839 | |
| 840 | https://bugs.launchpad.net/nova/+bug/1334398 |
Michel Nederlof | f7eefb2 | 2017-07-10 11:14:33 +0200 | [diff] [blame] | 841 | |
| 842 | Configurable pillar data: |
| 843 | |
| 844 | .. code-block:: yaml |
| 845 | |
| 846 | nova: |
| 847 | compute: |
Michel Nederlof | e322ebb | 2017-07-10 12:29:21 +0200 | [diff] [blame] | 848 | workaround: |
Michel Nederlof | f7eefb2 | 2017-07-10 11:14:33 +0200 | [diff] [blame] | 849 | disable_libvirt_livesnapshot: False |
| 850 | |
Michel Nederlof | b51a514 | 2017-06-27 08:31:35 +0200 | [diff] [blame] | 851 | Config drive options |
| 852 | -------------------- |
| 853 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 854 | See example below on how to configure the options for the |
| 855 | config drive: |
Michel Nederlof | b51a514 | 2017-06-27 08:31:35 +0200 | [diff] [blame] | 856 | |
| 857 | .. code-block:: yaml |
| 858 | |
| 859 | nova: |
| 860 | compute: |
| 861 | config_drive: |
| 862 | forced: True # Default: True |
| 863 | cdrom: True # Default: False |
| 864 | format: iso9660 # Default: vfat |
| 865 | inject_password: False # Default: False |
| 866 | |
Michel Nederlof | f81919b | 2017-11-20 09:37:07 +0100 | [diff] [blame] | 867 | Number of concurrent live migrates |
| 868 | ---------------------------------- |
| 869 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 870 | Default is to have no concurrent live migrations (so 1 |
| 871 | live-migration at a time). |
Michel Nederlof | f81919b | 2017-11-20 09:37:07 +0100 | [diff] [blame] | 872 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 873 | Excerpt from config options page |
| 874 | https://docs.openstack.org/ocata/config-reference/compute/config-options.html: |
Michel Nederlof | f81919b | 2017-11-20 09:37:07 +0100 | [diff] [blame] | 875 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 876 | Maximum number of live migrations to run concurrently. This limit is |
| 877 | enforced to avoid outbound live migrations overwhelming the host/network |
| 878 | and causing failures. It is not recommended that you change this unless |
| 879 | you are very sure that doing so is safe and stable in your environment. |
Michel Nederlof | f81919b | 2017-11-20 09:37:07 +0100 | [diff] [blame] | 880 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 881 | Possible values: |
Michel Nederlof | f81919b | 2017-11-20 09:37:07 +0100 | [diff] [blame] | 882 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 883 | - 0 : treated as unlimited. |
| 884 | - Negative value defaults to 0. |
| 885 | - Any positive integer representing maximum number of live migrations |
| 886 | to run concurrently. |
Michel Nederlof | f81919b | 2017-11-20 09:37:07 +0100 | [diff] [blame] | 887 | |
| 888 | To configure this option: |
| 889 | |
| 890 | .. code-block:: yaml |
| 891 | |
| 892 | nova: |
| 893 | compute: |
| 894 | max_concurrent_live_migrations: 1 # (1 is the default) |
| 895 | |
Sergio Lystopad | 9d31cba | 2018-05-15 11:29:11 +0300 | [diff] [blame] | 896 | Live migration with auto converge |
| 897 | ---------------------------------- |
| 898 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 899 | Auto converge throttles down CPU if a progress of on-going live |
| 900 | migration is slow |
| 901 | https://docs.openstack.org/ocata/config-reference/compute/config-options.html: |
Sergio Lystopad | 9d31cba | 2018-05-15 11:29:11 +0300 | [diff] [blame] | 902 | |
| 903 | .. code-block:: yaml |
| 904 | |
| 905 | nova: |
| 906 | compute: |
| 907 | libvirt: |
| 908 | live_migration_permit_auto_converge: False # (False is the default) |
| 909 | |
| 910 | .. code-block:: yaml |
| 911 | |
| 912 | nova: |
| 913 | controller: |
| 914 | libvirt: |
| 915 | live_migration_permit_auto_converge: False # (False is the default) |
| 916 | |
Dmitry Kalashnik | e58fe08 | 2017-12-01 16:31:14 +0400 | [diff] [blame] | 917 | Enhanced logging with logging.conf |
| 918 | ---------------------------------- |
| 919 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 920 | By default ``logging.conf`` is disabled. |
Dmitry Kalashnik | e58fe08 | 2017-12-01 16:31:14 +0400 | [diff] [blame] | 921 | |
| 922 | That is possible to enable per-binary logging.conf with new variables: |
Dmitry Kalashnik | e58fe08 | 2017-12-01 16:31:14 +0400 | [diff] [blame] | 923 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 924 | * ``openstack_log_appender`` |
| 925 | Set to true to enable log_config_append for all OpenStack services |
| 926 | |
| 927 | * ``openstack_fluentd_handler_enabled`` |
| 928 | Set to true to enable FluentHandler for all Openstack services |
| 929 | |
| 930 | * ``openstack_ossyslog_handler_enabled`` |
| 931 | Set to true to enable OSSysLogHandler for all Openstack services |
| 932 | |
| 933 | Only ``WatchedFileHandler``, ``OSSysLogHandler``, and ``FluentHandler`` |
| 934 | are available. |
Dmitry Kalashnik | e58fe08 | 2017-12-01 16:31:14 +0400 | [diff] [blame] | 935 | |
Dmitry Kalashnik | 8da249c | 2018-01-16 17:58:00 +0400 | [diff] [blame] | 936 | Also it is possible to configure this with pillar: |
Dmitry Kalashnik | e58fe08 | 2017-12-01 16:31:14 +0400 | [diff] [blame] | 937 | |
| 938 | .. code-block:: yaml |
| 939 | |
| 940 | nova: |
| 941 | controller: |
| 942 | logging: |
| 943 | log_appender: true |
| 944 | log_handlers: |
| 945 | watchedfile: |
| 946 | enabled: true |
| 947 | fluentd: |
| 948 | enabled: true |
Oleksii Chupryn | 99e3503 | 2018-02-06 01:59:40 +0200 | [diff] [blame] | 949 | ossyslog: |
| 950 | enabled: true |
Dmitry Kalashnik | e58fe08 | 2017-12-01 16:31:14 +0400 | [diff] [blame] | 951 | |
| 952 | compute: |
| 953 | logging: |
| 954 | log_appender: true |
| 955 | log_handlers: |
| 956 | watchedfile: |
| 957 | enabled: true |
| 958 | fluentd: |
| 959 | enabled: true |
Oleksii Chupryn | 99e3503 | 2018-02-06 01:59:40 +0200 | [diff] [blame] | 960 | ossyslog: |
| 961 | enabled: true |
Thom Gerdes | f582f1e | 2017-05-02 18:05:50 +0000 | [diff] [blame] | 962 | |
Vasyl Saienko | 7243a95 | 2018-05-11 21:26:54 +0300 | [diff] [blame] | 963 | The log level might be configured per logger by using the |
| 964 | following pillar structure: |
| 965 | |
| 966 | .. code-block:: yaml |
| 967 | |
| 968 | nova: |
| 969 | compute: |
| 970 | logging: |
| 971 | loggers: |
| 972 | <logger_name>: |
| 973 | level: WARNING |
| 974 | |
| 975 | nova: |
| 976 | compute: |
| 977 | logging: |
| 978 | loggers: |
| 979 | <logger_name>: |
| 980 | level: WARNING |
| 981 | |
Oleh Hryhorov | e38525d | 2018-05-15 08:58:59 +0000 | [diff] [blame] | 982 | Configure syslog parameters for libvirtd |
| 983 | ---------------------------------------- |
| 984 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 985 | To configure syslog parameters for libvirtd the below pillar |
| 986 | structure should be used with values which are supported |
Oleh Hryhorov | e38525d | 2018-05-15 08:58:59 +0000 | [diff] [blame] | 987 | by libvirtd. These values might be known from the documentation. |
| 988 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 989 | .. code-block:: yaml |
| 990 | |
Oleh Hryhorov | e38525d | 2018-05-15 08:58:59 +0000 | [diff] [blame] | 991 | nova: |
| 992 | compute: |
| 993 | libvirt: |
| 994 | logging: |
| 995 | level: 3 |
| 996 | filters: '3:remote 4:event' |
| 997 | outputs: '3:syslog:libvirtd' |
| 998 | buffer_size: 64 |
| 999 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1000 | Logging controls: |
Oleh Hryhorov | e38525d | 2018-05-15 08:58:59 +0000 | [diff] [blame] | 1001 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1002 | Logging level: 4 errors, 3 warnings, 2 information, 1 debug |
| 1003 | basically 1 will log everything possible ``log_level = 3`` |
Oleh Hryhorov | e38525d | 2018-05-15 08:58:59 +0000 | [diff] [blame] | 1004 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1005 | Logging filters: |
Oleh Hryhorov | e38525d | 2018-05-15 08:58:59 +0000 | [diff] [blame] | 1006 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1007 | A filter allows to select a different logging level for a given category |
| 1008 | of logs. |
Oleh Hryhorov | e38525d | 2018-05-15 08:58:59 +0000 | [diff] [blame] | 1009 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1010 | The format for a filter is one of: |
Oleh Hryhorov | e38525d | 2018-05-15 08:58:59 +0000 | [diff] [blame] | 1011 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1012 | * ``x:name`` |
| 1013 | * ``x:+name`` |
| 1014 | where name is a string which is matched against source file name, |
| 1015 | e.g., ``remote``, ``qemu``, or ``util/json``, the optional ``+`` prefix |
| 1016 | tells libvirt to log stack trace for each message matching name, |
| 1017 | and x is the minimal level where matching messages should be logged: |
Oleh Hryhorov | e38525d | 2018-05-15 08:58:59 +0000 | [diff] [blame] | 1018 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1019 | * ``1: DEBUG`` |
| 1020 | * ``2: INFO`` |
| 1021 | * ``3: WARNING`` |
| 1022 | * ``4: ERROR`` |
| 1023 | |
| 1024 | Multiple filter can be defined in a single @filters, they just |
| 1025 | need to be separated by spaces. |
| 1026 | |
| 1027 | For example, to only get warning or errors from the remote layer |
| 1028 | and only errors from the event layer: ``log_filters="3:remote 4:event`` |
| 1029 | |
| 1030 | Logging outputs: |
| 1031 | |
| 1032 | An output is one of the places to save logging information |
| 1033 | The format for an output can be: |
| 1034 | |
| 1035 | * ``x:stderr`` |
| 1036 | Output goes to stderr |
| 1037 | |
| 1038 | * ``x:syslog:name`` |
| 1039 | Use syslog for the output and use the given name as the ident |
| 1040 | |
| 1041 | * ``x:file:file_path`` |
| 1042 | output to a file, with the given filepath |
| 1043 | |
| 1044 | In all case the x prefix is the minimal level, acting as a filter |
| 1045 | |
| 1046 | * ``1: DEBUG`` |
| 1047 | * ``2: INFO`` |
| 1048 | * ``3: WARNING`` |
| 1049 | * ``4: ERROR`` |
| 1050 | |
| 1051 | Multiple output can be defined, they just need to be separated by spaces. |
| 1052 | For example, to log all warnings and errors to syslog under the libvirt |
| 1053 | dident: ``log_outputs="3:syslog:libvirtd`` |
| 1054 | |
| 1055 | Log debug buffer size: default 64 |
| 1056 | The daemon keeps an internal debug log buffer which will be dumped |
| 1057 | in case of crash or upon receiving a ``SIGUSR2`` signal. This setting |
| 1058 | allows to override the default buffer size in kilobytes. |
| 1059 | If value is ``0`` or less the debug log buffer is deactivated |
| 1060 | ``log_buffer_size = 64`` |
| 1061 | |
| 1062 | To configure the logging parameters for QEMU, the below pillar |
| 1063 | structure and logging parameters should be used: |
| 1064 | |
| 1065 | .. code-block:: yaml |
| 1066 | |
| 1067 | nova: |
| 1068 | compute: |
| 1069 | qemu: |
| 1070 | logging: |
| 1071 | handler: logd |
| 1072 | virtlog: |
| 1073 | enabled: true |
| 1074 | level: 4 |
| 1075 | filters: '3:remote 3:event' |
| 1076 | outputs: '4:syslog:virtlogd' |
| 1077 | max_clients: 512 |
| 1078 | max_size: 2097100 |
| 1079 | max_backups: 2 |
Oleh Hryhorov | e38525d | 2018-05-15 08:58:59 +0000 | [diff] [blame] | 1080 | |
Oleksandr Shyshko | 981b4fa | 2018-05-02 15:39:30 +0300 | [diff] [blame] | 1081 | Inject password to VM |
| 1082 | --------------------- |
| 1083 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1084 | By default nova blocks up any inject to VM because |
| 1085 | ``inject_partition`` param is equal to ``-2``. |
| 1086 | If you want to inject password to VM, you will need to |
| 1087 | define ``inject_partition`` greater or equal to ``-1`` and |
| 1088 | define ``inject_password`` to ``True`` |
Oleksandr Shyshko | 981b4fa | 2018-05-02 15:39:30 +0300 | [diff] [blame] | 1089 | |
| 1090 | For example: |
| 1091 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1092 | .. code-block:: yaml |
| 1093 | |
Oleksandr Shyshko | 981b4fa | 2018-05-02 15:39:30 +0300 | [diff] [blame] | 1094 | nova: |
| 1095 | compute: |
| 1096 | inject_partition: '-1' |
| 1097 | inject_password: True |
| 1098 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1099 | Allow the injection of an admin password for instance only at |
| 1100 | ``create`` and ``rebuild`` process. |
| 1101 | |
| 1102 | There is no agent needed within the image to do this. If *libguestfs* is |
| 1103 | available on the host, it will be used. Otherwise *nbd* is used. The file |
| 1104 | system of the image will be mounted and the admin password, which is provided |
| 1105 | in the REST API call will be injected as password for the root user. If no |
| 1106 | root user is available, the instance won't be launched and an error is thrown. |
| 1107 | Be aware that the injection is *not* possible when the instance gets launched |
| 1108 | from a volume. |
| 1109 | |
| 1110 | Possible values: |
| 1111 | |
| 1112 | * ``True`` |
| 1113 | Allows the injection |
| 1114 | |
| 1115 | * ``False`` (default) |
| 1116 | Disallows the injection. Any via the REST API provided |
| 1117 | admin password will be silently ignored. |
| 1118 | |
| 1119 | Related options: |
| 1120 | |
| 1121 | * ``inject_partition`` |
| 1122 | Decides about the discovery and usage of the file system. |
| 1123 | It also can disable the injection at all. |
| 1124 | (boolean value) |
Oleksandr Shyshko | 981b4fa | 2018-05-02 15:39:30 +0300 | [diff] [blame] | 1125 | |
| 1126 | You can read more about injecting the administrator password here: |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1127 | https://docs.openstack.org/nova/queens/admin/admin-password-injection.html |
Oleksandr Shyshko | 981b4fa | 2018-05-02 15:39:30 +0300 | [diff] [blame] | 1128 | |
Oleksandr Shyshko | 1c020d1 | 2018-05-24 12:47:08 +0300 | [diff] [blame] | 1129 | Enable libvirt control channel over TLS |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1130 | --------------------------------------- |
Oleksandr Shyshko | 1c020d1 | 2018-05-24 12:47:08 +0300 | [diff] [blame] | 1131 | |
| 1132 | By default TLS is disabled. |
| 1133 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1134 | Enable TLS transport: |
| 1135 | |
| 1136 | .. code-block:: yaml |
Oleksandr Shyshko | 1c020d1 | 2018-05-24 12:47:08 +0300 | [diff] [blame] | 1137 | |
| 1138 | compute: |
| 1139 | libvirt: |
| 1140 | tls: |
| 1141 | enabled: True |
| 1142 | |
| 1143 | You able to set custom certificates in pillar: |
| 1144 | |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1145 | .. code-block:: yaml |
| 1146 | |
Oleksandr Shyshko | 1c020d1 | 2018-05-24 12:47:08 +0300 | [diff] [blame] | 1147 | nova: |
| 1148 | compute: |
| 1149 | libvirt: |
| 1150 | tls: |
| 1151 | key: (certificate content) |
| 1152 | cert: (certificate content) |
| 1153 | cacert: (certificate content) |
| 1154 | client: |
| 1155 | key: (certificate content) |
| 1156 | cert: (certificate content) |
| 1157 | |
Dmitry Teselkin | 77d9dac | 2019-04-18 16:43:50 +0300 | [diff] [blame] | 1158 | It is possible to limit allowed SSL / TLS ciphers using libvirt's tls_priority: |
| 1159 | |
| 1160 | .. code-block:: yaml |
| 1161 | |
| 1162 | nova: |
| 1163 | compute: |
| 1164 | libvirt: |
| 1165 | tls: |
| 1166 | priority: <TLS priority string> |
| 1167 | |
| 1168 | Example priority strings are: |
| 1169 | |
| 1170 | - The system imposed security level: |
| 1171 | |
| 1172 | .. code-block:: text |
| 1173 | |
| 1174 | "SYSTEM" |
| 1175 | |
| 1176 | - The default priority without the HMAC-MD5: |
| 1177 | |
| 1178 | .. code-block:: text |
| 1179 | |
| 1180 | "NORMAL:-MD5" |
| 1181 | |
| 1182 | - Specifying RSA with AES-128-CBC: |
| 1183 | |
| 1184 | .. code-block:: text |
| 1185 | |
| 1186 | "NONE:+VERS-TLS-ALL:+MAC-ALL:+RSA:+AES-128-CBC:+SIGN-ALL:+COMP-NULL" |
| 1187 | |
| 1188 | - Specifying the defaults plus ARCFOUR-128: |
| 1189 | |
| 1190 | .. code-block:: text |
| 1191 | |
| 1192 | "NORMAL:+ARCFOUR-128" |
| 1193 | |
| 1194 | - Enabling the 128-bit secure ciphers, while disabling TLS 1.0: |
| 1195 | |
| 1196 | .. code-block:: text |
| 1197 | |
| 1198 | "SECURE128:-VERS-TLS1.0" |
| 1199 | |
| 1200 | - Enabling the 128-bit and 192-bit secure ciphers, while disabling all TLS |
| 1201 | versions except TLS 1.2: |
| 1202 | |
| 1203 | .. code-block:: text |
| 1204 | |
| 1205 | "SECURE128:+SECURE192:-VERS-ALL:+VERS-TLS1.2" |
| 1206 | |
| 1207 | More on TLS Priority Strings: |
| 1208 | |
| 1209 | - https://gnutls.org/manual/html_node/Priority-Strings.html |
| 1210 | |
Vasyl Saienko | 11ac973 | 2018-10-02 17:04:33 +0000 | [diff] [blame] | 1211 | Controlling access by `tls_allowed_dn_list`. |
| 1212 | Enable an access control list of client certificate Distinguished Names (DNs) |
| 1213 | which can connect to the TLS port on this server. The default is that DNs are |
| 1214 | not checked. This list may contain wildcards such as |
| 1215 | "C=GB,ST=London,L=London,O=Libvirt Project,CN=*" See the POSIX fnmatch function |
| 1216 | for the format of the wildcards. |
| 1217 | Note that if this is an empty list, no client can connect. |
| 1218 | Note also that GnuTLS returns DNs without spaces after commas between |
| 1219 | the fields (and this is what we check against), but the openssl x509 tool |
| 1220 | shows spaces. |
| 1221 | |
| 1222 | .. code-block:: yaml |
| 1223 | |
| 1224 | nova: |
| 1225 | compute: |
| 1226 | libvirt: |
| 1227 | tls: |
| 1228 | tls_allowed_dn_list: |
| 1229 | host1: |
| 1230 | enabled: true |
| 1231 | value: 'C=foo,CN=cmp1' |
| 1232 | host2: |
| 1233 | enabled: true |
| 1234 | value: 'C=foo,CN=cmp2' |
| 1235 | |
| 1236 | |
Oleksandr Shyshko | 1c020d1 | 2018-05-24 12:47:08 +0300 | [diff] [blame] | 1237 | You can read more about live migration over TLS here: |
OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1238 | https://wiki.libvirt.org/page/TLSCreateServerCerts |
Oleksandr Shyshko | 981b4fa | 2018-05-02 15:39:30 +0300 | [diff] [blame] | 1239 | |
Oleksandr Shyshko | 1195fca | 2018-07-09 18:22:59 +0300 | [diff] [blame] | 1240 | Enable transport + authentication for VNC over TLS |
| 1241 | --------------------- |
Oleksandr Shyshko | d8337cf | 2018-07-11 17:55:58 +0300 | [diff] [blame] | 1242 | # Only for Queens. Communication between noVNC proxy service and QEMU |
Oleksandr Shyshko | 1195fca | 2018-07-09 18:22:59 +0300 | [diff] [blame] | 1243 | |
| 1244 | By default communication between nova-novncproxy and qemu service is unsecure. |
| 1245 | |
| 1246 | compute: |
| 1247 | qemu: |
| 1248 | vnc: |
| 1249 | tls: |
| 1250 | enabled: True |
| 1251 | |
| 1252 | controller: |
| 1253 | novncproxy: |
Oleksandr Shyshko | d8337cf | 2018-07-11 17:55:58 +0300 | [diff] [blame] | 1254 | # This section responsible for communication between noVNC proxy and client machine |
Oleksandr Shyshko | 1195fca | 2018-07-09 18:22:59 +0300 | [diff] [blame] | 1255 | tls: |
| 1256 | enabled: True |
Oleksandr Shyshko | d8337cf | 2018-07-11 17:55:58 +0300 | [diff] [blame] | 1257 | # This section responsible for communication between nova-novncproxy and qemu service |
| 1258 | vencrypt: |
| 1259 | tls: |
| 1260 | enabled: True |
Oleksandr Shyshko | 1195fca | 2018-07-09 18:22:59 +0300 | [diff] [blame] | 1261 | |
| 1262 | You able to set custom certificates in pillar: |
| 1263 | |
Oleksandr Shyshko | d8337cf | 2018-07-11 17:55:58 +0300 | [diff] [blame] | 1264 | nova: |
| 1265 | compute: |
| 1266 | qemu: |
| 1267 | vnc: |
| 1268 | tls: |
| 1269 | cacert (certificate content) |
| 1270 | cert (certificate content) |
| 1271 | key (certificate content) |
| 1272 | |
| 1273 | nova: |
| 1274 | controller: |
| 1275 | novncproxy: |
| 1276 | tls: |
| 1277 | server: |
| 1278 | cert (certificate content) |
| 1279 | key (certificate content) |
| 1280 | vencrypt: |
| 1281 | tls: |
| 1282 | cacert (certificate content) |
| 1283 | cert (certificate content) |
| 1284 | key (certificate content) |
| 1285 | |
| 1286 | |
| 1287 | You can read more about it here: |
| 1288 | https://docs.openstack.org/nova/queens/admin/remote-console-access.html |
| 1289 | |
| 1290 | Enable communication between noVNC proxy and client machine over TLS |
| 1291 | --------------------- |
| 1292 | |
| 1293 | By default communication between noVNC proxy and client machine is unsecure. |
| 1294 | |
| 1295 | controller: |
| 1296 | novncproxy: |
| 1297 | tls: |
| 1298 | enabled: True |
Oleksandr Shyshko | 1195fca | 2018-07-09 18:22:59 +0300 | [diff] [blame] | 1299 | |
| 1300 | nova: |
| 1301 | controller: |
| 1302 | novncproxy: |
| 1303 | tls: |
Oleksandr Shyshko | d8337cf | 2018-07-11 17:55:58 +0300 | [diff] [blame] | 1304 | server: |
| 1305 | cert (certificate content) |
| 1306 | key (certificate content) |
Oleksandr Shyshko | 1195fca | 2018-07-09 18:22:59 +0300 | [diff] [blame] | 1307 | |
| 1308 | You can read more about it here: |
Oleksandr Shyshko | d8337cf | 2018-07-11 17:55:58 +0300 | [diff] [blame] | 1309 | https://docs.openstack.org/mitaka/config-reference/dashboard/configure.html |
Oleksandr Shyshko | 1195fca | 2018-07-09 18:22:59 +0300 | [diff] [blame] | 1310 | |
Oleksandr Shyshko | 55eeac7 | 2018-08-03 18:23:28 +0300 | [diff] [blame] | 1311 | Enable x509 and ssl communication between Nova and Galera cluster. |
| 1312 | --------------------- |
| 1313 | By default communication between Nova and Galera is unsecure. |
| 1314 | |
Oleksandr Shyshko | cbe8735 | 2018-09-07 13:42:57 +0300 | [diff] [blame] | 1315 | nova: |
| 1316 | controller: |
| 1317 | database: |
| 1318 | x509: |
| 1319 | enabled: True |
| 1320 | |
Oleksandr Shyshko | 55eeac7 | 2018-08-03 18:23:28 +0300 | [diff] [blame] | 1321 | You able to set custom certificates in pillar: |
Oleksandr Shyshko | 55eeac7 | 2018-08-03 18:23:28 +0300 | [diff] [blame] | 1322 | |
| 1323 | nova: |
| 1324 | controller: |
| 1325 | database: |
| 1326 | x509: |
Oleksandr Shyshko | cbe8735 | 2018-09-07 13:42:57 +0300 | [diff] [blame] | 1327 | cacert: (certificate content) |
| 1328 | cert: (certificate content) |
| 1329 | key: (certificate content) |
Oleksandr Shyshko | 55eeac7 | 2018-08-03 18:23:28 +0300 | [diff] [blame] | 1330 | |
| 1331 | You can read more about it here: |
| 1332 | https://docs.openstack.org/security-guide/databases/database-access-control.html |
| 1333 | |
Oleksandr Shyshko | d96a099 | 2019-03-29 11:18:25 +0000 | [diff] [blame] | 1334 | Define config option which allows to use nova-api service behind proxy.(Only Mitaka) |
| 1335 | --------------------- |
| 1336 | The HTTP Header that will be used to determine what the original request protocol |
| 1337 | scheme was, even if it was hidden by a SSL termination proxy. |
| 1338 | |
| 1339 | nova: |
| 1340 | controller: |
| 1341 | secure_proxy_ssl_header: HTTP_X_FORWARDED_PROTO |
| 1342 | |
| 1343 | You can read more about it here: |
| 1344 | https://docs.openstack.org/mitaka/config-reference/compute/config-options.html |
| 1345 | |
obryndzii | f795791 | 2019-01-31 00:55:56 +0000 | [diff] [blame] | 1346 | Nova database connection setup: |
| 1347 | ======== |
| 1348 | |
| 1349 | .. code-block:: yaml |
| 1350 | |
| 1351 | nova: |
| 1352 | controller: |
| 1353 | enabled: True |
| 1354 | ... |
| 1355 | database: |
| 1356 | idle_timeout: 180 |
| 1357 | min_pool_size: 100 |
| 1358 | max_pool_size: 700 |
| 1359 | max_overflow: 100 |
| 1360 | retry_interval: 5 |
| 1361 | max_retries: '-1' |
| 1362 | db_max_retries: 3 |
| 1363 | db_retry_interval: 1 |
| 1364 | connection_debug: 10 |
| 1365 | pool_timeout: 120 |
| 1366 | |
Oleksandr Bryndzii | 6d821f5 | 2019-02-20 15:51:15 +0200 | [diff] [blame] | 1367 | |
| 1368 | Configure nova to use service user tokens: |
| 1369 | ======== |
| 1370 | Long-running operations such as live migration or snapshot can sometimes overrun the |
| 1371 | expiry of the user token. In such cases, post operations such as cleaning up after a |
| 1372 | live migration can fail when the nova-compute service needs to cleanup resources in |
| 1373 | other services, such as in the block-storage (cinder) or networking (neutron) services. |
| 1374 | |
| 1375 | This patch enables nova to use service user tokens to supplement the regular user token |
| 1376 | used to initiate the operation. The identity service (keystone) will then authenticate |
| 1377 | a request using the service user token if the user token has already expired. |
| 1378 | |
| 1379 | .. code-block:: yaml |
| 1380 | |
| 1381 | nova: |
| 1382 | controller: |
| 1383 | enabled: True |
| 1384 | ... |
| 1385 | service_user: |
| 1386 | enabled: True |
| 1387 | user_domain_id: default |
| 1388 | project_domain_id: default |
| 1389 | project_name: service |
| 1390 | username: nova |
| 1391 | password: pswd |
| 1392 | |
Oleksandr Bryndzii | 6af347b | 2019-04-23 15:34:42 +0300 | [diff] [blame] | 1393 | Change default resource quotas using configmap template settings |
| 1394 | ======== |
| 1395 | |
| 1396 | .. code-block:: yaml |
| 1397 | |
| 1398 | nova: |
| 1399 | controller: |
| 1400 | configmap: |
| 1401 | quota: |
| 1402 | instances: 10 |
| 1403 | cores: 20 |
| 1404 | ram: 51200 |
| 1405 | metadata_items: 128 |
| 1406 | injected_files: 5 |
| 1407 | injected_file_content_bytes: 10240 |
| 1408 | injected_file_path_length: 255 |
| 1409 | key_pairs: 100 |
| 1410 | server_groups: 10 |
| 1411 | server_group_members: 10 |
| 1412 | reservation_expire: 86400 |
| 1413 | until_refresh: 0 |
| 1414 | max_age: 0 |
| 1415 | |
Roman Lubianyi | f57af87 | 2020-03-26 14:08:10 +0200 | [diff] [blame] | 1416 | Set use_db_reconnect for Nova |
| 1417 | ======== |
| 1418 | |
| 1419 | .. code-block:: yaml |
| 1420 | |
| 1421 | nova: |
| 1422 | controller: |
| 1423 | database: |
| 1424 | use_db_reconnect: true |
| 1425 | |
| 1426 | .. code-block:: yaml |
| 1427 | |
| 1428 | nova: |
| 1429 | compute: |
| 1430 | database: |
| 1431 | use_db_reconnect: true |
| 1432 | |
Oleksii Molchanov | e64fca1 | 2020-11-19 22:46:05 +0200 | [diff] [blame] | 1433 | Set qemu security_driver |
| 1434 | ======== |
| 1435 | |
| 1436 | .. code-block:: yaml |
| 1437 | |
| 1438 | nova: |
| 1439 | compute: |
| 1440 | security_driver: apparmor |
| 1441 | |
Taras Khlivnyak | b85e02d | 2021-08-19 09:48:56 +0300 | [diff] [blame^] | 1442 | |
| 1443 | Change files/directories permissions for nova service: |
| 1444 | ======================================= |
| 1445 | In order to change file permissions the following should be set: |
| 1446 | |
| 1447 | 'files' - block to set permissions for files. |
| 1448 | - full path to file |
| 1449 | - user ( default value is 'root' ) this parameter is optional. |
| 1450 | - group ( default value is 'nova' ) this parameter is optional |
| 1451 | - mode ( default value is '0640' ) this parameter is optional |
| 1452 | |
| 1453 | 'directories' - block to set permissions for directories. |
| 1454 | - full path to directory |
| 1455 | - user ( default value is 'root' ) this parameter is optional |
| 1456 | - group ( default value is 'nova' ) this parameter is optional |
| 1457 | - mode ( default value is '0750' ) this parameter is optional |
| 1458 | |
| 1459 | .. code-block:: yaml |
| 1460 | |
| 1461 | nova: |
| 1462 | files: |
| 1463 | /etc/nova/nova.conf: |
| 1464 | user: 'root' |
| 1465 | group: 'nova' |
| 1466 | mode: '0750' |
| 1467 | directories: |
| 1468 | /etc/nova: |
| 1469 | user: 'root' |
| 1470 | group: 'nova' |
| 1471 | mode: '0750' |
| 1472 | |
| 1473 | |
Oleh Hryhorov | 63ee845 | 2018-08-14 09:16:02 +0000 | [diff] [blame] | 1474 | Upgrades |
| 1475 | ======== |
| 1476 | |
| 1477 | Each openstack formula provide set of phases (logical bloks) that will help to |
| 1478 | build flexible upgrade orchestration logic for particular components. The list |
| 1479 | of phases might and theirs descriptions are listed in table below: |
| 1480 | |
| 1481 | +-------------------------------+------------------------------------------------------+ |
| 1482 | | State | Description | |
| 1483 | +===============================+======================================================+ |
| 1484 | | <app>.upgrade.service_running | Ensure that all services for particular application | |
| 1485 | | | are enabled for autostart and running | |
| 1486 | +-------------------------------+------------------------------------------------------+ |
| 1487 | | <app>.upgrade.service_stopped | Ensure that all services for particular application | |
| 1488 | | | disabled for autostart and dead | |
| 1489 | +-------------------------------+------------------------------------------------------+ |
| 1490 | | <app>.upgrade.pkgs_latest | Ensure that packages used by particular application | |
| 1491 | | | are installed to latest available version. | |
| 1492 | | | This will not upgrade data plane packages like qemu | |
| 1493 | | | and openvswitch as usually minimal required version | |
| 1494 | | | in openstack services is really old. The data plane | |
| 1495 | | | packages should be upgraded separately by `apt-get | |
| 1496 | | | upgrade` or `apt-get dist-upgrade` | |
| 1497 | | | Applying this state will not autostart service. | |
| 1498 | +-------------------------------+------------------------------------------------------+ |
| 1499 | | <app>.upgrade.render_config | Ensure configuration is rendered actual version. + |
| 1500 | +-------------------------------+------------------------------------------------------+ |
| 1501 | | <app>.upgrade.pre | We assume this state is applied on all nodes in the | |
| 1502 | | | cloud before running upgrade. | |
| 1503 | | | Only non destructive actions will be applied during | |
| 1504 | | | this phase. Perform service built in service check | |
| 1505 | | | like (keystone-manage doctor and nova-status upgrade)| |
| 1506 | +-------------------------------+------------------------------------------------------+ |
| 1507 | | <app>.upgrade.upgrade.pre | Mostly applicable for data plane nodes. During this | |
| 1508 | | | phase resources will be gracefully removed from | |
| 1509 | | | current node if it is allowed. Services for upgraded | |
| 1510 | | | application will be set to admin disabled state to | |
| 1511 | | | make sure node will not participate in resources | |
| 1512 | | | scheduling. For example on gtw nodes this will set | |
| 1513 | | | all agents to admin disable state and will move all | |
| 1514 | | | routers to other agents. | |
| 1515 | +-------------------------------+------------------------------------------------------+ |
| 1516 | | <app>.upgrade.upgrade | This state will basically upgrade application on | |
| 1517 | | | particular target. Stop services, render | |
| 1518 | | | configuration, install new packages, run offline | |
| 1519 | | | dbsync (for ctl), start services. Data plane should | |
| 1520 | | | not be affected, only OpenStack python services. | |
| 1521 | +-------------------------------+------------------------------------------------------+ |
| 1522 | | <app>.upgrade.upgrade.post | Add services back to scheduling. | |
| 1523 | +-------------------------------+------------------------------------------------------+ |
| 1524 | | <app>.upgrade.post | This phase should be launched only when upgrade of | |
| 1525 | | | the cloud is completed. Cleanup temporary files, | |
| 1526 | | | perform other post upgrade tasks. | |
| 1527 | +-------------------------------+------------------------------------------------------+ |
| 1528 | | <app>.upgrade.verify | Here we will do basic health checks (API CRUD | |
| 1529 | | | operations, verify do not have dead network | |
| 1530 | | | agents/compute services) | |
| 1531 | +-------------------------------+------------------------------------------------------+ |
Oleksandr Pidrepnyi | 60df872 | 2019-06-07 16:18:11 +0300 | [diff] [blame] | 1532 | |
| 1533 | |
| 1534 | Don't manage services scheduling while upgrade |
| 1535 | ---------------------------------------------- |
| 1536 | For some special cases, don't manage services scheduling both enable and disable |
| 1537 | before and after upgrade procedure. |
| 1538 | |
| 1539 | If 'manage_service_maintenance: true' or not present - default behavior, disable services |
| 1540 | before upgrade and enable it after upgrade. |
| 1541 | If 'manage_service_maintenance: false' - don't disable and don't enable upgraded services |
| 1542 | scheduling before and after upgrade. |
| 1543 | |
| 1544 | .. code-block:: yaml |
| 1545 | |
| 1546 | nova: |
| 1547 | upgrade: |
| 1548 | manage_service_maintenance: false |
Dzmitry Stremkouski | c664e80 | 2020-07-06 20:02:58 +0200 | [diff] [blame] | 1549 | |
| 1550 | Execute database maintenance tasks |
| 1551 | ---------------------------------- |
| 1552 | Cleanup stale records from nova database to make it smaller. |
| 1553 | This is helpful before any upgrade activity. |
| 1554 | It is safe to execute it generally without maintenance window same as online db_sync. |
| 1555 | |
| 1556 | Enable this pillar: |
| 1557 | |
| 1558 | .. code-block:: yaml |
| 1559 | |
| 1560 | nova: |
| 1561 | controller: |
| 1562 | db_purge: |
| 1563 | enabled: True |
| 1564 | |
| 1565 | Execute state nova.db.db_cleanup to purge stale records: |
| 1566 | |
| 1567 | .. code-block:: bash |
| 1568 | |
| 1569 | salt -C 'I@nova:controller:role:primary' state.apply nova.db.db_cleanup -l debug |
| 1570 | |
| 1571 | Starting from rocky release it is possible to pass days parameter. |
| 1572 | If you skip setting it, all records would be archived/purged: |
| 1573 | |
| 1574 | .. code-block:: yaml |
| 1575 | |
| 1576 | nova: |
| 1577 | controller: |
| 1578 | db_purge: |
| 1579 | enabled: True |
| 1580 | days: 45 |
| 1581 | |
| 1582 | Control pre-rocky releases parameters: |
| 1583 | |
| 1584 | .. code-block:: yaml |
| 1585 | |
| 1586 | nova: |
| 1587 | controller: |
| 1588 | db_purge: |
| 1589 | enabled: True |
| 1590 | max_rows: 1000 |
| 1591 | verbose: True |
| 1592 | |
| 1593 | Control rocky+ releases parameters: |
| 1594 | 'days' and 'all' parameters are mutually exclusive. |
| 1595 | |
| 1596 | .. code-block:: yaml |
| 1597 | |
| 1598 | nova: |
| 1599 | controller: |
| 1600 | db_purge: |
| 1601 | enabled: True |
| 1602 | all: True |
| 1603 | verbose: True |
| 1604 | all_cells: True |
Vladimir Khlyunev | 03ae211 | 2020-09-15 12:39:55 +0400 | [diff] [blame] | 1605 | |
| 1606 | |
| 1607 | Configure filter schedulers |
| 1608 | --------------------------- |
| 1609 | At this moment only max_instances_per_host for NumInstancesFilter is supported. |
| 1610 | |
| 1611 | .. code-block:: yaml |
| 1612 | |
| 1613 | nova: |
| 1614 | controller: |
| 1615 | filter_scheduler: |
| 1616 | max_instances_per_host: 50 |