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