@@ -19,6 +19,7 @@ Currently available samples are:
1919
2020- Ceph
2121- NFS
22+ - File
2223- CEPH + NFS
2324- CEPH + Sparse Image Upload
2425- Cinder backends
@@ -170,6 +171,55 @@ openstack role add --project admin --user admin swiftoperator
170171Additional details on the ` Ceph RGW ` configuration are described in the
171172[ openstack-k8s-operators/docs repo] ( https://github.com/openstack-k8s-operators/docs/blob/main/ceph.md#configure-swift-with-a-rgw-backend ) .
172173
174+ ## FILE example
175+
176+ ** For development only purposes** , as this is an unsupported configuration,
177+ you can configure Glance with ` File ` backend.
178+ Set ` glanceAPI ` to ` replicas: 1 ` since it assumes that Persistent Volume Claims
179+ are ` RWO ` , and image data are local on the Pod.
180+ However, you can scale up the number of replicas if an ` RWX ` PVC is provided
181+ through the ` extraMounts ` interface.
182+
183+ ### Configure the File backend
184+
185+ The following snippet shows how the Glance configuration looks like in the
186+ OpenStackControlPlane when File is set as a backend:
187+
188+ ```
189+ apiVersion: core.openstack.org/v1beta1
190+ kind: OpenStackControlPlane
191+ metadata:
192+ name: openstack
193+ spec:
194+ ...
195+ ...
196+ glance:
197+ template:
198+ customServiceConfig: |
199+ [DEFAULT]
200+ enabled_backends = default_backend:file
201+ [glance_store]
202+ default_backend = default_backend
203+ [default_backend]
204+ filesystem_store_datadir = /var/lib/glance/images/
205+ databaseInstance: openstack
206+ glanceAPIs:
207+ default:
208+ replicas: 1
209+ type: single
210+ ```
211+
212+ Once you have ` crc ` running making a deployment with File as a backend is
213+ trivial:
214+
215+ ```
216+ $ cd install_yamls
217+ $ make ceph TIMEOUT=90
218+ $ make crc_storage openstack
219+ $ oc kustomize ../glance-operator/config/samples/backends/file > ~/openstack-deployment.yaml
220+ $ export OPENSTACK_CR=`realpath ~/openstack-deployment.yaml`
221+ $ make openstack_deploy
222+ ```
173223
174224## NFS Example
175225
@@ -198,6 +248,20 @@ metadata:
198248spec:
199249...
200250...
251+ glance:
252+ template:
253+ customServiceConfig: |
254+ [DEFAULT]
255+ enabled_backends = default_backend:file
256+ [glance_store]
257+ default_backend = default_backend
258+ [default_backend]
259+ filesystem_store_datadir = /var/lib/glance/images/
260+ databaseInstance: openstack
261+ glanceAPIs:
262+ default:
263+ replicas: 1
264+ type: single
201265 extraMounts:
202266 - extraVol:
203267 - extraVolType: Nfs
0 commit comments