Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 1 | ============== |
| 2 | Glance formula |
| 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 | |
Filip Pytloun | d681ae2 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 9 | |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 10 | Sample pillars |
| 11 | ============== |
Filip Pytloun | d681ae2 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 12 | |
| 13 | .. code-block:: yaml |
| 14 | |
| 15 | glance: |
| 16 | server: |
| 17 | enabled: true |
| 18 | version: juno |
Alena Holanova | c1e5131 | 2016-03-22 14:08:44 +0100 | [diff] [blame] | 19 | workers: 8 |
Filip Pytloun | d681ae2 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 20 | policy: |
| 21 | publicize_image: |
| 22 | - "role:admin" |
| 23 | - "role:image_manager" |
| 24 | database: |
| 25 | engine: mysql |
| 26 | host: 127.0.0.1 |
| 27 | port: 3306 |
| 28 | name: glance |
| 29 | user: glance |
| 30 | password: pwd |
| 31 | identity: |
| 32 | engine: keystone |
| 33 | host: 127.0.0.1 |
| 34 | port: 35357 |
| 35 | tenant: service |
| 36 | user: glance |
| 37 | password: pwd |
| 38 | message_queue: |
| 39 | engine: rabbitmq |
| 40 | host: 127.0.0.1 |
| 41 | port: 5672 |
| 42 | user: openstack |
| 43 | password: pwd |
| 44 | virtual_host: '/openstack' |
| 45 | storage: |
| 46 | engine: file |
| 47 | images: |
| 48 | - name: "CirrOS 0.3.1" |
| 49 | format: qcow2 |
| 50 | file: cirros-0.3.1-x86_64-disk.img |
| 51 | source: http://cdn.download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img |
| 52 | public: true |
Petr Michalec | 86ec014 | 2016-11-29 16:34:15 +0100 | [diff] [blame] | 53 | audit: |
| 54 | enabled: false |
Simon Pasquier | 2acbef5 | 2017-02-03 15:09:39 +0100 | [diff] [blame] | 55 | api_limit_max: 100 |
| 56 | limit_param_default: 50 |
| 57 | |
| 58 | The pagination is controlled by the *api_limit_max* and *limit_param_default* |
| 59 | parameters as shown above: |
| 60 | |
| 61 | * *api_limit_max* defines the maximum number of records that the server will |
| 62 | return. |
| 63 | |
| 64 | * *limit_param_default* is the default *limit* parameter that |
| 65 | applies if the request didn't defined it explicitly. |
Filip Pytloun | d681ae2 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 66 | |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 67 | Keystone and cinder region |
| 68 | |
| 69 | .. code-block:: yaml |
| 70 | |
| 71 | glance: |
| 72 | server: |
| 73 | enabled: true |
| 74 | version: kilo |
| 75 | ... |
| 76 | identity: |
| 77 | engine: keystone |
| 78 | host: 127.0.0.1 |
| 79 | region: RegionTwo |
| 80 | ... |
| 81 | |
| 82 | Ceph integration glance |
| 83 | |
| 84 | .. code-block:: yaml |
| 85 | |
| 86 | glance: |
| 87 | server: |
| 88 | enabled: true |
| 89 | version: juno |
| 90 | storage: |
| 91 | engine: rbd,http |
| 92 | user: glance |
| 93 | pool: images |
| 94 | chunk_size: 8 |
| 95 | client_glance_key: AQDOavlU6BsSJhAAnpFR906mvdgdfRqLHwu0Uw== |
| 96 | |
| 97 | RabbitMQ HA setup |
| 98 | |
| 99 | .. code-block:: yaml |
| 100 | |
| 101 | glance: |
| 102 | server: |
| 103 | .... |
| 104 | message_queue: |
| 105 | engine: rabbitmq |
| 106 | members: |
| 107 | - host: 10.0.16.1 |
| 108 | - host: 10.0.16.2 |
| 109 | - host: 10.0.16.3 |
| 110 | user: openstack |
| 111 | password: pwd |
| 112 | virtual_host: '/openstack' |
| 113 | .... |
| 114 | |
mnederlof | ad6d624 | 2017-03-30 15:31:15 +0200 | [diff] [blame] | 115 | Enable Glance Image Cache: |
| 116 | |
| 117 | .. code-block:: yaml |
| 118 | |
| 119 | glance: |
| 120 | server: |
| 121 | image_cache: |
| 122 | enabled: true |
| 123 | enable_management: true |
| 124 | directory: /var/lib/glance/image-cache/ |
| 125 | max_size: 21474836480 |
| 126 | .... |
| 127 | |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 128 | Enable auditing filter (CADF): |
| 129 | |
| 130 | .. code-block:: yaml |
| 131 | |
| 132 | glance: |
| 133 | server: |
| 134 | audit: |
| 135 | enabled: true |
| 136 | .... |
| 137 | filter_factory: 'keystonemiddleware.audit:filter_factory' |
| 138 | map_file: '/etc/pycadf/glance_api_audit_map.conf' |
| 139 | .... |
| 140 | |
RobertJansen1 | 68e84f9 | 2017-03-30 15:45:12 +0200 | [diff] [blame] | 141 | Swift integration glance |
| 142 | |
| 143 | .. code-block:: yaml |
| 144 | |
| 145 | glance: |
| 146 | server: |
| 147 | enabled: true |
| 148 | version: mitaka |
| 149 | storage: |
| 150 | engine: swift,http |
| 151 | swift: |
| 152 | store: |
| 153 | auth: |
| 154 | address: http://keystone.example.com:5000/v2.0 |
| 155 | version: 2 |
| 156 | endpoint_type: publicURL |
| 157 | container: glance |
| 158 | create_container_on_put: true |
| 159 | retry_get_count: 5 |
| 160 | user: 2ec7966596504f59acc3a76b3b9d9291:glance-user |
| 161 | key: someRandomPassword |
| 162 | |
Michel Nederlof | 3a86781 | 2017-05-15 09:46:11 +0200 | [diff] [blame^] | 163 | Another way, which also supports multiple swift backends, can be configured like this: |
| 164 | |
| 165 | .. code-block:: yaml |
| 166 | |
| 167 | glance: |
| 168 | server: |
| 169 | enabled: true |
| 170 | version: mitaka |
| 171 | storage: |
| 172 | engine: swift,http |
| 173 | swift: |
| 174 | store: |
| 175 | endpoint_type: publicURL |
| 176 | container: glance |
| 177 | create_container_on_put: true |
| 178 | retry_get_count: 5 |
| 179 | references: |
| 180 | my_objectstore_reference_1: |
| 181 | auth: |
| 182 | address: http://keystone.example.com:5000/v2.0 |
| 183 | version: 2 |
| 184 | user: 2ec7966596504f59acc3a76b3b9d9291:glance-user |
| 185 | key: someRandomPassword |
| 186 | |
Ondrej Smola | e695fe8 | 2017-04-28 12:22:28 +0200 | [diff] [blame] | 187 | Enable CORS parameters |
| 188 | |
| 189 | .. code-block:: yaml |
| 190 | |
| 191 | glance: |
| 192 | server: |
| 193 | cors: |
| 194 | allowed_origin: https:localhost.local,http:localhost.local |
| 195 | expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token |
| 196 | allow_methods: GET,PUT,POST,DELETE,PATCH |
| 197 | allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token |
| 198 | allow_credentials: True |
| 199 | max_age: 86400 |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 200 | |
Richard Felkl | 4143a0e | 2017-02-01 23:24:13 +0100 | [diff] [blame] | 201 | Client role |
| 202 | ----------- |
| 203 | |
| 204 | Glance images |
| 205 | |
| 206 | .. code-block:: yaml |
| 207 | |
| 208 | glance: |
| 209 | client: |
| 210 | enabled: true |
| 211 | server: |
| 212 | profile_admin: |
| 213 | image: |
| 214 | cirros-test: |
| 215 | visibility: public |
| 216 | protected: false |
| 217 | 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] | 218 | |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 219 | |
| 220 | Usage |
| 221 | ===== |
| 222 | |
| 223 | Import new public image |
Jiri Konecny | 0456cfa | 2016-04-20 16:47:25 +0200 | [diff] [blame] | 224 | |
| 225 | .. code-block:: yaml |
| 226 | |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 227 | 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] | 228 | |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 229 | Change new image's disk properties |
Petr Michalec | 86ec014 | 2016-11-29 16:34:15 +0100 | [diff] [blame] | 230 | |
| 231 | .. code-block:: yaml |
| 232 | |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 233 | glance image-update "Windows 7 x86_64" --property hw_disk_bus=ide |
Petr Michalec | 86ec014 | 2016-11-29 16:34:15 +0100 | [diff] [blame] | 234 | |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 235 | Change new image's NIC properties |
Jakub Pavlik | 80a41ea | 2016-03-06 14:33:42 +0100 | [diff] [blame] | 236 | |
| 237 | .. code-block:: yaml |
| 238 | |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 239 | glance image-update "Windows 7 x86_64" --property hw_vif_model=rtl8139 |
Jakub Pavlik | 80a41ea | 2016-03-06 14:33:42 +0100 | [diff] [blame] | 240 | |
Jiri Konecny | 0456cfa | 2016-04-20 16:47:25 +0200 | [diff] [blame] | 241 | |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 242 | External links |
| 243 | ============== |
Filip Pytloun | d681ae2 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 244 | |
| 245 | * http://ceph.com/docs/master/rbd/rbd-openstack/ |
| 246 | |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 247 | |
Jakub Pavlik | 9e85d17 | 2016-05-20 11:13:14 +0200 | [diff] [blame] | 248 | Documentation and Bugs |
Aleš Komárek | e5b388f | 2017-02-06 15:48:57 +0100 | [diff] [blame] | 249 | ====================== |
Filip Pytloun | d681ae2 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 250 | |
Jakub Pavlik | 9e85d17 | 2016-05-20 11:13:14 +0200 | [diff] [blame] | 251 | To learn how to deploy OpenStack Salt, consult the documentation available |
| 252 | online at: |
| 253 | |
| 254 | https://wiki.openstack.org/wiki/OpenStackSalt |
| 255 | |
| 256 | In the unfortunate event that bugs are discovered, they should be reported to |
| 257 | the appropriate bug tracker. If you obtained the software from a 3rd party |
| 258 | operating system vendor, it is often wise to use their own bug tracker for |
| 259 | reporting problems. In all other cases use the master OpenStack bug tracker, |
| 260 | available at: |
| 261 | |
| 262 | http://bugs.launchpad.net/openstack-salt |
| 263 | |
| 264 | Developers wishing to work on the OpenStack Salt project should always base |
| 265 | their work on the latest formulas code, available from the master GIT |
| 266 | repository at: |
| 267 | |
| 268 | https://git.openstack.org/cgit/openstack/salt-formula-glance |
| 269 | |
| 270 | Developers should also join the discussion on the IRC list, at: |
| 271 | |
| 272 | https://wiki.openstack.org/wiki/Meetings/openstack-salt |
Filip Pytloun | e94a0a7 | 2017-02-02 13:02:03 +0100 | [diff] [blame] | 273 | |
| 274 | Documentation and Bugs |
| 275 | ====================== |
| 276 | |
| 277 | To learn how to install and update salt-formulas, consult the documentation |
| 278 | available online at: |
| 279 | |
| 280 | http://salt-formulas.readthedocs.io/ |
| 281 | |
| 282 | In the unfortunate event that bugs are discovered, they should be reported to |
| 283 | the appropriate issue tracker. Use Github issue tracker for specific salt |
| 284 | formula: |
| 285 | |
| 286 | https://github.com/salt-formulas/salt-formula-glance/issues |
| 287 | |
| 288 | For feature requests, bug reports or blueprints affecting entire ecosystem, |
| 289 | use Launchpad salt-formulas project: |
| 290 | |
| 291 | https://launchpad.net/salt-formulas |
| 292 | |
| 293 | You can also join salt-formulas-users team and subscribe to mailing list: |
| 294 | |
| 295 | https://launchpad.net/~salt-formulas-users |
| 296 | |
| 297 | Developers wishing to work on the salt-formulas projects should always base |
| 298 | their work on master branch and submit pull request against specific formula. |
| 299 | |
| 300 | https://github.com/salt-formulas/salt-formula-glance |
| 301 | |
| 302 | Any questions or feedback is always welcome so feel free to join our IRC |
| 303 | channel: |
| 304 | |
| 305 | #salt-formulas @ irc.freenode.net |