Skip to content
This repository was archived by the owner on Jul 24, 2019. It is now read-only.

Commit fb6eefa

Browse files
committed
Add support for 'fake' Cinder backend
This commit adds the ability to use the fake cinder backend over Ceph if necessary.
1 parent e16ea80 commit fb6eefa

File tree

4 files changed

+34
-19
lines changed

4 files changed

+34
-19
lines changed

cinder/templates/deployment-volume.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ spec:
7171
mountPath: /etc/cinder/conf/cinder.conf
7272
subPath: cinder.conf
7373
readOnly: true
74+
{{- if .Values.ceph.enabled }}
7475
- name: cephconf
7576
mountPath: /etc/ceph/ceph.conf
7677
subPath: ceph.conf
@@ -79,6 +80,7 @@ spec:
7980
mountPath: /etc/ceph/ceph.client.{{ .Values.ceph.cinder_user }}.keyring
8081
subPath: ceph.client.{{ .Values.ceph.cinder_user }}.keyring
8182
readOnly: true
83+
{{- end }}
8284
volumes:
8385
- name: pod-etc-cinder
8486
emptyDir: {}
@@ -87,9 +89,11 @@ spec:
8789
- name: cinderconf
8890
configMap:
8991
name: cinder-etc
92+
{{- if .Values.ceph.enabled }}
9093
- name: cephconf
9194
configMap:
9295
name: cinder-etc
9396
- name: cephclientcinderkeyring
9497
configMap:
9598
name: cinder-etc
99+
{{- end }}

cinder/templates/etc/_cinder.conf.tpl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ rabbit_ha_queues = true
6464
rabbit_hosts = {{ .Values.messaging.hosts }}
6565

6666
[rbd1]
67+
volume_backend_name = rbd
6768
volume_driver = cinder.volume.drivers.rbd.RBDDriver
6869
rbd_pool = {{ .Values.backends.rbd1.pool }}
6970
rbd_ceph_conf = /etc/ceph/ceph.conf
@@ -78,3 +79,9 @@ rbd_secret_uuid = {{- include "secrets/ceph-client-key" . -}}
7879
{{- end }}
7980
rbd_secret_uuid = {{ .Values.backends.rbd1.secret }}
8081
report_discard_supported = True
82+
83+
{{- if .Values.backends.fake.enabled }}
84+
[fake]
85+
volume_backend_name = fake
86+
volume_driver = cinder.tests.fake_driver.FakeLoggingVolumeDriver
87+
{{- end }}

cinder/values.yaml

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,25 @@
2020
development:
2121
enabled: false
2222

23+
backends:
24+
enabled:
25+
- rbd1
26+
rbd1:
27+
secret: null
28+
user: "admin"
29+
pool: "volumes"
30+
fake:
31+
enabled: false
32+
33+
ceph:
34+
enabled: true
35+
monitors: []
36+
cinder_user: "admin"
37+
# a null value for the keyring will
38+
# attempt to use the key from
39+
# common/secrets/ceph-client-key
40+
cinder_keyring: null
41+
2342
replicas:
2443
api: 1
2544
volume: 1
@@ -77,23 +96,6 @@ database:
7796
cinder_password: password
7897
cinder_user: cinder
7998

80-
ceph:
81-
enabled: true
82-
monitors: []
83-
cinder_user: "admin"
84-
# a null value for the keyring will
85-
# attempt to use the key from
86-
# common/secrets/ceph-client-key
87-
cinder_keyring: null
88-
89-
backends:
90-
enabled:
91-
- rbd1
92-
rbd1:
93-
secret: null
94-
user: "admin"
95-
pool: "volumes"
96-
9799
glance:
98100
version: 2
99101

@@ -102,7 +104,6 @@ messaging:
102104
user: rabbitmq
103105
password: password
104106

105-
106107
api:
107108
workers: 8
108109

docs/developer/minikube.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ To deploy Openstack-Helm in development mode, ensure you've created a minikube-a
178178
/var/lib/docker
179179
```
180180

181-
As a result of this guidence, we recommend creating the following for MariaDB like shown below.
181+
As a result of this guidance, we recommend creating the following for MariaDB like shown below.
182182

183183
```
184184
$ sudo mkdir -p /data/openstack-helm/mariadb
@@ -194,6 +194,9 @@ $ kubectl label nodes openstack-control-plane=enabled --all --namespace=openstac
194194
```
195195
***NOTE:*** *You do not need to label your minikube cluster for `ceph-storage`, since development mode uses hostPath.*
196196

197+
### Change Cinder Backend
198+
199+
Currently, Cinder uses Ceph for the RBD backend out of the box. To avoid Ceph in development mode, developers can use the Cinder 'Fake' backend by both adding the `fake` driver to the list of [enabled backends](https://github.com/att-comdev/openstack-helm/blob/master/cinder/values.yaml#L87) in Cinder's values.yaml file, and changing the `enabled` flag under `fake` to true. The Fake backend allows developers to create volumes and log events. In the future, the Fake backend will be replaced with the LVM backend in development mode to allow developers to create and attach volumes to instances.
197200

198201
### Deploy MariaDB
199202

0 commit comments

Comments
 (0)