1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
|
.. _glance-guide:
======================
Glance - Image service
======================
Glance backends
---------------
Overview
~~~~~~~~
Glance can be deployed using Kolla and supports the following
backends:
* file
* ceph
File backend
~~~~~~~~~~~~
When using the ``file`` backend, images will be stored locally
under the value of the ``glance_file_datadir_volume`` variable, which defaults
to a docker volume called ``glance``. By default when using ``file`` backend
only one ``glance-api`` container can be running.
For better reliability and performance, ``glance_file_datadir_volume`` should
be mounted under a shared filesystem such as NFS.
Usage of glance file backend under shared filesystem:
.. code-block:: yaml
glance_backend_file: "yes"
glance_file_datadir_volume: "/path/to/shared/storage/"
Ceph backend
~~~~~~~~~~~~
To make use of ``ceph`` backend in glance, simply enable external ceph.
By default will enable backend ceph automatically.
Please refer to :doc:`../storage/external-ceph-guide`
on how to configure this backend.
To enable the ceph backend manually:
.. code-block:: yaml
glance_backend_ceph: "yes"
Glance with S3 Backend
~~~~~~~~~~~~~~~~~~~~~~
Configuring Glance for S3 includes the following steps:
#. Enable Glance S3 backend in ``globals.yml``:
.. code-block:: yaml
glance_backend_s3: "yes"
#. Configure S3 connection details in ``/etc/kolla/globals.yml``:
* ``glance_backend_s3_url`` (example: ``http://127.0.0.1:9000``)
* ``glance_backend_s3_access_key`` (example: ``minio``)
* ``glance_backend_s3_bucket`` (example: ``glance``)
* ``glance_backend_s3_secret_key`` (example: ``admin``)
#. If you wish to use a single S3 backend for all supported services,
use the following variables:
* ``s3_url``
* ``s3_access_key``
* ``s3_glance_bucket``
* ``s3_secret_key``
All Glance S3 configurations use these options as default values.
Upgrading glance
----------------
Overview
~~~~~~~~
Glance can be upgraded with the following methods:
* Rolling upgrade
* Legacy upgrade
Rolling upgrade
~~~~~~~~~~~~~~~
As of the Rocky release, glance can be upgraded in a rolling upgrade mode.
This mode will reduce the API downtime during upgrade to a minimum of
a container restart, aiming for zero downtime in future releases.
By default it is disabled, so if you want to upgrade using this mode it will
need to be enabled.
.. code-block:: yaml
glance_enable_rolling_upgrade: "yes"
.. warning::
When using glance backend ``file`` without a shared filesystem, this method cannot
be used or will end up with a corrupt state of glance services.
Reasoning behind is because glance api is only running in one host, blocking the
orchestration of a rolling upgrade.
Legacy upgrade
~~~~~~~~~~~~~~
This upgrade method will stop APIs during database schema migrations,
and container restarts.
It is the default mode, ensure rolling upgrade method is not enabled.
.. code-block:: yaml
glance_enable_rolling_upgrade: "no"
Other configuration
-------------------
Glance cache
~~~~~~~~~~~~
Glance cache is disabled by default, it can be enabled by:
.. code-block:: yaml
enable_glance_image_cache: "yes"
glance_cache_max_size: "10737418240" # 10GB by default
.. warning::
When using the ceph backend, is recommended to not use glance cache, since
nova already has a cached version of the image, and the image is directly
copied from ceph instead of glance api hosts. Enabling glance cache will
lead to unnecessary storage consumption.
Glance caches are not cleaned up automatically, the glance team recommends to
use a cron service to regularly clean cached images. In the future kolla will
deploy a cron container to manage such clean ups. Please refer to
:glance-doc:`Glance image cache <admin/cache.html>`.
Property protection
~~~~~~~~~~~~~~~~~~~
`Property protection <https://docs.openstack.org/glance/latest/admin/property-protections.html>`_
is disabled by default, it can be enabled by:
.. code-block:: yaml
glance_enable_property_protection: "yes"
and defining ``property-protections-rules.conf`` under
``{{ node_custom_config }}/glance/``. The default
``property_protection_rule_format`` is ``roles`` but it can be overwritten.
Interoperable image import
~~~~~~~~~~~~~~~~~~~~~~~~~~
The `interoperable image import <https://docs.openstack.org/glance/latest/admin/interoperable-image-import.html>`_
is disabled by default, it can be enabled by:
.. code-block:: yaml
glance_enable_interoperable_image_import: "yes"
and defining ``glance-image-import.conf`` under
``{{ node_custom_config }}/glance/``.
|