OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 1 | ===== |
| 2 | Usage |
| 3 | ===== |
Filip Pytloun | d681ae2 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 4 | |
Jakub Pavlik | 9e85d17 | 2016-05-20 11:13:14 +0200 | [diff] [blame] | 5 | The Glance project provides services for discovering, registering, and |
| 6 | retrieving virtual machine images. Glance has a RESTful API that allows |
| 7 | querying of VM image metadata as well as retrieval of the actual image. |
Filip Pytloun | d681ae2 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 8 | |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 9 | Sample pillars |
| 10 | ============== |
Filip Pytloun | d681ae2 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 11 | |
| 12 | .. code-block:: yaml |
| 13 | |
| 14 | glance: |
| 15 | server: |
| 16 | enabled: true |
| 17 | version: juno |
Alena Holanova | c1e5131 | 2016-03-22 14:08:44 +0100 | [diff] [blame] | 18 | workers: 8 |
Dmitry Stremkovskiy | e9490cf | 2017-07-11 11:37:44 +0300 | [diff] [blame] | 19 | glance_uid: 302 |
| 20 | glance_gid: 302 |
Filip Pytloun | d681ae2 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 21 | policy: |
| 22 | publicize_image: |
| 23 | - "role:admin" |
| 24 | - "role:image_manager" |
| 25 | database: |
| 26 | engine: mysql |
| 27 | host: 127.0.0.1 |
| 28 | port: 3306 |
| 29 | name: glance |
| 30 | user: glance |
| 31 | password: pwd |
| 32 | identity: |
| 33 | engine: keystone |
| 34 | host: 127.0.0.1 |
| 35 | port: 35357 |
| 36 | tenant: service |
| 37 | user: glance |
| 38 | password: pwd |
| 39 | message_queue: |
| 40 | engine: rabbitmq |
| 41 | host: 127.0.0.1 |
| 42 | port: 5672 |
| 43 | user: openstack |
| 44 | password: pwd |
| 45 | virtual_host: '/openstack' |
| 46 | storage: |
| 47 | engine: file |
| 48 | images: |
| 49 | - name: "CirrOS 0.3.1" |
| 50 | format: qcow2 |
| 51 | file: cirros-0.3.1-x86_64-disk.img |
| 52 | source: http://cdn.download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img |
| 53 | public: true |
Petr Michalec | 86ec014 | 2016-11-29 16:34:15 +0100 | [diff] [blame] | 54 | audit: |
| 55 | enabled: false |
Simon Pasquier | 2acbef5 | 2017-02-03 15:09:39 +0100 | [diff] [blame] | 56 | api_limit_max: 100 |
| 57 | limit_param_default: 50 |
Oleg Iurchenko | 68ae355 | 2017-10-13 18:40:42 +0300 | [diff] [blame] | 58 | barbican: |
| 59 | enabled: true |
Simon Pasquier | 2acbef5 | 2017-02-03 15:09:39 +0100 | [diff] [blame] | 60 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 61 | The pagination is controlled by the ``api_limit_max`` and ``limit_param_default`` |
Simon Pasquier | 2acbef5 | 2017-02-03 15:09:39 +0100 | [diff] [blame] | 62 | parameters as shown above: |
| 63 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 64 | * ``api_limit_max`` |
| 65 | Defines the maximum number of records that the server will return. |
Simon Pasquier | 2acbef5 | 2017-02-03 15:09:39 +0100 | [diff] [blame] | 66 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 67 | * ``limit_param_default`` |
| 68 | The default ``limit`` parameter that applies if the request didn't define |
| 69 | it explicitly. |
Filip Pytloun | d681ae2 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 70 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 71 | Configuration of the ``policy.json`` file: |
Dmitry Ukov | 0a228ad | 2017-05-15 13:35:43 +0400 | [diff] [blame] | 72 | |
| 73 | .. code-block:: yaml |
| 74 | |
| 75 | glance: |
| 76 | server: |
| 77 | .... |
| 78 | policy: |
| 79 | publicize_image: "role:admin" |
| 80 | # Add key without value to remove line from policy.json |
| 81 | add_member: |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 82 | |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 83 | Keystone and cinder region |
| 84 | |
| 85 | .. code-block:: yaml |
| 86 | |
| 87 | glance: |
| 88 | server: |
| 89 | enabled: true |
| 90 | version: kilo |
| 91 | ... |
| 92 | identity: |
| 93 | engine: keystone |
| 94 | host: 127.0.0.1 |
| 95 | region: RegionTwo |
| 96 | ... |
| 97 | |
| 98 | Ceph integration glance |
| 99 | |
| 100 | .. code-block:: yaml |
| 101 | |
| 102 | glance: |
| 103 | server: |
| 104 | enabled: true |
| 105 | version: juno |
| 106 | storage: |
| 107 | engine: rbd,http |
| 108 | user: glance |
| 109 | pool: images |
| 110 | chunk_size: 8 |
| 111 | client_glance_key: AQDOavlU6BsSJhAAnpFR906mvdgdfRqLHwu0Uw== |
| 112 | |
Vasyl Saienko | 8357567 | 2018-07-17 18:34:43 +0300 | [diff] [blame] | 113 | VMWare integration: |
| 114 | |
| 115 | .. code-block:: yaml |
| 116 | |
| 117 | glance: |
| 118 | server |
| 119 | storage: |
| 120 | engine: vmware |
| 121 | default_store: vsphere |
| 122 | vmware: |
| 123 | enabled: true |
| 124 | server_host: 1.2.3.4 |
| 125 | server_username: vmware_username |
| 126 | server_password: vmware_password |
| 127 | datastores: |
| 128 | data1: |
| 129 | name: datastore_name1 |
| 130 | enabled: true |
| 131 | path: datacenter_name |
| 132 | weight: 10 |
| 133 | data2: |
| 134 | name: datastore_name2 |
| 135 | enabled: true |
| 136 | path: datacenter_name |
| 137 | |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 138 | RabbitMQ HA setup |
| 139 | |
| 140 | .. code-block:: yaml |
| 141 | |
| 142 | glance: |
| 143 | server: |
| 144 | .... |
| 145 | message_queue: |
| 146 | engine: rabbitmq |
| 147 | members: |
| 148 | - host: 10.0.16.1 |
| 149 | - host: 10.0.16.2 |
| 150 | - host: 10.0.16.3 |
| 151 | user: openstack |
| 152 | password: pwd |
| 153 | virtual_host: '/openstack' |
| 154 | .... |
| 155 | |
stelucz | df5176a | 2018-01-17 14:42:11 +0100 | [diff] [blame] | 156 | Quota Options |
| 157 | |
| 158 | .. code-block:: yaml |
| 159 | |
| 160 | glance: |
| 161 | server: |
| 162 | .... |
| 163 | quota: |
| 164 | image_member: -1 |
| 165 | image_property: 256 |
| 166 | image_tag: 256 |
| 167 | image_location: 15 |
| 168 | user_storage: 0 |
| 169 | .... |
| 170 | |
Kirill Bespalov | b558436 | 2017-11-20 16:42:07 +0300 | [diff] [blame] | 171 | Configuring TLS communications |
| 172 | ------------------------------ |
Kirill Bespalov | 365d243 | 2017-07-28 09:01:04 +0300 | [diff] [blame] | 173 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 174 | .. note:: By default, system wide installed CA certs are used, so |
| 175 | ``cacert_file`` param is optional, as well as ``cacert``. |
Kirill Bespalov | b558436 | 2017-11-20 16:42:07 +0300 | [diff] [blame] | 176 | |
| 177 | - **RabbitMQ TLS** |
Kirill Bespalov | 365d243 | 2017-07-28 09:01:04 +0300 | [diff] [blame] | 178 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 179 | .. code-block:: yaml |
Kirill Bespalov | 365d243 | 2017-07-28 09:01:04 +0300 | [diff] [blame] | 180 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 181 | glance: |
| 182 | server: |
| 183 | message_queue: |
| 184 | port: 5671 |
| 185 | ssl: |
| 186 | enabled: True |
| 187 | (optional) cacert: cert body if the cacert_file does not exists |
| 188 | (optional) cacert_file: /etc/openstack/rabbitmq-ca.pem |
| 189 | (optional) version: TLSv1_2 |
Kirill Bespalov | 365d243 | 2017-07-28 09:01:04 +0300 | [diff] [blame] | 190 | |
Kirill Bespalov | b558436 | 2017-11-20 16:42:07 +0300 | [diff] [blame] | 191 | - **MySQL TLS** |
Kirill Bespalov | 365d243 | 2017-07-28 09:01:04 +0300 | [diff] [blame] | 192 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 193 | .. code-block:: yaml |
Kirill Bespalov | 365d243 | 2017-07-28 09:01:04 +0300 | [diff] [blame] | 194 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 195 | glance: |
| 196 | server: |
| 197 | database: |
| 198 | ssl: |
| 199 | enabled: True |
| 200 | (optional) cacert: cert body if the cacert_file does not exists |
| 201 | (optional) cacert_file: /etc/openstack/mysql-ca.pem |
Kirill Bespalov | 365d243 | 2017-07-28 09:01:04 +0300 | [diff] [blame] | 202 | |
Kirill Bespalov | b558436 | 2017-11-20 16:42:07 +0300 | [diff] [blame] | 203 | - **Openstack HTTPS API** |
| 204 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 205 | Set the ``https`` as protocol at ``glance:server`` sections: |
Kirill Bespalov | b558436 | 2017-11-20 16:42:07 +0300 | [diff] [blame] | 206 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 207 | .. code-block:: yaml |
Kirill Bespalov | 365d243 | 2017-07-28 09:01:04 +0300 | [diff] [blame] | 208 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 209 | glance: |
| 210 | server: |
| 211 | identity: |
| 212 | protocol: https |
Kirill Bespalov | b558436 | 2017-11-20 16:42:07 +0300 | [diff] [blame] | 213 | (optional) cacert_file: /etc/openstack/proxy.pem |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 214 | registry: |
| 215 | protocol: https |
| 216 | (optional) cacert_file: /etc/openstack/proxy.pem |
| 217 | storage: |
| 218 | engine: cinder, swift |
| 219 | cinder: |
| 220 | protocol: https |
| 221 | (optional) cacert_file: /etc/openstack/proxy.pem |
| 222 | swift: |
| 223 | store: |
| 224 | (optional) cafile: /etc/openstack/proxy.pem |
Kirill Bespalov | 365d243 | 2017-07-28 09:01:04 +0300 | [diff] [blame] | 225 | |
mnederlof | ad6d624 | 2017-03-30 15:31:15 +0200 | [diff] [blame] | 226 | Enable Glance Image Cache: |
| 227 | |
| 228 | .. code-block:: yaml |
| 229 | |
| 230 | glance: |
| 231 | server: |
| 232 | image_cache: |
| 233 | enabled: true |
| 234 | enable_management: true |
| 235 | directory: /var/lib/glance/image-cache/ |
| 236 | max_size: 21474836480 |
| 237 | .... |
| 238 | |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 239 | Enable auditing filter (CADF): |
| 240 | |
| 241 | .. code-block:: yaml |
| 242 | |
| 243 | glance: |
| 244 | server: |
| 245 | audit: |
| 246 | enabled: true |
| 247 | .... |
| 248 | filter_factory: 'keystonemiddleware.audit:filter_factory' |
| 249 | map_file: '/etc/pycadf/glance_api_audit_map.conf' |
| 250 | .... |
| 251 | |
RobertJansen1 | 68e84f9 | 2017-03-30 15:45:12 +0200 | [diff] [blame] | 252 | Swift integration glance |
| 253 | |
| 254 | .. code-block:: yaml |
| 255 | |
| 256 | glance: |
| 257 | server: |
| 258 | enabled: true |
| 259 | version: mitaka |
| 260 | storage: |
| 261 | engine: swift,http |
| 262 | swift: |
| 263 | store: |
| 264 | auth: |
| 265 | address: http://keystone.example.com:5000/v2.0 |
| 266 | version: 2 |
| 267 | endpoint_type: publicURL |
| 268 | container: glance |
| 269 | create_container_on_put: true |
| 270 | retry_get_count: 5 |
| 271 | user: 2ec7966596504f59acc3a76b3b9d9291:glance-user |
| 272 | key: someRandomPassword |
| 273 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 274 | Another way, which also supports multiple swift backends, can be |
| 275 | configured like this: |
Michel Nederlof | 3a86781 | 2017-05-15 09:46:11 +0200 | [diff] [blame] | 276 | |
| 277 | .. code-block:: yaml |
| 278 | |
| 279 | glance: |
| 280 | server: |
| 281 | enabled: true |
| 282 | version: mitaka |
| 283 | storage: |
| 284 | engine: swift,http |
| 285 | swift: |
| 286 | store: |
| 287 | endpoint_type: publicURL |
| 288 | container: glance |
| 289 | create_container_on_put: true |
| 290 | retry_get_count: 5 |
| 291 | references: |
| 292 | my_objectstore_reference_1: |
| 293 | auth: |
| 294 | address: http://keystone.example.com:5000/v2.0 |
| 295 | version: 2 |
| 296 | user: 2ec7966596504f59acc3a76b3b9d9291:glance-user |
| 297 | key: someRandomPassword |
| 298 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 299 | Enable CORS parameters: |
Ondrej Smola | e695fe8 | 2017-04-28 12:22:28 +0200 | [diff] [blame] | 300 | |
| 301 | .. code-block:: yaml |
| 302 | |
| 303 | glance: |
| 304 | server: |
| 305 | cors: |
| 306 | allowed_origin: https:localhost.local,http:localhost.local |
| 307 | expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token |
| 308 | allow_methods: GET,PUT,POST,DELETE,PATCH |
| 309 | allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token |
| 310 | allow_credentials: True |
| 311 | max_age: 86400 |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 312 | |
Michel Nederlof | 3ad5aac | 2017-05-15 09:46:24 +0200 | [diff] [blame] | 313 | Enable Viewing Multiple Locations |
| 314 | --------------------------------- |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 315 | |
Michel Nederlof | 3ad5aac | 2017-05-15 09:46:24 +0200 | [diff] [blame] | 316 | If you want to expose all locations available (for example when you have |
| 317 | multiple backends configured), then you can configure this like so: |
| 318 | |
| 319 | .. code-block:: yaml |
| 320 | |
| 321 | glance: |
| 322 | server: |
| 323 | show_multiple_locations: True |
| 324 | location_strategy: store_type |
| 325 | store_type_preference: rbd,swift,file |
| 326 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 327 | .. note:: The ``show_multiple_locations`` option is deprecated since |
| 328 | Newton and is planned to be handled by policy files *only* |
| 329 | starting with the Pike release. |
Michel Nederlof | 3ad5aac | 2017-05-15 09:46:24 +0200 | [diff] [blame] | 330 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 331 | This feature is convenient in a scenario when you have swift and rbd |
| 332 | configured and want to benefit from rbd enhancements. |
Michel Nederlof | 3ad5aac | 2017-05-15 09:46:24 +0200 | [diff] [blame] | 333 | |
Oleg Iurchenko | 68ae355 | 2017-10-13 18:40:42 +0300 | [diff] [blame] | 334 | Barbican integration glance |
| 335 | --------------------------- |
| 336 | |
| 337 | .. code-block:: yaml |
| 338 | |
| 339 | glance: |
| 340 | server: |
| 341 | barbican: |
| 342 | enabled: true |
| 343 | |
sgarbuz | 2d39f41 | 2018-08-27 10:44:31 +0300 | [diff] [blame] | 344 | Adding cron-job |
| 345 | --------------- |
| 346 | |
| 347 | .. code-block:: yaml |
| 348 | |
| 349 | glance: |
| 350 | server: |
| 351 | cron: |
| 352 | cache_pruner: |
| 353 | special_period: '@daily' |
| 354 | cache_cleaner: |
| 355 | hour: '5' |
| 356 | minute: '30' |
| 357 | daymonth: '*/2' |
| 358 | |
| 359 | |
| 360 | Image cache settings |
| 361 | -------------------- |
| 362 | |
| 363 | .. code-block:: yaml |
| 364 | |
| 365 | glance: |
| 366 | server: |
| 367 | image_cache: |
| 368 | max_size: 10737418240 |
| 369 | stall_time: 86400 |
| 370 | directory: '/var/lib/glance/image-cache/' |
| 371 | |
Oleg Iurchenko | 68ae355 | 2017-10-13 18:40:42 +0300 | [diff] [blame] | 372 | |
Richard Felkl | 4143a0e | 2017-02-01 23:24:13 +0100 | [diff] [blame] | 373 | Client role |
| 374 | ----------- |
| 375 | |
| 376 | Glance images |
| 377 | |
| 378 | .. code-block:: yaml |
| 379 | |
| 380 | glance: |
| 381 | client: |
| 382 | enabled: true |
| 383 | server: |
| 384 | profile_admin: |
| 385 | image: |
| 386 | cirros-test: |
| 387 | visibility: public |
| 388 | protected: false |
| 389 | location: http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img |
Jiri Konecny | 0456cfa | 2016-04-20 16:47:25 +0200 | [diff] [blame] | 390 | |
Dmitry Kalashnik | dd0d028 | 2017-12-06 12:45:31 +0400 | [diff] [blame] | 391 | Enhanced logging with logging.conf |
| 392 | ---------------------------------- |
| 393 | |
| 394 | By default logging.conf is disabled. |
| 395 | |
| 396 | That is possible to enable per-binary logging.conf with new variables: |
Dmitry Kalashnik | dd0d028 | 2017-12-06 12:45:31 +0400 | [diff] [blame] | 397 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 398 | * ``openstack_log_appender`` |
| 399 | Set to true to enable ``log_config_append`` for all OpenStack services |
Dmitry Kalashnik | dd0d028 | 2017-12-06 12:45:31 +0400 | [diff] [blame] | 400 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 401 | * ``openstack_fluentd_handler_enabled`` |
| 402 | Set to true to enable FluentHandler for all Openstack services |
| 403 | |
| 404 | * ``openstack_ossyslog_handler_enabled`` |
| 405 | Set to true to enable OSSysLogHandler for all Openstack services |
| 406 | |
| 407 | Only ``WatchedFileHandler``, ``OSSysLogHandler``, and ``FluentHandler`` |
| 408 | are available. |
| 409 | |
| 410 | Also, it is possible to configure this with pillar: |
Dmitry Kalashnik | dd0d028 | 2017-12-06 12:45:31 +0400 | [diff] [blame] | 411 | |
| 412 | .. code-block:: yaml |
| 413 | |
| 414 | glance: |
| 415 | server: |
| 416 | logging: |
| 417 | log_appender: true |
| 418 | log_handlers: |
| 419 | watchedfile: |
| 420 | enabled: true |
| 421 | fluentd: |
| 422 | enabled: true |
Oleksii Chupryn | 90a2e64 | 2018-02-06 19:53:06 +0200 | [diff] [blame] | 423 | ossyslog: |
| 424 | enabled: true |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 425 | |
Oleksandr Shyshko | 75e3d68 | 2018-09-07 14:07:57 +0300 | [diff] [blame] | 426 | Enable x509 and ssl communication between Glance and Galera cluster. |
| 427 | --------------------- |
| 428 | By default communication between Glance and Galera is unsecure. |
| 429 | |
| 430 | glance: |
| 431 | server: |
| 432 | database: |
| 433 | x509: |
| 434 | enabled: True |
| 435 | |
| 436 | You able to set custom certificates in pillar: |
| 437 | |
| 438 | glance: |
| 439 | server: |
| 440 | database: |
| 441 | x509: |
| 442 | cacert: (certificate content) |
| 443 | cert: (certificate content) |
| 444 | key: (certificate content) |
| 445 | |
| 446 | You can read more about it here: |
| 447 | https://docs.openstack.org/security-guide/databases/database-access-control.html |
| 448 | |
Oleksandr Bryndzii | c69e8c8 | 2018-09-28 23:27:30 +0000 | [diff] [blame^] | 449 | Glance services on controller node with memcached caching and security strategy: |
| 450 | |
| 451 | .. code-block:: yaml |
| 452 | |
| 453 | glance: |
| 454 | server: |
| 455 | enabled: true |
| 456 | ... |
| 457 | cache: |
| 458 | engine: memcached |
| 459 | members: |
| 460 | - host: 127.0.0.1 |
| 461 | port: 11211 |
| 462 | - host: 127.0.0.1 |
| 463 | port: 11211 |
| 464 | security: |
| 465 | enabled: true |
| 466 | strategy: ENCRYPT |
| 467 | secret_key: secret |
| 468 | |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 469 | Usage |
| 470 | ===== |
| 471 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 472 | #. Import new public image: |
Jiri Konecny | 0456cfa | 2016-04-20 16:47:25 +0200 | [diff] [blame] | 473 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 474 | .. code-block:: yaml |
Jiri Konecny | 0456cfa | 2016-04-20 16:47:25 +0200 | [diff] [blame] | 475 | |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 476 | glance image-create --name 'Windows 7 x86_64' --is-public true --container-format bare --disk-format qcow2 < ./win7.qcow2 |
Jiri Konecny | 0456cfa | 2016-04-20 16:47:25 +0200 | [diff] [blame] | 477 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 478 | #. Change new image's disk properties |
Petr Michalec | 86ec014 | 2016-11-29 16:34:15 +0100 | [diff] [blame] | 479 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 480 | .. code-block:: yaml |
Petr Michalec | 86ec014 | 2016-11-29 16:34:15 +0100 | [diff] [blame] | 481 | |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 482 | glance image-update "Windows 7 x86_64" --property hw_disk_bus=ide |
Petr Michalec | 86ec014 | 2016-11-29 16:34:15 +0100 | [diff] [blame] | 483 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 484 | #. Change new image's NIC properties |
Jakub Pavlik | 80a41ea | 2016-03-06 14:33:42 +0100 | [diff] [blame] | 485 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 486 | .. code-block:: yaml |
Jakub Pavlik | 80a41ea | 2016-03-06 14:33:42 +0100 | [diff] [blame] | 487 | |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 488 | glance image-update "Windows 7 x86_64" --property hw_vif_model=rtl8139 |
Jakub Pavlik | 80a41ea | 2016-03-06 14:33:42 +0100 | [diff] [blame] | 489 | |
Vasyl Saienko | 2718583 | 2018-09-10 10:36:00 +0000 | [diff] [blame] | 490 | Upgrades |
| 491 | ======== |
| 492 | |
| 493 | Each openstack formula provide set of phases (logical bloks) that will help to |
| 494 | build flexible upgrade orchestration logic for particular components. The list |
| 495 | of phases and theirs descriptions are listed in table below: |
| 496 | |
| 497 | +-------------------------------+------------------------------------------------------+ |
| 498 | | State | Description | |
| 499 | +===============================+======================================================+ |
| 500 | | <app>.upgrade.service_running | Ensure that all services for particular application | |
| 501 | | | are enabled for autostart and running | |
| 502 | +-------------------------------+------------------------------------------------------+ |
| 503 | | <app>.upgrade.service_stopped | Ensure that all services for particular application | |
| 504 | | | disabled for autostart and dead | |
| 505 | +-------------------------------+------------------------------------------------------+ |
| 506 | | <app>.upgrade.pkgs_latest | Ensure that packages used by particular application | |
| 507 | | | are installed to latest available version. | |
| 508 | | | This will not upgrade data plane packages like qemu | |
| 509 | | | and openvswitch as usually minimal required version | |
| 510 | | | in openstack services is really old. The data plane | |
| 511 | | | packages should be upgraded separately by `apt-get | |
| 512 | | | upgrade` or `apt-get dist-upgrade` | |
| 513 | | | Applying this state will not autostart service. | |
| 514 | +-------------------------------+------------------------------------------------------+ |
| 515 | | <app>.upgrade.render_config | Ensure configuration is rendered actual version. + |
| 516 | +-------------------------------+------------------------------------------------------+ |
| 517 | | <app>.upgrade.pre | We assume this state is applied on all nodes in the | |
| 518 | | | cloud before running upgrade. | |
| 519 | | | Only non destructive actions will be applied during | |
| 520 | | | this phase. Perform service built in service check | |
| 521 | | | like (keystone-manage doctor and nova-status upgrade)| |
| 522 | +-------------------------------+------------------------------------------------------+ |
| 523 | | <app>.upgrade.upgrade.pre | Mostly applicable for data plane nodes. During this | |
| 524 | | | phase resources will be gracefully removed from | |
| 525 | | | current node if it is allowed. Services for upgraded | |
| 526 | | | application will be set to admin disabled state to | |
| 527 | | | make sure node will not participate in resources | |
| 528 | | | scheduling. For example on gtw nodes this will set | |
| 529 | | | all agents to admin disable state and will move all | |
| 530 | | | routers to other agents. | |
| 531 | +-------------------------------+------------------------------------------------------+ |
| 532 | | <app>.upgrade.upgrade | This state will basically upgrade application on | |
| 533 | | | particular target. Stop services, render | |
| 534 | | | configuration, install new packages, run offline | |
| 535 | | | dbsync (for ctl), start services. Data plane should | |
| 536 | | | not be affected, only OpenStack python services. | |
| 537 | +-------------------------------+------------------------------------------------------+ |
| 538 | | <app>.upgrade.upgrade.post | Add services back to scheduling. | |
| 539 | +-------------------------------+------------------------------------------------------+ |
| 540 | | <app>.upgrade.post | This phase should be launched only when upgrade of | |
| 541 | | | the cloud is completed. Cleanup temporary files, | |
| 542 | | | perform other post upgrade tasks. | |
| 543 | +-------------------------------+------------------------------------------------------+ |
| 544 | | <app>.upgrade.verify | Here we will do basic health checks (API CRUD | |
| 545 | | | operations, verify do not have dead network | |
| 546 | | | agents/compute services) | |
| 547 | +-------------------------------+------------------------------------------------------+ |
| 548 | |
Jiri Konecny | 0456cfa | 2016-04-20 16:47:25 +0200 | [diff] [blame] | 549 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 550 | Read more |
| 551 | ========== |
Filip Pytloun | d681ae2 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 552 | |
| 553 | * http://ceph.com/docs/master/rbd/rbd-openstack/ |
| 554 | |
Jakub Pavlik | 9e85d17 | 2016-05-20 11:13:14 +0200 | [diff] [blame] | 555 | Documentation and Bugs |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 556 | ====================== |
Filip Pytloun | d681ae2 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 557 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 558 | * http://salt-formulas.readthedocs.io/ |
| 559 | Learn how to install and update salt-formulas |
Jakub Pavlik | 9e85d17 | 2016-05-20 11:13:14 +0200 | [diff] [blame] | 560 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 561 | * https://github.com/salt-formulas/salt-formula-glance/issues |
| 562 | In the unfortunate event that bugs are discovered, report the issue to the |
| 563 | appropriate issue tracker. Use the Github issue tracker for a specific salt |
| 564 | formula |
Jakub Pavlik | 9e85d17 | 2016-05-20 11:13:14 +0200 | [diff] [blame] | 565 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 566 | * https://launchpad.net/salt-formulas |
| 567 | For feature requests, bug reports, or blueprints affecting the entire |
| 568 | ecosystem, use the Launchpad salt-formulas project |
Jakub Pavlik | 9e85d17 | 2016-05-20 11:13:14 +0200 | [diff] [blame] | 569 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 570 | * https://launchpad.net/~salt-formulas-users |
| 571 | Join the salt-formulas-users team and subscribe to mailing list if required |
Jakub Pavlik | 9e85d17 | 2016-05-20 11:13:14 +0200 | [diff] [blame] | 572 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 573 | * https://github.com/salt-formulas/salt-formula-glance |
| 574 | Develop the salt-formulas projects in the master branch and then submit pull |
| 575 | requests against a specific formula |
Jakub Pavlik | 9e85d17 | 2016-05-20 11:13:14 +0200 | [diff] [blame] | 576 | |
OlgaGusarenko | 87eb284 | 2018-07-30 17:51:09 +0300 | [diff] [blame] | 577 | * #salt-formulas @ irc.freenode.net |
| 578 | Use this IRC channel in case of any questions or feedback which is always |
| 579 | welcome |
Jakub Pavlik | 9e85d17 | 2016-05-20 11:13:14 +0200 | [diff] [blame] | 580 | |