blob: eafd56acc9247a3672b430cdb97abc3278b4371c [file] [log] [blame]
Aleš Komáreke5b388f2017-02-06 15:48:57 +01001==============
2Glance formula
3==============
Filip Pytlound681ae22015-10-06 16:28:31 +02004
Jakub Pavlik9e85d172016-05-20 11:13:14 +02005The Glance project provides services for discovering, registering, and
6retrieving virtual machine images. Glance has a RESTful API that allows
7querying of VM image metadata as well as retrieval of the actual image.
Filip Pytlound681ae22015-10-06 16:28:31 +02008
Filip Pytlound681ae22015-10-06 16:28:31 +02009
Aleš Komáreke5b388f2017-02-06 15:48:57 +010010Sample pillars
11==============
Filip Pytlound681ae22015-10-06 16:28:31 +020012
13.. code-block:: yaml
14
15 glance:
16 server:
17 enabled: true
18 version: juno
Alena Holanovac1e51312016-03-22 14:08:44 +010019 workers: 8
Filip Pytlound681ae22015-10-06 16:28:31 +020020 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 Michalec86ec0142016-11-29 16:34:15 +010053 audit:
54 enabled: false
Simon Pasquier2acbef52017-02-03 15:09:39 +010055 api_limit_max: 100
56 limit_param_default: 50
57
58The pagination is controlled by the *api_limit_max* and *limit_param_default*
59parameters 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 Pytlound681ae22015-10-06 16:28:31 +020066
Aleš Komáreke5b388f2017-02-06 15:48:57 +010067Keystone 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
82Ceph 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
97RabbitMQ 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
mnederlofad6d6242017-03-30 15:31:15 +0200115Enable 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áreke5b388f2017-02-06 15:48:57 +0100128Enable 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
141
Richard Felkl4143a0e2017-02-01 23:24:13 +0100142Client role
143-----------
144
145Glance images
146
147.. code-block:: yaml
148
149 glance:
150 client:
151 enabled: true
152 server:
153 profile_admin:
154 image:
155 cirros-test:
156 visibility: public
157 protected: false
158 location: http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-i386-disk.img
Jiri Konecny0456cfa2016-04-20 16:47:25 +0200159
Aleš Komáreke5b388f2017-02-06 15:48:57 +0100160
161Usage
162=====
163
164Import new public image
Jiri Konecny0456cfa2016-04-20 16:47:25 +0200165
166.. code-block:: yaml
167
Aleš Komáreke5b388f2017-02-06 15:48:57 +0100168 glance image-create --name 'Windows 7 x86_64' --is-public true --container-format bare --disk-format qcow2 < ./win7.qcow2
Jiri Konecny0456cfa2016-04-20 16:47:25 +0200169
Aleš Komáreke5b388f2017-02-06 15:48:57 +0100170Change new image's disk properties
Petr Michalec86ec0142016-11-29 16:34:15 +0100171
172.. code-block:: yaml
173
Aleš Komáreke5b388f2017-02-06 15:48:57 +0100174 glance image-update "Windows 7 x86_64" --property hw_disk_bus=ide
Petr Michalec86ec0142016-11-29 16:34:15 +0100175
Aleš Komáreke5b388f2017-02-06 15:48:57 +0100176Change new image's NIC properties
Jakub Pavlik80a41ea2016-03-06 14:33:42 +0100177
178.. code-block:: yaml
179
Aleš Komáreke5b388f2017-02-06 15:48:57 +0100180 glance image-update "Windows 7 x86_64" --property hw_vif_model=rtl8139
Jakub Pavlik80a41ea2016-03-06 14:33:42 +0100181
Jiri Konecny0456cfa2016-04-20 16:47:25 +0200182
Aleš Komáreke5b388f2017-02-06 15:48:57 +0100183External links
184==============
Filip Pytlound681ae22015-10-06 16:28:31 +0200185
186* http://ceph.com/docs/master/rbd/rbd-openstack/
187
Aleš Komáreke5b388f2017-02-06 15:48:57 +0100188
Jakub Pavlik9e85d172016-05-20 11:13:14 +0200189Documentation and Bugs
Aleš Komáreke5b388f2017-02-06 15:48:57 +0100190======================
Filip Pytlound681ae22015-10-06 16:28:31 +0200191
Jakub Pavlik9e85d172016-05-20 11:13:14 +0200192To learn how to deploy OpenStack Salt, consult the documentation available
193online at:
194
195 https://wiki.openstack.org/wiki/OpenStackSalt
196
197In the unfortunate event that bugs are discovered, they should be reported to
198the appropriate bug tracker. If you obtained the software from a 3rd party
199operating system vendor, it is often wise to use their own bug tracker for
200reporting problems. In all other cases use the master OpenStack bug tracker,
201available at:
202
203 http://bugs.launchpad.net/openstack-salt
204
205Developers wishing to work on the OpenStack Salt project should always base
206their work on the latest formulas code, available from the master GIT
207repository at:
208
209 https://git.openstack.org/cgit/openstack/salt-formula-glance
210
211Developers should also join the discussion on the IRC list, at:
212
213 https://wiki.openstack.org/wiki/Meetings/openstack-salt
Filip Pytloune94a0a72017-02-02 13:02:03 +0100214
215Documentation and Bugs
216======================
217
218To learn how to install and update salt-formulas, consult the documentation
219available online at:
220
221 http://salt-formulas.readthedocs.io/
222
223In the unfortunate event that bugs are discovered, they should be reported to
224the appropriate issue tracker. Use Github issue tracker for specific salt
225formula:
226
227 https://github.com/salt-formulas/salt-formula-glance/issues
228
229For feature requests, bug reports or blueprints affecting entire ecosystem,
230use Launchpad salt-formulas project:
231
232 https://launchpad.net/salt-formulas
233
234You can also join salt-formulas-users team and subscribe to mailing list:
235
236 https://launchpad.net/~salt-formulas-users
237
238Developers wishing to work on the salt-formulas projects should always base
239their work on master branch and submit pull request against specific formula.
240
241 https://github.com/salt-formulas/salt-formula-glance
242
243Any questions or feedback is always welcome so feel free to join our IRC
244channel:
245
246 #salt-formulas @ irc.freenode.net