| 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 | 
| Ivan Berezovskiy | f1869a3 | 2019-11-14 20:17:58 +0400 | [diff] [blame] | 36 | concurrency: | 
|  | 37 | lock_path: '/var/lib/nova/tmp' | 
| sgarbuz | cc02c7f | 2018-10-25 14:29:30 +0300 | [diff] [blame] | 38 | consoleauth: | 
|  | 39 | token_ttl: 600 | 
| Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 40 | bind: | 
|  | 41 | public_address: 10.0.0.122 | 
|  | 42 | public_name: openstack.domain.com | 
|  | 43 | novncproxy_port: 6080 | 
|  | 44 | database: | 
|  | 45 | engine: mysql | 
|  | 46 | host: 127.0.0.1 | 
|  | 47 | port: 3306 | 
|  | 48 | name: nova | 
|  | 49 | user: nova | 
|  | 50 | password: pwd | 
|  | 51 | identity: | 
|  | 52 | engine: keystone | 
|  | 53 | host: 127.0.0.1 | 
|  | 54 | port: 35357 | 
|  | 55 | user: nova | 
|  | 56 | password: pwd | 
|  | 57 | tenant: service | 
| Dzmitry Stremkouski | fb2289a | 2019-05-26 01:20:42 +0200 | [diff] [blame] | 58 | interface: internal | 
|  | 59 | valid_interfaces: | 
|  | 60 | - internal | 
| Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 61 | message_queue: | 
|  | 62 | engine: rabbitmq | 
|  | 63 | host: 127.0.0.1 | 
|  | 64 | port: 5672 | 
|  | 65 | user: openstack | 
|  | 66 | password: pwd | 
|  | 67 | virtual_host: '/openstack' | 
| Oleh Hryhorov | f5093b8 | 2018-10-17 11:16:08 +0000 | [diff] [blame] | 68 | pci: | 
|  | 69 | alias: | 
|  | 70 | alias1: | 
|  | 71 | device_type: "type-PF" | 
|  | 72 | name: "a1" | 
|  | 73 | product_id: "154d" | 
|  | 74 | vendor_id: "8086" | 
| Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 75 | network: | 
|  | 76 | engine: neutron | 
|  | 77 | host: 127.0.0.1 | 
|  | 78 | port: 9696 | 
| Jakub Pavlik | 617a896 | 2016-09-04 18:50:06 +0200 | [diff] [blame] | 79 | extension_sync_interval: 600 | 
| Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 80 | identity: | 
|  | 81 | engine: keystone | 
|  | 82 | host: 127.0.0.1 | 
|  | 83 | port: 35357 | 
|  | 84 | user: neutron | 
|  | 85 | password: pwd | 
|  | 86 | tenant: service | 
|  | 87 | metadata: | 
|  | 88 | password: password | 
| Petr Michalec | aa23dc0 | 2016-11-29 16:30:25 +0100 | [diff] [blame] | 89 | audit: | 
|  | 90 | enabled: false | 
| Simon Pasquier | 8683b7a | 2017-02-03 16:00:16 +0100 | [diff] [blame] | 91 | osapi_max_limit: 500 | 
| Oleg Iurchenko | 370c10d | 2017-10-19 14:03:37 +0300 | [diff] [blame] | 92 | barbican: | 
|  | 93 | enabled: true | 
| Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 94 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 95 | Nova services from custom package repository: | 
| Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 96 |  | 
|  | 97 | .. code-block:: yaml | 
|  | 98 |  | 
|  | 99 | nova: | 
|  | 100 | controller: | 
|  | 101 | version: juno | 
|  | 102 | source: | 
|  | 103 | engine: pkg | 
|  | 104 | address: http://... | 
|  | 105 | .... | 
|  | 106 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 107 | Client-side RabbitMQ HA setup: | 
| Jiri Konecny | e31f2c5 | 2016-04-14 17:16:02 +0200 | [diff] [blame] | 108 |  | 
|  | 109 | .. code-block:: yaml | 
|  | 110 |  | 
|  | 111 | nova: | 
|  | 112 | controller: | 
|  | 113 | .... | 
|  | 114 | message_queue: | 
|  | 115 | engine: rabbitmq | 
|  | 116 | members: | 
|  | 117 | - host: 10.0.16.1 | 
|  | 118 | - host: 10.0.16.2 | 
|  | 119 | - host: 10.0.16.3 | 
|  | 120 | user: openstack | 
|  | 121 | password: pwd | 
|  | 122 | virtual_host: '/openstack' | 
|  | 123 | .... | 
|  | 124 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 125 | Enable auditing filter, i.e: CADF: | 
| Petr Michalec | aa23dc0 | 2016-11-29 16:30:25 +0100 | [diff] [blame] | 126 |  | 
|  | 127 | .. code-block:: yaml | 
|  | 128 |  | 
|  | 129 | nova: | 
|  | 130 | controller: | 
| Simon Pasquier | 6a3c8f7 | 2016-12-19 15:37:24 +0100 | [diff] [blame] | 131 | audit: | 
| Petr Michalec | aa23dc0 | 2016-11-29 16:30:25 +0100 | [diff] [blame] | 132 | enabled: true | 
|  | 133 | .... | 
|  | 134 | filter_factory: 'keystonemiddleware.audit:filter_factory' | 
|  | 135 | map_file: '/etc/pycadf/nova_api_audit_map.conf' | 
|  | 136 | .... | 
|  | 137 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 138 | Enable CORS parameters: | 
| Ondrej Smola | 25b53cb | 2017-04-28 10:56:19 +0200 | [diff] [blame] | 139 |  | 
|  | 140 | .. code-block:: yaml | 
|  | 141 |  | 
|  | 142 | nova: | 
|  | 143 | controller: | 
|  | 144 | cors: | 
|  | 145 | allowed_origin: https:localhost.local,http:localhost.local | 
|  | 146 | expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token | 
|  | 147 | allow_methods: GET,PUT,POST,DELETE,PATCH | 
|  | 148 | allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token | 
|  | 149 | allow_credentials: True | 
|  | 150 | max_age: 86400 | 
|  | 151 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 152 | Configuration of the ``policy.json`` file: | 
| Dmitry Ukov | 3562a08 | 2017-05-04 00:00:48 +0400 | [diff] [blame] | 153 |  | 
|  | 154 | .. code-block:: yaml | 
|  | 155 |  | 
|  | 156 | nova: | 
|  | 157 | controller: | 
|  | 158 | .... | 
|  | 159 | policy: | 
|  | 160 | context_is_admin: 'role:admin or role:administrator' | 
|  | 161 | 'compute:create': 'rule:admin_or_owner' | 
|  | 162 | # Add key without value to remove line from policy.json | 
|  | 163 | 'compute:create:attach_network': | 
| Ondrej Smola | 25b53cb | 2017-04-28 10:56:19 +0200 | [diff] [blame] | 164 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 165 | Enable Barbican integration: | 
| Oleg Iurchenko | 370c10d | 2017-10-19 14:03:37 +0300 | [diff] [blame] | 166 |  | 
|  | 167 | .. code-block:: yaml | 
|  | 168 |  | 
|  | 169 | nova: | 
|  | 170 | controller: | 
|  | 171 | .... | 
|  | 172 | barbican: | 
|  | 173 | enabled: true | 
|  | 174 |  | 
| Oleh Hryhorov | f5093b8 | 2018-10-17 11:16:08 +0000 | [diff] [blame] | 175 | Define aliases for PCI devices: | 
|  | 176 | .. code-block:: yaml | 
|  | 177 |  | 
|  | 178 | nova: | 
|  | 179 | controller: | 
|  | 180 | ... | 
|  | 181 | pci: | 
|  | 182 | alias: | 
|  | 183 | alias1: | 
|  | 184 | device_type: "type-PF" | 
|  | 185 | name: "a1" | 
|  | 186 | product_id: "154d" | 
|  | 187 | vendor_id: "8086" | 
|  | 188 |  | 
| Jiri Broulik | 789179a | 2018-02-13 16:16:46 +0100 | [diff] [blame] | 189 | Enable cells update: | 
|  | 190 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 191 | .. note:: Useful when upgrading Openstack. To update cells to test | 
|  | 192 | sync db agains duplicated production database. | 
| Jiri Broulik | 789179a | 2018-02-13 16:16:46 +0100 | [diff] [blame] | 193 |  | 
|  | 194 | .. code-block:: yaml | 
|  | 195 |  | 
|  | 196 | nova: | 
|  | 197 | controller: | 
|  | 198 | update_cells: true | 
|  | 199 |  | 
| Dzmitry Stremkouski | b139f14 | 2019-11-03 10:36:46 +0100 | [diff] [blame] | 200 | Increase number of chunks for online db migrations: | 
|  | 201 |  | 
|  | 202 | .. note:: This only should be done in offline as large number of | 
|  | 203 | rows locked by this process may cause service outage, which | 
|  | 204 | may not be expected. | 
|  | 205 |  | 
|  | 206 | .. code-block:: yaml | 
|  | 207 |  | 
|  | 208 | nova: | 
|  | 209 | controller: | 
|  | 210 | db_migrations: | 
|  | 211 | max_count: 5000000 | 
| Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 212 |  | 
| Kirill Bespalov | a0eaca7 | 2017-11-20 13:40:42 +0300 | [diff] [blame] | 213 | Configuring TLS communications | 
|  | 214 | ------------------------------ | 
| Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 215 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 216 | .. note:: By default system wide installed CA certs are used, | 
|  | 217 | so ``cacert_file`` param is optional, as well as ``cacert``. | 
| Kirill Bespalov | a0eaca7 | 2017-11-20 13:40:42 +0300 | [diff] [blame] | 218 |  | 
|  | 219 | - **RabbitMQ TLS** | 
| Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 220 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 221 | .. code-block:: yaml | 
| Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 222 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 223 | nova: | 
|  | 224 | compute: | 
|  | 225 | message_queue: | 
|  | 226 | port: 5671 | 
|  | 227 | ssl: | 
|  | 228 | enabled: True | 
|  | 229 | (optional) cacert: cert body if the cacert_file does not exists | 
|  | 230 | (optional) cacert_file: /etc/openstack/rabbitmq-ca.pem | 
|  | 231 | (optional) version: TLSv1_2 | 
| Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 232 |  | 
| Kirill Bespalov | a0eaca7 | 2017-11-20 13:40:42 +0300 | [diff] [blame] | 233 | - **MySQL TLS** | 
| Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 234 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 235 | .. code-block:: yaml | 
| Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 236 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 237 | nova: | 
|  | 238 | controller: | 
|  | 239 | database: | 
|  | 240 | ssl: | 
|  | 241 | enabled: True | 
|  | 242 | (optional) cacert: cert body if the cacert_file does not exists | 
|  | 243 | (optional) cacert_file: /etc/openstack/mysql-ca.pem | 
| Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 244 |  | 
| Kirill Bespalov | a0eaca7 | 2017-11-20 13:40:42 +0300 | [diff] [blame] | 245 | - **Openstack HTTPS API** | 
|  | 246 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 247 | Set the ``https`` as protocol at ``nova:compute`` and | 
|  | 248 | ``nova:controller`` sections : | 
| Kirill Bespalov | a0eaca7 | 2017-11-20 13:40:42 +0300 | [diff] [blame] | 249 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 250 | .. code-block:: yaml | 
| Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 251 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 252 | nova: | 
|  | 253 | controller : | 
|  | 254 | identity: | 
|  | 255 | protocol: https | 
|  | 256 | (optional) cacert_file: /etc/openstack/proxy.pem | 
|  | 257 | network: | 
|  | 258 | protocol: https | 
|  | 259 | (optional) cacert_file: /etc/openstack/proxy.pem | 
|  | 260 | glance: | 
|  | 261 | protocol: https | 
|  | 262 | (optional) cacert_file: /etc/openstack/proxy.pem | 
| Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 263 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 264 | .. code-block:: yaml | 
| Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 265 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 266 | nova: | 
|  | 267 | compute: | 
|  | 268 | identity: | 
|  | 269 | protocol: https | 
|  | 270 | (optional) cacert_file: /etc/openstack/proxy.pem | 
|  | 271 | network: | 
|  | 272 | protocol: https | 
|  | 273 | (optional) cacert_file: /etc/openstack/proxy.pem | 
|  | 274 | image: | 
|  | 275 | protocol: https | 
|  | 276 | (optional) cacert_file: /etc/openstack/proxy.pem | 
|  | 277 | ironic: | 
|  | 278 | protocol: https | 
|  | 279 | (optional) cacert_file: /etc/openstack/proxy.pem | 
| Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 280 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 281 | .. note:: Barbican, Cinder, and placement url endpoints are discovering | 
|  | 282 | using service catalog. | 
| Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 283 |  | 
| Martin Polreich | 65e2a14 | 2019-12-17 14:19:44 +0100 | [diff] [blame^] | 284 | Change default service policy configuration: | 
|  | 285 | -------------------------------------------- | 
|  | 286 |  | 
|  | 287 | .. code-block:: yaml | 
|  | 288 |  | 
|  | 289 | nova: | 
|  | 290 | controller: | 
|  | 291 | policy: | 
|  | 292 | 'context_is_admin': 'role:admin or role:administrator' | 
|  | 293 | 'compute:create': 'rule:admin_or_owner' | 
|  | 294 | # Add key without value to remove line from policy.json | 
|  | 295 | 'compute:create:attach_network': | 
|  | 296 |  | 
|  | 297 |  | 
| Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 298 | Compute nodes | 
|  | 299 | ------------- | 
|  | 300 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 301 | Nova controller services on compute node: | 
| Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 302 |  | 
|  | 303 | .. code-block:: yaml | 
|  | 304 |  | 
|  | 305 | nova: | 
|  | 306 | compute: | 
|  | 307 | version: juno | 
|  | 308 | enabled: true | 
| Mykyta Karpin | 5ef9f98 | 2019-02-07 18:40:00 +0200 | [diff] [blame] | 309 | timeout_nbd: 10 | 
|  | 310 | heal_instance_info_cache_interval: 60 | 
| Dmitry Stremkovskiy | 2bcba8d | 2017-07-30 21:43:59 +0300 | [diff] [blame] | 311 | cross_az_attach: false | 
| Dmitry Stremkovskiy | 35e53b7 | 2017-07-29 12:50:39 +0300 | [diff] [blame] | 312 | disk_cachemodes: network=writeback,block=none | 
| Jiri Broulik | 70d9e3f | 2017-02-15 18:37:13 +0100 | [diff] [blame] | 313 | availability_zone: availability_zone_01 | 
| Damian Szeluga | e192241 | 2017-04-18 16:36:46 +0200 | [diff] [blame] | 314 | aggregates: | 
|  | 315 | - hosts_with_fc | 
|  | 316 | - hosts_with_ssd | 
| Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 317 | security_group: true | 
| Petr Michalec | f03e488 | 2017-04-10 10:26:18 +0200 | [diff] [blame] | 318 | resume_guests_state_on_host_boot: False | 
| Michael Polenchuk | 159c254 | 2018-06-09 15:31:51 +0400 | [diff] [blame] | 319 | preallocate_images: space  # Default is 'none' | 
| Dmitry Stremkovskiy | 8a0ff51 | 2017-07-25 20:54:13 +0300 | [diff] [blame] | 320 | my_ip: 10.1.0.16 | 
| Vasyl Saienko | 09b6ac3 | 2019-01-17 15:23:58 +0200 | [diff] [blame] | 321 | vif_plugging_timeout: 300 | 
|  | 322 | vif_plugging_is_fatal: false | 
| Ivan Berezovskiy | f1869a3 | 2019-11-14 20:17:58 +0400 | [diff] [blame] | 323 | concurrency: | 
|  | 324 | lock_path: '/var/lib/nova/tmp' | 
| Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 325 | bind: | 
|  | 326 | vnc_address: 172.20.0.100 | 
|  | 327 | vnc_port: 6080 | 
|  | 328 | vnc_name: openstack.domain.com | 
|  | 329 | vnc_protocol: http | 
|  | 330 | database: | 
|  | 331 | engine: mysql | 
|  | 332 | host: 127.0.0.1 | 
|  | 333 | port: 3306 | 
|  | 334 | name: nova | 
|  | 335 | user: nova | 
|  | 336 | password: pwd | 
|  | 337 | identity: | 
|  | 338 | engine: keystone | 
|  | 339 | host: 127.0.0.1 | 
|  | 340 | port: 35357 | 
|  | 341 | user: nova | 
|  | 342 | password: pwd | 
|  | 343 | tenant: service | 
|  | 344 | message_queue: | 
|  | 345 | engine: rabbitmq | 
|  | 346 | host: 127.0.0.1 | 
|  | 347 | port: 5672 | 
|  | 348 | user: openstack | 
|  | 349 | password: pwd | 
|  | 350 | virtual_host: '/openstack' | 
|  | 351 | image: | 
|  | 352 | engine: glance | 
|  | 353 | host: 127.0.0.1 | 
|  | 354 | port: 9292 | 
| Oleh Hryhorov | f5093b8 | 2018-10-17 11:16:08 +0000 | [diff] [blame] | 355 | pci: | 
|  | 356 | alias: | 
|  | 357 | alias1: | 
|  | 358 | device_type: "type-PF" | 
|  | 359 | name: "a1" | 
|  | 360 | product_id: "154d" | 
|  | 361 | vendor_id: "8086" | 
| Oleksandr Pidrepnyi | 14f0827 | 2019-02-20 12:48:17 +0200 | [diff] [blame] | 362 | passthrough_whitelist: | 
|  | 363 | - vendor_id: "10de" | 
|  | 364 | product_id: "1db4" | 
| Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 365 | network: | 
|  | 366 | engine: neutron | 
|  | 367 | host: 127.0.0.1 | 
|  | 368 | port: 9696 | 
|  | 369 | identity: | 
|  | 370 | engine: keystone | 
|  | 371 | host: 127.0.0.1 | 
|  | 372 | port: 35357 | 
|  | 373 | user: neutron | 
|  | 374 | password: pwd | 
|  | 375 | tenant: service | 
|  | 376 | qemu: | 
|  | 377 | max_files: 4096 | 
|  | 378 | max_processes: 4096 | 
| Dmitry Stremkovskiy | 96281f5 | 2017-07-26 00:39:22 +0300 | [diff] [blame] | 379 | host: node-12.domain.tld | 
| Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 380 |  | 
| Vasyl Saienko | cab3a90 | 2018-07-12 13:17:17 +0300 | [diff] [blame] | 381 | Compute with vmware driver. Each vmware cluster requires a separate process of nova-compute. | 
|  | 382 | Each process should have uniq host identifier. However multiple computes might be running on | 
|  | 383 | single host. It is not recommended to have multiple computes running on different hosts that | 
|  | 384 | manage the same vmware cluster. To achive this pacemaker/corosync or keepalived might be used. | 
|  | 385 |  | 
|  | 386 | .. code-block:: yaml | 
|  | 387 |  | 
|  | 388 | nova: | 
|  | 389 | compute: | 
|  | 390 | compute_driver: vmwareapi.VMwareVCDriver | 
|  | 391 | vmware: | 
|  | 392 | host_username: vmware | 
|  | 393 | host_password: vmware | 
|  | 394 | cluster_name: vmware_cluster01 | 
|  | 395 | host_ip: 1.2.3.4 | 
|  | 396 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 397 | 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] | 398 |  | 
|  | 399 | .. code-block:: yaml | 
|  | 400 |  | 
|  | 401 | nova: | 
|  | 402 | compute: | 
|  | 403 | enabled: true | 
|  | 404 | ... | 
|  | 405 | qemu: | 
|  | 406 | user: nova | 
|  | 407 | group: cinder | 
|  | 408 | dynamic_ownership: 1 | 
|  | 409 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 410 | Group membership for user nova (upgrade related): | 
| Dmitry Stremkovskiy | 3cd6ba8 | 2017-07-25 17:15:36 +0300 | [diff] [blame] | 411 |  | 
|  | 412 | .. code-block:: yaml | 
|  | 413 |  | 
|  | 414 | nova: | 
|  | 415 | compute: | 
|  | 416 | enabled: true | 
|  | 417 | ... | 
|  | 418 | user: | 
|  | 419 | groups: | 
|  | 420 | - libvirt | 
| Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 421 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 422 | Nova services on compute node with OpenContrail: | 
| Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 423 |  | 
|  | 424 | .. code-block:: yaml | 
|  | 425 |  | 
|  | 426 | nova: | 
|  | 427 | compute: | 
|  | 428 | enabled: true | 
|  | 429 | ... | 
|  | 430 | networking: contrail | 
|  | 431 |  | 
| Oleksandr Bryndzii | bb8abfe | 2018-09-28 22:21:43 +0000 | [diff] [blame] | 432 | Nova services on compute node with memcached caching and security strategy: | 
| Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 433 |  | 
|  | 434 | .. code-block:: yaml | 
|  | 435 |  | 
|  | 436 | nova: | 
|  | 437 | compute: | 
|  | 438 | enabled: true | 
|  | 439 | ... | 
|  | 440 | cache: | 
|  | 441 | engine: memcached | 
|  | 442 | members: | 
|  | 443 | - host: 127.0.0.1 | 
|  | 444 | port: 11211 | 
|  | 445 | - host: 127.0.0.1 | 
|  | 446 | port: 11211 | 
| Oleksandr Bryndzii | bb8abfe | 2018-09-28 22:21:43 +0000 | [diff] [blame] | 447 | security: | 
|  | 448 | enabled: true | 
|  | 449 | strategy: ENCRYPT | 
|  | 450 | secret_key: secret | 
| Filip Pytloun | 4a72d79 | 2015-10-06 16:28:32 +0200 | [diff] [blame] | 451 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 452 | Client-side RabbitMQ HA setup: | 
| Jiri Konecny | e31f2c5 | 2016-04-14 17:16:02 +0200 | [diff] [blame] | 453 |  | 
|  | 454 | .. code-block:: yaml | 
|  | 455 |  | 
|  | 456 | nova: | 
| Kirill Bespalov | 6461717 | 2017-07-11 14:43:14 +0300 | [diff] [blame] | 457 | compute: | 
| Jiri Konecny | e31f2c5 | 2016-04-14 17:16:02 +0200 | [diff] [blame] | 458 | .... | 
|  | 459 | message_queue: | 
|  | 460 | engine: rabbitmq | 
|  | 461 | members: | 
|  | 462 | - host: 10.0.16.1 | 
|  | 463 | - host: 10.0.16.2 | 
|  | 464 | - host: 10.0.16.3 | 
|  | 465 | user: openstack | 
|  | 466 | password: pwd | 
|  | 467 | virtual_host: '/openstack' | 
|  | 468 | .... | 
|  | 469 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 470 | Nova with ephemeral configured with Ceph: | 
| maxstack | 39e6aca | 2016-05-04 13:50:13 +0000 | [diff] [blame] | 471 |  | 
|  | 472 | .. code-block:: yaml | 
|  | 473 |  | 
|  | 474 | nova: | 
|  | 475 | compute: | 
|  | 476 | enabled: true | 
|  | 477 | ... | 
|  | 478 | ceph: | 
|  | 479 | ephemeral: yes | 
|  | 480 | rbd_pool: nova | 
|  | 481 | rbd_user: nova | 
|  | 482 | secret_uuid: 03006edd-d957-40a3-ac4c-26cd254b3731 | 
| Kalynovskyi | 0bc7969 | 2017-07-21 16:22:09 +0300 | [diff] [blame] | 483 | .... | 
| maxstack | 39e6aca | 2016-05-04 13:50:13 +0000 | [diff] [blame] | 484 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 485 | Nova with ephemeral configured with LVM: | 
| Kalynovskyi | 0bc7969 | 2017-07-21 16:22:09 +0300 | [diff] [blame] | 486 |  | 
|  | 487 | .. code-block:: yaml | 
|  | 488 |  | 
|  | 489 | nova: | 
|  | 490 | compute: | 
|  | 491 | enabled: true | 
|  | 492 | ... | 
|  | 493 | lvm: | 
|  | 494 | ephemeral: yes | 
|  | 495 | images_volume_group: nova_vg | 
|  | 496 |  | 
|  | 497 | linux: | 
|  | 498 | storage: | 
|  | 499 | lvm: | 
|  | 500 | nova_vg: | 
|  | 501 | name: nova_vg | 
|  | 502 | devices: | 
|  | 503 | - /dev/sdf | 
|  | 504 | - /dev/sdd | 
|  | 505 | - /dev/sdg | 
|  | 506 | - /dev/sde | 
|  | 507 | - /dev/sdc | 
|  | 508 | - /dev/sdj | 
|  | 509 | - /dev/sdh | 
| maxstack | 39e6aca | 2016-05-04 13:50:13 +0000 | [diff] [blame] | 510 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 511 | Enable Barbican integration: | 
| Oleg Iurchenko | 370c10d | 2017-10-19 14:03:37 +0300 | [diff] [blame] | 512 |  | 
|  | 513 | .. code-block:: yaml | 
|  | 514 |  | 
|  | 515 | nova: | 
|  | 516 | compute: | 
|  | 517 | .... | 
|  | 518 | barbican: | 
|  | 519 | enabled: true | 
|  | 520 |  | 
| Oleksandr Pidrepnyi | 14f0827 | 2019-02-20 12:48:17 +0200 | [diff] [blame] | 521 | Define aliases for a PCI passthrough devices: | 
| Oleh Hryhorov | f5093b8 | 2018-10-17 11:16:08 +0000 | [diff] [blame] | 522 | .. code-block:: yaml | 
|  | 523 |  | 
|  | 524 | nova: | 
|  | 525 | compute: | 
|  | 526 | ... | 
|  | 527 | pci: | 
|  | 528 | alias: | 
|  | 529 | alias1: | 
|  | 530 | device_type: "type-PF" | 
|  | 531 | name: "a1" | 
|  | 532 | product_id: "154d" | 
|  | 533 | vendor_id: "8086" | 
|  | 534 |  | 
| Oleksandr Pidrepnyi | 14f0827 | 2019-02-20 12:48:17 +0200 | [diff] [blame] | 535 | Define white list of PCI devices available to VMs: | 
|  | 536 | .. code-block:: yaml | 
|  | 537 |  | 
|  | 538 | nova: | 
|  | 539 | compute: | 
|  | 540 | ... | 
|  | 541 | pci: | 
|  | 542 | passthrough_whitelist: | 
|  | 543 | - vendor_id: "10de" | 
|  | 544 | product_id: "1db4" | 
|  | 545 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 546 | Nova metadata custom bindings: | 
| Vasyl Saienko | 2d59128 | 2018-02-05 14:19:02 +0200 | [diff] [blame] | 547 |  | 
|  | 548 | .. code-block:: yaml | 
|  | 549 |  | 
|  | 550 | nova: | 
|  | 551 | controller: | 
|  | 552 | enabled: true | 
|  | 553 | ... | 
|  | 554 | metadata: | 
|  | 555 | bind: | 
|  | 556 | address: 1.2.3.4 | 
|  | 557 | port: 8776 | 
|  | 558 |  | 
| Oleh Hryhorov | 08482aa | 2018-11-19 14:07:47 +0200 | [diff] [blame] | 559 | Define multipath for nova compute: | 
|  | 560 |  | 
|  | 561 | .. code-block:: yaml | 
|  | 562 |  | 
|  | 563 | nova: | 
|  | 564 | compute: | 
|  | 565 | .... | 
|  | 566 | libvirt: | 
|  | 567 | volume_use_multipath: True | 
|  | 568 |  | 
| Oleh Hryhorov | ce1f214 | 2019-03-06 17:00:00 +0000 | [diff] [blame] | 569 | To disable or enable StrictHostKeyChecking and discover | 
|  | 570 | compute nodes fingerprints the below pillar should be used: | 
|  | 571 |  | 
|  | 572 | .. code-block:: yaml | 
|  | 573 |  | 
|  | 574 | nova: | 
|  | 575 | compute: | 
|  | 576 | .... | 
|  | 577 | openssh: | 
|  | 578 | stricthostkeychecking: True | 
|  | 579 | discover_compute_hosts: True | 
|  | 580 |  | 
| Jiri Broulik | 0ce9fc9 | 2017-02-01 23:10:40 +0100 | [diff] [blame] | 581 | Client role | 
|  | 582 | ----------- | 
|  | 583 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 584 | Nova configured with NFS: | 
| Dmitry Stremkovskiy | 665c728 | 2017-07-05 17:36:27 +0300 | [diff] [blame] | 585 |  | 
|  | 586 | .. code-block:: yaml | 
|  | 587 |  | 
|  | 588 | nova: | 
|  | 589 | compute: | 
|  | 590 | instances_path: /mnt/nova/instances | 
|  | 591 |  | 
|  | 592 | linux: | 
|  | 593 | storage: | 
|  | 594 | enabled: true | 
|  | 595 | mount: | 
|  | 596 | nfs_nova: | 
|  | 597 | enabled: true | 
|  | 598 | path: ${nova:compute:instances_path} | 
|  | 599 | device: 172.31.35.145:/data | 
|  | 600 | file_system: nfs | 
|  | 601 | opts: rw,vers=3 | 
|  | 602 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 603 | Nova flavors: | 
| Jiri Broulik | 0ce9fc9 | 2017-02-01 23:10:40 +0100 | [diff] [blame] | 604 |  | 
|  | 605 | .. code-block:: yaml | 
|  | 606 |  | 
|  | 607 | nova: | 
|  | 608 | client: | 
|  | 609 | enabled: true | 
|  | 610 | server: | 
|  | 611 | identity: | 
|  | 612 | flavor: | 
| Jiri Broulik | 70d9e3f | 2017-02-15 18:37:13 +0100 | [diff] [blame] | 613 | flavor1: | 
| Jiri Broulik | 0ce9fc9 | 2017-02-01 23:10:40 +0100 | [diff] [blame] | 614 | flavor_id: 10 | 
|  | 615 | ram: 4096 | 
|  | 616 | disk: 10 | 
|  | 617 | vcpus: 1 | 
| Jiri Broulik | 70d9e3f | 2017-02-15 18:37:13 +0100 | [diff] [blame] | 618 | flavor2: | 
|  | 619 | flavor_id: auto | 
|  | 620 | ram: 4096 | 
|  | 621 | disk: 20 | 
|  | 622 | vcpus: 2 | 
| Jiri Broulik | 0ce9fc9 | 2017-02-01 23:10:40 +0100 | [diff] [blame] | 623 | identity1: | 
|  | 624 | flavor: | 
|  | 625 | ... | 
|  | 626 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 627 | Availability zones: | 
| Jiri Broulik | 70d9e3f | 2017-02-15 18:37:13 +0100 | [diff] [blame] | 628 |  | 
|  | 629 | .. code-block:: yaml | 
|  | 630 |  | 
|  | 631 | nova: | 
|  | 632 | client: | 
|  | 633 | enabled: true | 
|  | 634 | server: | 
|  | 635 | identity: | 
|  | 636 | availability_zones: | 
|  | 637 | - availability_zone_01 | 
|  | 638 | - availability_zone_02 | 
|  | 639 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 640 | Aggregates: | 
| Damian Szeluga | 5dca0f0 | 2017-04-13 17:27:15 +0200 | [diff] [blame] | 641 |  | 
|  | 642 | .. code-block:: yaml | 
|  | 643 |  | 
|  | 644 | nova: | 
|  | 645 | client: | 
|  | 646 | enabled: true | 
|  | 647 | server: | 
|  | 648 | identity: | 
|  | 649 | aggregates: | 
|  | 650 | - aggregate1 | 
|  | 651 | - aggregate2 | 
|  | 652 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 653 | Upgrade levels: | 
| Dmitry Stremkovskiy | 91f4585 | 2017-07-18 16:22:31 +0300 | [diff] [blame] | 654 |  | 
|  | 655 | .. code-block:: yaml | 
|  | 656 |  | 
|  | 657 | nova: | 
|  | 658 | controller: | 
|  | 659 | upgrade_levels: | 
|  | 660 | compute: juno | 
|  | 661 |  | 
|  | 662 | nova: | 
|  | 663 | compute: | 
|  | 664 | upgrade_levels: | 
|  | 665 | compute: juno | 
|  | 666 |  | 
| Petr Jediný | d855ef2 | 2017-03-06 22:24:33 +0100 | [diff] [blame] | 667 | SR-IOV | 
| Jakub Pavlik | 39a0594 | 2017-02-13 23:03:08 +0100 | [diff] [blame] | 668 | ------ | 
|  | 669 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 670 | Add ``PciPassthroughFilter`` into scheduler filters and NICs on | 
|  | 671 | specific compute nodes: | 
| Jakub Pavlik | 39a0594 | 2017-02-13 23:03:08 +0100 | [diff] [blame] | 672 |  | 
|  | 673 | .. code-block:: yaml | 
|  | 674 |  | 
|  | 675 | nova: | 
|  | 676 | controller: | 
|  | 677 | sriov: true | 
| sandriichenko | 4fe321d | 2018-01-22 17:34:06 +0000 | [diff] [blame] | 678 | 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] | 679 |  | 
|  | 680 | nova: | 
|  | 681 | compute: | 
|  | 682 | sriov: | 
|  | 683 | nic_one: | 
|  | 684 | devname: eth1 | 
|  | 685 | physical_network: physnet1 | 
|  | 686 |  | 
| Oleh Hryhorov | f5093b8 | 2018-10-17 11:16:08 +0000 | [diff] [blame] | 687 | .. note:: Parameters located under nova:compute:sriov:<nic_name> are copied to passthrough_whitelist parameter into | 
|  | 688 | nova.conf file in appropriate format. | 
|  | 689 |  | 
| Jakub Pavlik | 26fb85c | 2017-02-16 22:29:22 +0100 | [diff] [blame] | 690 | CPU pinning & Hugepages | 
|  | 691 | ----------------------- | 
|  | 692 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 693 | CPU pinning of virtual machine instances to dedicated physical | 
|  | 694 | CPU cores. Hugepages mount point for libvirt. | 
| Jakub Pavlik | 26fb85c | 2017-02-16 22:29:22 +0100 | [diff] [blame] | 695 |  | 
|  | 696 | .. code-block:: yaml | 
|  | 697 |  | 
|  | 698 | nova: | 
|  | 699 | controller: | 
| sandriichenko | 4fe321d | 2018-01-22 17:34:06 +0000 | [diff] [blame] | 700 | 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] | 701 |  | 
|  | 702 | nova: | 
|  | 703 | compute: | 
|  | 704 | vcpu_pin_set: 2,3,4,5 | 
|  | 705 | hugepages: | 
|  | 706 | mount_points: | 
|  | 707 | - path: /mnt/hugepages_1GB | 
|  | 708 | - path: /mnt/hugepages_2MB | 
| Jiri Broulik | 0ce9fc9 | 2017-02-01 23:10:40 +0100 | [diff] [blame] | 709 |  | 
| Michel Nederlof | 171c7ac | 2017-04-13 12:54:14 +0200 | [diff] [blame] | 710 | Custom Scheduler filters | 
|  | 711 | ------------------------ | 
|  | 712 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 713 | If you have a custom filter, that needs to be included in the | 
|  | 714 | scheduler, then you can include it like so: | 
| Michel Nederlof | 171c7ac | 2017-04-13 12:54:14 +0200 | [diff] [blame] | 715 |  | 
|  | 716 | .. code-block:: yaml | 
|  | 717 |  | 
|  | 718 | nova: | 
|  | 719 | controller: | 
|  | 720 | scheduler_custom_filters: | 
|  | 721 | - my_custom_driver.nova.scheduler.filters.my_custom_filter.MyCustomFilter | 
|  | 722 |  | 
|  | 723 | # 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] | 724 | 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] | 725 |  | 
| Michael Polenchuk | 2bce2cb | 2018-09-17 16:05:43 +0400 | [diff] [blame] | 726 | # Since Queens version a sequence could be used as well: | 
|  | 727 | ~scheduler_default_filters: | 
|  | 728 | - DifferentHostFilter | 
|  | 729 | - SameHostFilter | 
|  | 730 | ... | 
|  | 731 | - MyCustomFilter | 
|  | 732 |  | 
|  | 733 |  | 
| Michel Nederlof | eb566f6 | 2017-04-21 15:37:47 +0200 | [diff] [blame] | 734 | Hardware Trip/Unmap Support | 
|  | 735 | --------------------------- | 
|  | 736 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 737 | To enable TRIM support for ephemeral images (thru nova managed | 
|  | 738 | images), libvirt has this option: | 
| Michel Nederlof | eb566f6 | 2017-04-21 15:37:47 +0200 | [diff] [blame] | 739 |  | 
|  | 740 | .. code-block:: yaml | 
|  | 741 |  | 
|  | 742 | nova: | 
|  | 743 | compute: | 
|  | 744 | libvirt: | 
|  | 745 | hw_disk_discard: unmap | 
|  | 746 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 747 | To actually utilize this feature, the following metadata must be | 
|  | 748 | set on the image as well, so the SCSI unmap is supported: | 
| Michel Nederlof | eb566f6 | 2017-04-21 15:37:47 +0200 | [diff] [blame] | 749 |  | 
|  | 750 | .. code-block:: bash | 
|  | 751 |  | 
|  | 752 | glance image-update --property hw_scsi_model=virtio-scsi <image> | 
|  | 753 | glance image-update --property hw_disk_bus=scsi <image> | 
| Filip Pytloun | 5bc9e9f | 2017-02-02 13:05:40 +0100 | [diff] [blame] | 754 |  | 
| Thom Gerdes | f582f1e | 2017-05-02 18:05:50 +0000 | [diff] [blame] | 755 | Scheduler Host Manager | 
|  | 756 | ---------------------- | 
|  | 757 |  | 
|  | 758 | Specify a custom host manager. | 
|  | 759 |  | 
| Thom Gerdes | ec00afd | 2017-04-07 18:06:59 +0000 | [diff] [blame] | 760 | libvirt CPU mode | 
|  | 761 | ---------------- | 
|  | 762 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 763 | Allow setting the model of CPU that is exposed to a VM. This | 
|  | 764 | allows for better support live migration between hypervisors with | 
|  | 765 | different hardware, among other things. Defaults to host-passthrough. | 
| Jakub Pavlik | 7046b9c | 2017-09-19 12:04:19 +0200 | [diff] [blame] | 766 |  | 
| Thom Gerdes | f582f1e | 2017-05-02 18:05:50 +0000 | [diff] [blame] | 767 | .. code-block:: yaml | 
|  | 768 |  | 
|  | 769 | nova: | 
|  | 770 | controller: | 
|  | 771 | scheduler_host_manager: ironic_host_manager | 
|  | 772 |  | 
| Thom Gerdes | ec00afd | 2017-04-07 18:06:59 +0000 | [diff] [blame] | 773 | compute: | 
|  | 774 | cpu_mode: host-model | 
|  | 775 |  | 
| Dzmitry Stremkouski | 7da9bf1 | 2018-04-25 22:30:37 +0200 | [diff] [blame] | 776 | Nova compute cpu model | 
|  | 777 | ---------------------- | 
|  | 778 |  | 
|  | 779 | .. code-block:: yaml | 
|  | 780 |  | 
|  | 781 | nova: | 
|  | 782 | compute: | 
|  | 783 | cpu_mode: custom | 
|  | 784 | libvirt: | 
|  | 785 | cpu_model: IvyBridge | 
|  | 786 |  | 
| Oleksandr Pidrepnyi | d902008 | 2019-03-04 19:18:19 +0200 | [diff] [blame] | 787 | RNG (Random Number Generator) device path | 
|  | 788 | ---------------------- | 
|  | 789 |  | 
|  | 790 | The path to an RNG (Random Number Generator) device that will be used | 
|  | 791 | as the source of entropy on the host. | 
|  | 792 | The recommended source of entropy is /dev/urandom. | 
|  | 793 | Permitted options are: /dev/random, /dev/urandom or /dev/hwrng. | 
|  | 794 | Default: /dev/urandom | 
|  | 795 |  | 
|  | 796 | .. code-block:: yaml | 
|  | 797 |  | 
|  | 798 | nova: | 
|  | 799 | controller: | 
|  | 800 | libvirt: | 
|  | 801 | rng_dev_path: /dev/random | 
|  | 802 |  | 
|  | 803 | compute: | 
|  | 804 | libvirt: | 
|  | 805 | rng_dev_path: /dev/random | 
|  | 806 |  | 
| Dzmitry Stremkouski | 7da9bf1 | 2018-04-25 22:30:37 +0200 | [diff] [blame] | 807 |  | 
| Michel Nederlof | f7eefb2 | 2017-07-10 11:14:33 +0200 | [diff] [blame] | 808 | Nova compute workarounds | 
|  | 809 | ------------------------ | 
|  | 810 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 811 | Live snapshotting is disabled by default in nova. To enable | 
|  | 812 | this, it needs a manual switch. | 
| Michel Nederlof | f7eefb2 | 2017-07-10 11:14:33 +0200 | [diff] [blame] | 813 |  | 
|  | 814 | From manual: | 
|  | 815 |  | 
|  | 816 | .. code-block:: yaml | 
|  | 817 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 818 | When using libvirt 1.2.2 live snapshots fail intermittently under load | 
|  | 819 | (likely related to concurrent libvirt/qemu operations). This config | 
|  | 820 | option provides a mechanism to disable live snapshot, in favor of cold | 
|  | 821 | snapshot, while this is resolved. Cold snapshot causes an instance | 
|  | 822 | outage while the guest is going through the snapshotting process. | 
|  | 823 |  | 
|  | 824 | For more information, refer to the bug report: | 
|  | 825 |  | 
|  | 826 | https://bugs.launchpad.net/nova/+bug/1334398 | 
| Michel Nederlof | f7eefb2 | 2017-07-10 11:14:33 +0200 | [diff] [blame] | 827 |  | 
|  | 828 | Configurable pillar data: | 
|  | 829 |  | 
|  | 830 | .. code-block:: yaml | 
|  | 831 |  | 
|  | 832 | nova: | 
|  | 833 | compute: | 
| Michel Nederlof | e322ebb | 2017-07-10 12:29:21 +0200 | [diff] [blame] | 834 | workaround: | 
| Michel Nederlof | f7eefb2 | 2017-07-10 11:14:33 +0200 | [diff] [blame] | 835 | disable_libvirt_livesnapshot: False | 
|  | 836 |  | 
| Michel Nederlof | b51a514 | 2017-06-27 08:31:35 +0200 | [diff] [blame] | 837 | Config drive options | 
|  | 838 | -------------------- | 
|  | 839 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 840 | See example below on how to configure the options for the | 
|  | 841 | config drive: | 
| Michel Nederlof | b51a514 | 2017-06-27 08:31:35 +0200 | [diff] [blame] | 842 |  | 
|  | 843 | .. code-block:: yaml | 
|  | 844 |  | 
|  | 845 | nova: | 
|  | 846 | compute: | 
|  | 847 | config_drive: | 
|  | 848 | forced: True  # Default: True | 
|  | 849 | cdrom: True  # Default: False | 
|  | 850 | format: iso9660  # Default: vfat | 
|  | 851 | inject_password: False  # Default: False | 
|  | 852 |  | 
| Michel Nederlof | f81919b | 2017-11-20 09:37:07 +0100 | [diff] [blame] | 853 | Number of concurrent live migrates | 
|  | 854 | ---------------------------------- | 
|  | 855 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 856 | Default is to have no concurrent live migrations (so 1 | 
|  | 857 | live-migration at a time). | 
| Michel Nederlof | f81919b | 2017-11-20 09:37:07 +0100 | [diff] [blame] | 858 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 859 | Excerpt from config options page | 
|  | 860 | https://docs.openstack.org/ocata/config-reference/compute/config-options.html: | 
| Michel Nederlof | f81919b | 2017-11-20 09:37:07 +0100 | [diff] [blame] | 861 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 862 | Maximum number of live migrations to run concurrently. This limit is | 
|  | 863 | enforced to avoid outbound live migrations overwhelming the host/network | 
|  | 864 | and causing failures. It is not recommended that you change this unless | 
|  | 865 | 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] | 866 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 867 | Possible values: | 
| Michel Nederlof | f81919b | 2017-11-20 09:37:07 +0100 | [diff] [blame] | 868 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 869 | - 0 : treated as unlimited. | 
|  | 870 | - Negative value defaults to 0. | 
|  | 871 | - Any positive integer representing maximum number of live migrations | 
|  | 872 | to run concurrently. | 
| Michel Nederlof | f81919b | 2017-11-20 09:37:07 +0100 | [diff] [blame] | 873 |  | 
|  | 874 | To configure this option: | 
|  | 875 |  | 
|  | 876 | .. code-block:: yaml | 
|  | 877 |  | 
|  | 878 | nova: | 
|  | 879 | compute: | 
|  | 880 | max_concurrent_live_migrations: 1  # (1 is the default) | 
|  | 881 |  | 
| Sergio Lystopad | 9d31cba | 2018-05-15 11:29:11 +0300 | [diff] [blame] | 882 | Live migration with auto converge | 
|  | 883 | ---------------------------------- | 
|  | 884 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 885 | Auto converge throttles down CPU if a progress of on-going live | 
|  | 886 | migration is slow | 
|  | 887 | https://docs.openstack.org/ocata/config-reference/compute/config-options.html: | 
| Sergio Lystopad | 9d31cba | 2018-05-15 11:29:11 +0300 | [diff] [blame] | 888 |  | 
|  | 889 | .. code-block:: yaml | 
|  | 890 |  | 
|  | 891 | nova: | 
|  | 892 | compute: | 
|  | 893 | libvirt: | 
|  | 894 | live_migration_permit_auto_converge: False  # (False is the default) | 
|  | 895 |  | 
|  | 896 | .. code-block:: yaml | 
|  | 897 |  | 
|  | 898 | nova: | 
|  | 899 | controller: | 
|  | 900 | libvirt: | 
|  | 901 | live_migration_permit_auto_converge: False  # (False is the default) | 
|  | 902 |  | 
| Dmitry Kalashnik | e58fe08 | 2017-12-01 16:31:14 +0400 | [diff] [blame] | 903 | Enhanced logging with logging.conf | 
|  | 904 | ---------------------------------- | 
|  | 905 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 906 | By default ``logging.conf`` is disabled. | 
| Dmitry Kalashnik | e58fe08 | 2017-12-01 16:31:14 +0400 | [diff] [blame] | 907 |  | 
|  | 908 | That is possible to enable per-binary logging.conf with new variables: | 
| Dmitry Kalashnik | e58fe08 | 2017-12-01 16:31:14 +0400 | [diff] [blame] | 909 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 910 | * ``openstack_log_appender`` | 
|  | 911 | Set to true to enable log_config_append for all OpenStack services | 
|  | 912 |  | 
|  | 913 | * ``openstack_fluentd_handler_enabled`` | 
|  | 914 | Set to true to enable FluentHandler for all Openstack services | 
|  | 915 |  | 
|  | 916 | * ``openstack_ossyslog_handler_enabled`` | 
|  | 917 | Set to true to enable OSSysLogHandler for all Openstack services | 
|  | 918 |  | 
|  | 919 | Only ``WatchedFileHandler``, ``OSSysLogHandler``, and ``FluentHandler`` | 
|  | 920 | are available. | 
| Dmitry Kalashnik | e58fe08 | 2017-12-01 16:31:14 +0400 | [diff] [blame] | 921 |  | 
| Dmitry Kalashnik | 8da249c | 2018-01-16 17:58:00 +0400 | [diff] [blame] | 922 | Also it is possible to configure this with pillar: | 
| Dmitry Kalashnik | e58fe08 | 2017-12-01 16:31:14 +0400 | [diff] [blame] | 923 |  | 
|  | 924 | .. code-block:: yaml | 
|  | 925 |  | 
|  | 926 | nova: | 
|  | 927 | controller: | 
|  | 928 | logging: | 
|  | 929 | log_appender: true | 
|  | 930 | log_handlers: | 
|  | 931 | watchedfile: | 
|  | 932 | enabled: true | 
|  | 933 | fluentd: | 
|  | 934 | enabled: true | 
| Oleksii Chupryn | 99e3503 | 2018-02-06 01:59:40 +0200 | [diff] [blame] | 935 | ossyslog: | 
|  | 936 | enabled: true | 
| Dmitry Kalashnik | e58fe08 | 2017-12-01 16:31:14 +0400 | [diff] [blame] | 937 |  | 
|  | 938 | compute: | 
|  | 939 | logging: | 
|  | 940 | log_appender: true | 
|  | 941 | log_handlers: | 
|  | 942 | watchedfile: | 
|  | 943 | enabled: true | 
|  | 944 | fluentd: | 
|  | 945 | enabled: true | 
| Oleksii Chupryn | 99e3503 | 2018-02-06 01:59:40 +0200 | [diff] [blame] | 946 | ossyslog: | 
|  | 947 | enabled: true | 
| Thom Gerdes | f582f1e | 2017-05-02 18:05:50 +0000 | [diff] [blame] | 948 |  | 
| Vasyl Saienko | 7243a95 | 2018-05-11 21:26:54 +0300 | [diff] [blame] | 949 | The log level might be configured per logger by using the | 
|  | 950 | following pillar structure: | 
|  | 951 |  | 
|  | 952 | .. code-block:: yaml | 
|  | 953 |  | 
|  | 954 | nova: | 
|  | 955 | compute: | 
|  | 956 | logging: | 
|  | 957 | loggers: | 
|  | 958 | <logger_name>: | 
|  | 959 | level: WARNING | 
|  | 960 |  | 
|  | 961 | nova: | 
|  | 962 | compute: | 
|  | 963 | logging: | 
|  | 964 | loggers: | 
|  | 965 | <logger_name>: | 
|  | 966 | level: WARNING | 
|  | 967 |  | 
| Oleh Hryhorov | e38525d | 2018-05-15 08:58:59 +0000 | [diff] [blame] | 968 | Configure syslog parameters for libvirtd | 
|  | 969 | ---------------------------------------- | 
|  | 970 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 971 | To configure syslog parameters for libvirtd the below pillar | 
|  | 972 | structure should be used with values which are supported | 
| Oleh Hryhorov | e38525d | 2018-05-15 08:58:59 +0000 | [diff] [blame] | 973 | by libvirtd. These values might be known from the documentation. | 
|  | 974 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 975 | .. code-block:: yaml | 
|  | 976 |  | 
| Oleh Hryhorov | e38525d | 2018-05-15 08:58:59 +0000 | [diff] [blame] | 977 | nova: | 
|  | 978 | compute: | 
|  | 979 | libvirt: | 
|  | 980 | logging: | 
|  | 981 | level: 3 | 
|  | 982 | filters: '3:remote 4:event' | 
|  | 983 | outputs: '3:syslog:libvirtd' | 
|  | 984 | buffer_size: 64 | 
|  | 985 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 986 | Logging controls: | 
| Oleh Hryhorov | e38525d | 2018-05-15 08:58:59 +0000 | [diff] [blame] | 987 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 988 | Logging level: 4 errors, 3 warnings, 2 information, 1 debug | 
|  | 989 | basically 1 will log everything possible ``log_level = 3`` | 
| Oleh Hryhorov | e38525d | 2018-05-15 08:58:59 +0000 | [diff] [blame] | 990 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 991 | Logging filters: | 
| Oleh Hryhorov | e38525d | 2018-05-15 08:58:59 +0000 | [diff] [blame] | 992 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 993 | A filter allows to select a different logging level for a given category | 
|  | 994 | of logs. | 
| Oleh Hryhorov | e38525d | 2018-05-15 08:58:59 +0000 | [diff] [blame] | 995 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 996 | The format for a filter is one of: | 
| Oleh Hryhorov | e38525d | 2018-05-15 08:58:59 +0000 | [diff] [blame] | 997 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 998 | * ``x:name`` | 
|  | 999 | * ``x:+name`` | 
|  | 1000 | where name is a string which is matched against source file name, | 
|  | 1001 | e.g., ``remote``, ``qemu``, or ``util/json``, the optional ``+`` prefix | 
|  | 1002 | tells libvirt to log stack trace for each message matching name, | 
|  | 1003 | and x is the minimal level where matching messages should be logged: | 
| 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 | * ``1: DEBUG`` | 
|  | 1006 | * ``2: INFO`` | 
|  | 1007 | * ``3: WARNING`` | 
|  | 1008 | * ``4: ERROR`` | 
|  | 1009 |  | 
|  | 1010 | Multiple filter can be defined in a single @filters, they just | 
|  | 1011 | need to be separated by spaces. | 
|  | 1012 |  | 
|  | 1013 | For example, to only get warning or errors from the remote layer | 
|  | 1014 | and only errors from the event layer: ``log_filters="3:remote 4:event`` | 
|  | 1015 |  | 
|  | 1016 | Logging outputs: | 
|  | 1017 |  | 
|  | 1018 | An output is one of the places to save logging information | 
|  | 1019 | The format for an output can be: | 
|  | 1020 |  | 
|  | 1021 | * ``x:stderr`` | 
|  | 1022 | Output goes to stderr | 
|  | 1023 |  | 
|  | 1024 | * ``x:syslog:name`` | 
|  | 1025 | Use syslog for the output and use the given name as the ident | 
|  | 1026 |  | 
|  | 1027 | * ``x:file:file_path`` | 
|  | 1028 | output to a file, with the given filepath | 
|  | 1029 |  | 
|  | 1030 | In all case the x prefix is the minimal level, acting as a filter | 
|  | 1031 |  | 
|  | 1032 | * ``1: DEBUG`` | 
|  | 1033 | * ``2: INFO`` | 
|  | 1034 | * ``3: WARNING`` | 
|  | 1035 | * ``4: ERROR`` | 
|  | 1036 |  | 
|  | 1037 | Multiple output can be defined, they just need to be separated by spaces. | 
|  | 1038 | For example, to log all warnings and errors to syslog under the libvirt | 
|  | 1039 | dident: ``log_outputs="3:syslog:libvirtd`` | 
|  | 1040 |  | 
|  | 1041 | Log debug buffer size: default 64 | 
|  | 1042 | The daemon keeps an internal debug log buffer which will be dumped | 
|  | 1043 | in case of crash or upon receiving a ``SIGUSR2`` signal. This setting | 
|  | 1044 | allows to override the default buffer size in kilobytes. | 
|  | 1045 | If value is ``0`` or less the debug log buffer is deactivated | 
|  | 1046 | ``log_buffer_size = 64`` | 
|  | 1047 |  | 
|  | 1048 | To configure the logging parameters for QEMU, the below pillar | 
|  | 1049 | structure and logging parameters should be used: | 
|  | 1050 |  | 
|  | 1051 | .. code-block:: yaml | 
|  | 1052 |  | 
|  | 1053 | nova: | 
|  | 1054 | compute: | 
|  | 1055 | qemu: | 
|  | 1056 | logging: | 
|  | 1057 | handler: logd | 
|  | 1058 | virtlog: | 
|  | 1059 | enabled: true | 
|  | 1060 | level: 4 | 
|  | 1061 | filters: '3:remote 3:event' | 
|  | 1062 | outputs: '4:syslog:virtlogd' | 
|  | 1063 | max_clients: 512 | 
|  | 1064 | max_size: 2097100 | 
|  | 1065 | max_backups: 2 | 
| Oleh Hryhorov | e38525d | 2018-05-15 08:58:59 +0000 | [diff] [blame] | 1066 |  | 
| Oleksandr Shyshko | 981b4fa | 2018-05-02 15:39:30 +0300 | [diff] [blame] | 1067 | Inject password to VM | 
|  | 1068 | --------------------- | 
|  | 1069 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1070 | By default nova blocks up any inject to VM because | 
|  | 1071 | ``inject_partition`` param is equal to ``-2``. | 
|  | 1072 | If you want to inject password to VM, you will need to | 
|  | 1073 | define ``inject_partition`` greater or equal to ``-1`` and | 
|  | 1074 | define ``inject_password`` to ``True`` | 
| Oleksandr Shyshko | 981b4fa | 2018-05-02 15:39:30 +0300 | [diff] [blame] | 1075 |  | 
|  | 1076 | For example: | 
|  | 1077 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1078 | .. code-block:: yaml | 
|  | 1079 |  | 
| Oleksandr Shyshko | 981b4fa | 2018-05-02 15:39:30 +0300 | [diff] [blame] | 1080 | nova: | 
|  | 1081 | compute: | 
|  | 1082 | inject_partition: '-1' | 
|  | 1083 | inject_password: True | 
|  | 1084 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1085 | Allow the injection of an admin password for instance only at | 
|  | 1086 | ``create`` and ``rebuild`` process. | 
|  | 1087 |  | 
|  | 1088 | There is no agent needed within the image to do this. If *libguestfs* is | 
|  | 1089 | available on the host, it will be used. Otherwise *nbd* is used. The file | 
|  | 1090 | system of the image will be mounted and the admin password, which is provided | 
|  | 1091 | in the REST API call will be injected as password for the root user. If no | 
|  | 1092 | root user is available, the instance won't be launched and an error is thrown. | 
|  | 1093 | Be aware that the injection is *not* possible when the instance gets launched | 
|  | 1094 | from a volume. | 
|  | 1095 |  | 
|  | 1096 | Possible values: | 
|  | 1097 |  | 
|  | 1098 | * ``True`` | 
|  | 1099 | Allows the injection | 
|  | 1100 |  | 
|  | 1101 | * ``False`` (default) | 
|  | 1102 | Disallows the injection. Any via the REST API provided | 
|  | 1103 | admin password will be silently ignored. | 
|  | 1104 |  | 
|  | 1105 | Related options: | 
|  | 1106 |  | 
|  | 1107 | * ``inject_partition`` | 
|  | 1108 | Decides about the discovery and usage of the file system. | 
|  | 1109 | It also can disable the injection at all. | 
|  | 1110 | (boolean value) | 
| Oleksandr Shyshko | 981b4fa | 2018-05-02 15:39:30 +0300 | [diff] [blame] | 1111 |  | 
|  | 1112 | You can read more about injecting the administrator password here: | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1113 | https://docs.openstack.org/nova/queens/admin/admin-password-injection.html | 
| Oleksandr Shyshko | 981b4fa | 2018-05-02 15:39:30 +0300 | [diff] [blame] | 1114 |  | 
| Oleksandr Shyshko | 1c020d1 | 2018-05-24 12:47:08 +0300 | [diff] [blame] | 1115 | Enable libvirt control channel over TLS | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1116 | --------------------------------------- | 
| Oleksandr Shyshko | 1c020d1 | 2018-05-24 12:47:08 +0300 | [diff] [blame] | 1117 |  | 
|  | 1118 | By default TLS is disabled. | 
|  | 1119 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1120 | Enable TLS transport: | 
|  | 1121 |  | 
|  | 1122 | .. code-block:: yaml | 
| Oleksandr Shyshko | 1c020d1 | 2018-05-24 12:47:08 +0300 | [diff] [blame] | 1123 |  | 
|  | 1124 | compute: | 
|  | 1125 | libvirt: | 
|  | 1126 | tls: | 
|  | 1127 | enabled: True | 
|  | 1128 |  | 
|  | 1129 | You able to set custom certificates in pillar: | 
|  | 1130 |  | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1131 | .. code-block:: yaml | 
|  | 1132 |  | 
| Oleksandr Shyshko | 1c020d1 | 2018-05-24 12:47:08 +0300 | [diff] [blame] | 1133 | nova: | 
|  | 1134 | compute: | 
|  | 1135 | libvirt: | 
|  | 1136 | tls: | 
|  | 1137 | key: (certificate content) | 
|  | 1138 | cert: (certificate content) | 
|  | 1139 | cacert: (certificate content) | 
|  | 1140 | client: | 
|  | 1141 | key: (certificate content) | 
|  | 1142 | cert: (certificate content) | 
|  | 1143 |  | 
| Dmitry Teselkin | 77d9dac | 2019-04-18 16:43:50 +0300 | [diff] [blame] | 1144 | It is possible to limit allowed SSL / TLS ciphers using libvirt's tls_priority: | 
|  | 1145 |  | 
|  | 1146 | .. code-block:: yaml | 
|  | 1147 |  | 
|  | 1148 | nova: | 
|  | 1149 | compute: | 
|  | 1150 | libvirt: | 
|  | 1151 | tls: | 
|  | 1152 | priority: <TLS priority string> | 
|  | 1153 |  | 
|  | 1154 | Example priority strings are: | 
|  | 1155 |  | 
|  | 1156 | - The system imposed security level: | 
|  | 1157 |  | 
|  | 1158 | .. code-block:: text | 
|  | 1159 |  | 
|  | 1160 | "SYSTEM" | 
|  | 1161 |  | 
|  | 1162 | - The default priority without the HMAC-MD5: | 
|  | 1163 |  | 
|  | 1164 | .. code-block:: text | 
|  | 1165 |  | 
|  | 1166 | "NORMAL:-MD5" | 
|  | 1167 |  | 
|  | 1168 | - Specifying RSA with AES-128-CBC: | 
|  | 1169 |  | 
|  | 1170 | .. code-block:: text | 
|  | 1171 |  | 
|  | 1172 | "NONE:+VERS-TLS-ALL:+MAC-ALL:+RSA:+AES-128-CBC:+SIGN-ALL:+COMP-NULL" | 
|  | 1173 |  | 
|  | 1174 | - Specifying the defaults plus ARCFOUR-128: | 
|  | 1175 |  | 
|  | 1176 | .. code-block:: text | 
|  | 1177 |  | 
|  | 1178 | "NORMAL:+ARCFOUR-128" | 
|  | 1179 |  | 
|  | 1180 | - Enabling the 128-bit secure ciphers, while disabling TLS 1.0: | 
|  | 1181 |  | 
|  | 1182 | .. code-block:: text | 
|  | 1183 |  | 
|  | 1184 | "SECURE128:-VERS-TLS1.0" | 
|  | 1185 |  | 
|  | 1186 | - Enabling the 128-bit and 192-bit secure ciphers, while disabling all TLS | 
|  | 1187 | versions except TLS 1.2: | 
|  | 1188 |  | 
|  | 1189 | .. code-block:: text | 
|  | 1190 |  | 
|  | 1191 | "SECURE128:+SECURE192:-VERS-ALL:+VERS-TLS1.2" | 
|  | 1192 |  | 
|  | 1193 | More on TLS Priority Strings: | 
|  | 1194 |  | 
|  | 1195 | - https://gnutls.org/manual/html_node/Priority-Strings.html | 
|  | 1196 |  | 
| Vasyl Saienko | 11ac973 | 2018-10-02 17:04:33 +0000 | [diff] [blame] | 1197 | Controlling access by `tls_allowed_dn_list`. | 
|  | 1198 | Enable an access control list of client certificate Distinguished Names (DNs) | 
|  | 1199 | which can connect to the TLS port on this server. The default is that DNs are | 
|  | 1200 | not checked. This list may contain wildcards such as | 
|  | 1201 | "C=GB,ST=London,L=London,O=Libvirt Project,CN=*" See the POSIX fnmatch function | 
|  | 1202 | for the format of the wildcards. | 
|  | 1203 | Note that if this is an empty list, no client can connect. | 
|  | 1204 | Note also that GnuTLS returns DNs without spaces after commas between | 
|  | 1205 | the fields (and this is what we check against), but the openssl x509 tool | 
|  | 1206 | shows spaces. | 
|  | 1207 |  | 
|  | 1208 | .. code-block:: yaml | 
|  | 1209 |  | 
|  | 1210 | nova: | 
|  | 1211 | compute: | 
|  | 1212 | libvirt: | 
|  | 1213 | tls: | 
|  | 1214 | tls_allowed_dn_list: | 
|  | 1215 | host1: | 
|  | 1216 | enabled: true | 
|  | 1217 | value: 'C=foo,CN=cmp1' | 
|  | 1218 | host2: | 
|  | 1219 | enabled: true | 
|  | 1220 | value: 'C=foo,CN=cmp2' | 
|  | 1221 |  | 
|  | 1222 |  | 
| Oleksandr Shyshko | 1c020d1 | 2018-05-24 12:47:08 +0300 | [diff] [blame] | 1223 | You can read more about live migration over TLS here: | 
| OlgaGusarenko | 9dd01c9 | 2018-07-31 00:49:30 +0300 | [diff] [blame] | 1224 | https://wiki.libvirt.org/page/TLSCreateServerCerts | 
| Oleksandr Shyshko | 981b4fa | 2018-05-02 15:39:30 +0300 | [diff] [blame] | 1225 |  | 
| Oleksandr Shyshko | 1195fca | 2018-07-09 18:22:59 +0300 | [diff] [blame] | 1226 | Enable transport + authentication for VNC over TLS | 
|  | 1227 | --------------------- | 
| Oleksandr Shyshko | d8337cf | 2018-07-11 17:55:58 +0300 | [diff] [blame] | 1228 | # Only for Queens. Communication between noVNC proxy service and QEMU | 
| Oleksandr Shyshko | 1195fca | 2018-07-09 18:22:59 +0300 | [diff] [blame] | 1229 |  | 
|  | 1230 | By default communication between nova-novncproxy and qemu service is unsecure. | 
|  | 1231 |  | 
|  | 1232 | compute: | 
|  | 1233 | qemu: | 
|  | 1234 | vnc: | 
|  | 1235 | tls: | 
|  | 1236 | enabled: True | 
|  | 1237 |  | 
|  | 1238 | controller: | 
|  | 1239 | novncproxy: | 
| Oleksandr Shyshko | d8337cf | 2018-07-11 17:55:58 +0300 | [diff] [blame] | 1240 | # This section responsible for communication between noVNC proxy and client machine | 
| Oleksandr Shyshko | 1195fca | 2018-07-09 18:22:59 +0300 | [diff] [blame] | 1241 | tls: | 
|  | 1242 | enabled: True | 
| Oleksandr Shyshko | d8337cf | 2018-07-11 17:55:58 +0300 | [diff] [blame] | 1243 | # This section responsible for communication between nova-novncproxy and qemu service | 
|  | 1244 | vencrypt: | 
|  | 1245 | tls: | 
|  | 1246 | enabled: True | 
| Oleksandr Shyshko | 1195fca | 2018-07-09 18:22:59 +0300 | [diff] [blame] | 1247 |  | 
|  | 1248 | You able to set custom certificates in pillar: | 
|  | 1249 |  | 
| Oleksandr Shyshko | d8337cf | 2018-07-11 17:55:58 +0300 | [diff] [blame] | 1250 | nova: | 
|  | 1251 | compute: | 
|  | 1252 | qemu: | 
|  | 1253 | vnc: | 
|  | 1254 | tls: | 
|  | 1255 | cacert (certificate content) | 
|  | 1256 | cert (certificate content) | 
|  | 1257 | key (certificate content) | 
|  | 1258 |  | 
|  | 1259 | nova: | 
|  | 1260 | controller: | 
|  | 1261 | novncproxy: | 
|  | 1262 | tls: | 
|  | 1263 | server: | 
|  | 1264 | cert (certificate content) | 
|  | 1265 | key (certificate content) | 
|  | 1266 | vencrypt: | 
|  | 1267 | tls: | 
|  | 1268 | cacert (certificate content) | 
|  | 1269 | cert (certificate content) | 
|  | 1270 | key (certificate content) | 
|  | 1271 |  | 
|  | 1272 |  | 
|  | 1273 | You can read more about it here: | 
|  | 1274 | https://docs.openstack.org/nova/queens/admin/remote-console-access.html | 
|  | 1275 |  | 
|  | 1276 | Enable communication between noVNC proxy and client machine over TLS | 
|  | 1277 | --------------------- | 
|  | 1278 |  | 
|  | 1279 | By default communication between noVNC proxy and client machine is unsecure. | 
|  | 1280 |  | 
|  | 1281 | controller: | 
|  | 1282 | novncproxy: | 
|  | 1283 | tls: | 
|  | 1284 | enabled: True | 
| Oleksandr Shyshko | 1195fca | 2018-07-09 18:22:59 +0300 | [diff] [blame] | 1285 |  | 
|  | 1286 | nova: | 
|  | 1287 | controller: | 
|  | 1288 | novncproxy: | 
|  | 1289 | tls: | 
| Oleksandr Shyshko | d8337cf | 2018-07-11 17:55:58 +0300 | [diff] [blame] | 1290 | server: | 
|  | 1291 | cert (certificate content) | 
|  | 1292 | key (certificate content) | 
| Oleksandr Shyshko | 1195fca | 2018-07-09 18:22:59 +0300 | [diff] [blame] | 1293 |  | 
|  | 1294 | You can read more about it here: | 
| Oleksandr Shyshko | d8337cf | 2018-07-11 17:55:58 +0300 | [diff] [blame] | 1295 | https://docs.openstack.org/mitaka/config-reference/dashboard/configure.html | 
| Oleksandr Shyshko | 1195fca | 2018-07-09 18:22:59 +0300 | [diff] [blame] | 1296 |  | 
| Oleksandr Shyshko | 55eeac7 | 2018-08-03 18:23:28 +0300 | [diff] [blame] | 1297 | Enable x509 and ssl communication between Nova and Galera cluster. | 
|  | 1298 | --------------------- | 
|  | 1299 | By default communication between Nova and Galera is unsecure. | 
|  | 1300 |  | 
| Oleksandr Shyshko | cbe8735 | 2018-09-07 13:42:57 +0300 | [diff] [blame] | 1301 | nova: | 
|  | 1302 | controller: | 
|  | 1303 | database: | 
|  | 1304 | x509: | 
|  | 1305 | enabled: True | 
|  | 1306 |  | 
| Oleksandr Shyshko | 55eeac7 | 2018-08-03 18:23:28 +0300 | [diff] [blame] | 1307 | You able to set custom certificates in pillar: | 
| Oleksandr Shyshko | 55eeac7 | 2018-08-03 18:23:28 +0300 | [diff] [blame] | 1308 |  | 
|  | 1309 | nova: | 
|  | 1310 | controller: | 
|  | 1311 | database: | 
|  | 1312 | x509: | 
| Oleksandr Shyshko | cbe8735 | 2018-09-07 13:42:57 +0300 | [diff] [blame] | 1313 | cacert: (certificate content) | 
|  | 1314 | cert: (certificate content) | 
|  | 1315 | key: (certificate content) | 
| Oleksandr Shyshko | 55eeac7 | 2018-08-03 18:23:28 +0300 | [diff] [blame] | 1316 |  | 
|  | 1317 | You can read more about it here: | 
|  | 1318 | https://docs.openstack.org/security-guide/databases/database-access-control.html | 
|  | 1319 |  | 
| Oleksandr Shyshko | d96a099 | 2019-03-29 11:18:25 +0000 | [diff] [blame] | 1320 | Define config option which allows to use nova-api service behind proxy.(Only Mitaka) | 
|  | 1321 | --------------------- | 
|  | 1322 | The HTTP Header that will be used to determine what the original request protocol | 
|  | 1323 | scheme was, even if it was hidden by a SSL termination proxy. | 
|  | 1324 |  | 
|  | 1325 | nova: | 
|  | 1326 | controller: | 
|  | 1327 | secure_proxy_ssl_header: HTTP_X_FORWARDED_PROTO | 
|  | 1328 |  | 
|  | 1329 | You can read more about it here: | 
|  | 1330 | https://docs.openstack.org/mitaka/config-reference/compute/config-options.html | 
|  | 1331 |  | 
| obryndzii | f795791 | 2019-01-31 00:55:56 +0000 | [diff] [blame] | 1332 | Nova database connection setup: | 
|  | 1333 | ======== | 
|  | 1334 |  | 
|  | 1335 | .. code-block:: yaml | 
|  | 1336 |  | 
|  | 1337 | nova: | 
|  | 1338 | controller: | 
|  | 1339 | enabled: True | 
|  | 1340 | ... | 
|  | 1341 | database: | 
|  | 1342 | idle_timeout: 180 | 
|  | 1343 | min_pool_size: 100 | 
|  | 1344 | max_pool_size: 700 | 
|  | 1345 | max_overflow: 100 | 
|  | 1346 | retry_interval: 5 | 
|  | 1347 | max_retries: '-1' | 
|  | 1348 | db_max_retries: 3 | 
|  | 1349 | db_retry_interval: 1 | 
|  | 1350 | connection_debug: 10 | 
|  | 1351 | pool_timeout: 120 | 
|  | 1352 |  | 
| Oleksandr Bryndzii | 6d821f5 | 2019-02-20 15:51:15 +0200 | [diff] [blame] | 1353 |  | 
|  | 1354 | Configure nova to use service user tokens: | 
|  | 1355 | ======== | 
|  | 1356 | Long-running operations such as live migration or snapshot can sometimes overrun the | 
|  | 1357 | expiry of the user token. In such cases, post operations such as cleaning up after a | 
|  | 1358 | live migration can fail when the nova-compute service needs to cleanup resources in | 
|  | 1359 | other services, such as in the block-storage (cinder) or networking (neutron) services. | 
|  | 1360 |  | 
|  | 1361 | This patch enables nova to use service user tokens to supplement the regular user token | 
|  | 1362 | used to initiate the operation. The identity service (keystone) will then authenticate | 
|  | 1363 | a request using the service user token if the user token has already expired. | 
|  | 1364 |  | 
|  | 1365 | .. code-block:: yaml | 
|  | 1366 |  | 
|  | 1367 | nova: | 
|  | 1368 | controller: | 
|  | 1369 | enabled: True | 
|  | 1370 | ... | 
|  | 1371 | service_user: | 
|  | 1372 | enabled: True | 
|  | 1373 | user_domain_id: default | 
|  | 1374 | project_domain_id: default | 
|  | 1375 | project_name: service | 
|  | 1376 | username: nova | 
|  | 1377 | password: pswd | 
|  | 1378 |  | 
| Oleksandr Bryndzii | 6af347b | 2019-04-23 15:34:42 +0300 | [diff] [blame] | 1379 | Change default resource quotas using configmap template settings | 
|  | 1380 | ======== | 
|  | 1381 |  | 
|  | 1382 | .. code-block:: yaml | 
|  | 1383 |  | 
|  | 1384 | nova: | 
|  | 1385 | controller: | 
|  | 1386 | configmap: | 
|  | 1387 | quota: | 
|  | 1388 | instances: 10 | 
|  | 1389 | cores: 20 | 
|  | 1390 | ram: 51200 | 
|  | 1391 | metadata_items: 128 | 
|  | 1392 | injected_files: 5 | 
|  | 1393 | injected_file_content_bytes: 10240 | 
|  | 1394 | injected_file_path_length: 255 | 
|  | 1395 | key_pairs: 100 | 
|  | 1396 | server_groups: 10 | 
|  | 1397 | server_group_members: 10 | 
|  | 1398 | reservation_expire: 86400 | 
|  | 1399 | until_refresh: 0 | 
|  | 1400 | max_age: 0 | 
|  | 1401 |  | 
| Oleh Hryhorov | 63ee845 | 2018-08-14 09:16:02 +0000 | [diff] [blame] | 1402 | Upgrades | 
|  | 1403 | ======== | 
|  | 1404 |  | 
|  | 1405 | Each openstack formula provide set of phases (logical bloks) that will help to | 
|  | 1406 | build flexible upgrade orchestration logic for particular components. The list | 
|  | 1407 | of phases might and theirs descriptions are listed in table below: | 
|  | 1408 |  | 
|  | 1409 | +-------------------------------+------------------------------------------------------+ | 
|  | 1410 | | State                         | Description                                          | | 
|  | 1411 | +===============================+======================================================+ | 
|  | 1412 | | <app>.upgrade.service_running | Ensure that all services for particular application  | | 
|  | 1413 | |                               | are enabled for autostart and running                | | 
|  | 1414 | +-------------------------------+------------------------------------------------------+ | 
|  | 1415 | | <app>.upgrade.service_stopped | Ensure that all services for particular application  | | 
|  | 1416 | |                               | disabled for autostart and dead                      | | 
|  | 1417 | +-------------------------------+------------------------------------------------------+ | 
|  | 1418 | | <app>.upgrade.pkgs_latest     | Ensure that packages used by particular application  | | 
|  | 1419 | |                               | are installed to latest available version.           | | 
|  | 1420 | |                               | This will not upgrade data plane packages like qemu  | | 
|  | 1421 | |                               | and openvswitch as usually minimal required version  | | 
|  | 1422 | |                               | in openstack services is really old. The data plane  | | 
|  | 1423 | |                               | packages should be upgraded separately by `apt-get   | | 
|  | 1424 | |                               | upgrade` or `apt-get dist-upgrade`                   | | 
|  | 1425 | |                               | Applying this state will not autostart service.      | | 
|  | 1426 | +-------------------------------+------------------------------------------------------+ | 
|  | 1427 | | <app>.upgrade.render_config   | Ensure configuration is rendered actual version.     + | 
|  | 1428 | +-------------------------------+------------------------------------------------------+ | 
|  | 1429 | | <app>.upgrade.pre             | We assume this state is applied on all nodes in the  | | 
|  | 1430 | |                               | cloud before running upgrade.                        | | 
|  | 1431 | |                               | Only non destructive actions will be applied during  | | 
|  | 1432 | |                               | this phase. Perform service built in service check   | | 
|  | 1433 | |                               | like (keystone-manage doctor and nova-status upgrade)| | 
|  | 1434 | +-------------------------------+------------------------------------------------------+ | 
|  | 1435 | | <app>.upgrade.upgrade.pre     | Mostly applicable for data plane nodes. During this  | | 
|  | 1436 | |                               | phase resources will be gracefully removed from      | | 
|  | 1437 | |                               | current node if it is allowed. Services for upgraded | | 
|  | 1438 | |                               | application will be set to admin disabled state to   | | 
|  | 1439 | |                               | make sure node will not participate in resources     | | 
|  | 1440 | |                               | scheduling. For example on gtw nodes this will set   | | 
|  | 1441 | |                               | all agents to admin disable state and will move all  | | 
|  | 1442 | |                               | routers to other agents.                             | | 
|  | 1443 | +-------------------------------+------------------------------------------------------+ | 
|  | 1444 | | <app>.upgrade.upgrade         | This state will basically upgrade application on     | | 
|  | 1445 | |                               | particular target. Stop services, render             | | 
|  | 1446 | |                               | configuration, install new packages, run offline     | | 
|  | 1447 | |                               | dbsync (for ctl), start services. Data plane should  | | 
|  | 1448 | |                               | not be affected, only OpenStack python services.     | | 
|  | 1449 | +-------------------------------+------------------------------------------------------+ | 
|  | 1450 | | <app>.upgrade.upgrade.post    | Add services back to scheduling.                     | | 
|  | 1451 | +-------------------------------+------------------------------------------------------+ | 
|  | 1452 | | <app>.upgrade.post            | This phase should be launched only when upgrade of   | | 
|  | 1453 | |                               | the cloud is completed. Cleanup temporary files,     | | 
|  | 1454 | |                               | perform other post upgrade tasks.                    | | 
|  | 1455 | +-------------------------------+------------------------------------------------------+ | 
|  | 1456 | | <app>.upgrade.verify          | Here we will do basic health checks (API CRUD        | | 
|  | 1457 | |                               | operations, verify do not have dead network          | | 
|  | 1458 | |                               | agents/compute services)                             | | 
|  | 1459 | +-------------------------------+------------------------------------------------------+ | 
| Oleksandr Pidrepnyi | 60df872 | 2019-06-07 16:18:11 +0300 | [diff] [blame] | 1460 |  | 
|  | 1461 |  | 
|  | 1462 | Don't manage services scheduling while upgrade | 
|  | 1463 | ---------------------------------------------- | 
|  | 1464 | For some special cases, don't manage services scheduling both enable and disable | 
|  | 1465 | before and after upgrade procedure. | 
|  | 1466 |  | 
|  | 1467 | If 'manage_service_maintenance: true' or not present - default behavior, disable services | 
|  | 1468 | before upgrade and enable it after upgrade. | 
|  | 1469 | If 'manage_service_maintenance: false' - don't disable and don't enable upgraded services | 
|  | 1470 | scheduling before and after upgrade. | 
|  | 1471 |  | 
|  | 1472 | .. code-block:: yaml | 
|  | 1473 |  | 
|  | 1474 | nova: | 
|  | 1475 | upgrade: | 
|  | 1476 | manage_service_maintenance: false |