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