Filip Pytloun | d681ae2 | 2015-10-06 16:28:31 +0200 | [diff] [blame] | 1 | ================== |
| 2 | Glance Image Store |
| 3 | ================== |
| 4 | |
| 5 | The Glance project provides services for discovering, registering, and retrieving virtual machine images. Glance has a RESTful API that allows querying of VM image metadata as well as retrieval of the actual image. |
| 6 | |
| 7 | Usage |
| 8 | ===== |
| 9 | |
| 10 | Import new public image |
| 11 | |
| 12 | .. code-block:: yaml |
| 13 | |
| 14 | glance image-create --name 'Windows 7 x86_64' --is-public true --container-format bare --disk-format qcow2 < ./win7.qcow2 |
| 15 | |
| 16 | Change new image's disk properties |
| 17 | |
| 18 | .. code-block:: yaml |
| 19 | |
| 20 | glance image-update "Windows 7 x86_64" --property hw_disk_bus=ide |
| 21 | |
| 22 | Change new image's NIC properties |
| 23 | |
| 24 | .. code-block:: yaml |
| 25 | |
| 26 | glance image-update "Windows 7 x86_64" --property hw_vif_model=rtl8139 |
| 27 | |
| 28 | Sample pillar |
| 29 | ============= |
| 30 | |
| 31 | .. code-block:: yaml |
| 32 | |
| 33 | glance: |
| 34 | server: |
| 35 | enabled: true |
| 36 | version: juno |
| 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 |
| 70 | |
| 71 | Ceph integration glance |
| 72 | ======================= |
| 73 | |
| 74 | .. code-block:: yaml |
| 75 | |
| 76 | glance: |
| 77 | server: |
| 78 | enabled: true |
| 79 | version: juno |
| 80 | storage: |
| 81 | engine: rbd |
| 82 | user: glance |
| 83 | pool: images |
| 84 | chunk_size: 8 |
| 85 | client_glance_key: AQDOavlU6BsSJhAAnpFR906mvdgdfRqLHwu0Uw== |
| 86 | |
| 87 | * http://ceph.com/docs/master/rbd/rbd-openstack/ |
| 88 | |
| 89 | Read more |
| 90 | ========= |
| 91 | |
| 92 | * http://docs.openstack.org/image-guide/content/ch_obtaining_images.html |
| 93 | * http://cloud-images.ubuntu.com/precise/current/ |
| 94 | * http://fedoraproject.org/en/get-fedora#clouds |
| 95 | * http://www.cloudbase.it/ws2012r2/ |
| 96 | * http://docs.openstack.org/cli-reference/content/glanceclient_commands.html |