diff --git a/cinder/templates/deployment-volume.yaml b/cinder/templates/deployment-volume.yaml index b796b762..b49e01ca 100644 --- a/cinder/templates/deployment-volume.yaml +++ b/cinder/templates/deployment-volume.yaml @@ -71,6 +71,7 @@ spec: mountPath: /etc/cinder/conf/cinder.conf subPath: cinder.conf readOnly: true + {{- if .Values.ceph.enabled }} - name: cephconf mountPath: /etc/ceph/ceph.conf subPath: ceph.conf @@ -79,6 +80,7 @@ spec: mountPath: /etc/ceph/ceph.client.{{ .Values.ceph.cinder_user }}.keyring subPath: ceph.client.{{ .Values.ceph.cinder_user }}.keyring readOnly: true + {{- end }} volumes: - name: pod-etc-cinder emptyDir: {} @@ -87,9 +89,11 @@ spec: - name: cinderconf configMap: name: cinder-etc + {{- if .Values.ceph.enabled }} - name: cephconf configMap: name: cinder-etc - name: cephclientcinderkeyring configMap: name: cinder-etc + {{- end }} diff --git a/cinder/templates/etc/_cinder.conf.tpl b/cinder/templates/etc/_cinder.conf.tpl index cb336d64..26fa476c 100644 --- a/cinder/templates/etc/_cinder.conf.tpl +++ b/cinder/templates/etc/_cinder.conf.tpl @@ -64,6 +64,7 @@ rabbit_ha_queues = true rabbit_hosts = {{ .Values.messaging.hosts }} [rbd1] +volume_backend_name = rbd volume_driver = cinder.volume.drivers.rbd.RBDDriver rbd_pool = {{ .Values.backends.rbd1.pool }} rbd_ceph_conf = /etc/ceph/ceph.conf @@ -78,3 +79,9 @@ rbd_secret_uuid = {{- include "secrets/ceph-client-key" . -}} {{- end }} rbd_secret_uuid = {{ .Values.backends.rbd1.secret }} report_discard_supported = True + +{{- if .Values.backends.fake.enabled }} +[fake] +volume_backend_name = fake +volume_driver = cinder.tests.fake_driver.FakeLoggingVolumeDriver +{{- end }} diff --git a/cinder/values.yaml b/cinder/values.yaml index 6322e21e..5052de14 100644 --- a/cinder/values.yaml +++ b/cinder/values.yaml @@ -20,6 +20,25 @@ development: enabled: false +backends: + enabled: + - rbd1 + rbd1: + secret: null + user: "admin" + pool: "volumes" + fake: + enabled: false + +ceph: + enabled: true + monitors: [] + cinder_user: "admin" + # a null value for the keyring will + # attempt to use the key from + # common/secrets/ceph-client-key + cinder_keyring: null + replicas: api: 1 volume: 1 @@ -77,23 +96,6 @@ database: cinder_password: password cinder_user: cinder -ceph: - enabled: true - monitors: [] - cinder_user: "admin" - # a null value for the keyring will - # attempt to use the key from - # common/secrets/ceph-client-key - cinder_keyring: null - -backends: - enabled: - - rbd1 - rbd1: - secret: null - user: "admin" - pool: "volumes" - glance: version: 2 @@ -102,7 +104,6 @@ messaging: user: rabbitmq password: password - api: workers: 8 diff --git a/docs/developer/minikube.md b/docs/developer/minikube.md index e62852d7..4be9b751 100644 --- a/docs/developer/minikube.md +++ b/docs/developer/minikube.md @@ -178,7 +178,7 @@ To deploy Openstack-Helm in development mode, ensure you've created a minikube-a /var/lib/docker ``` -As a result of this guidence, we recommend creating the following for MariaDB like shown below. +As a result of this guidance, we recommend creating the following for MariaDB like shown below. ``` $ sudo mkdir -p /data/openstack-helm/mariadb @@ -194,6 +194,9 @@ $ kubectl label nodes openstack-control-plane=enabled --all --namespace=openstac ``` ***NOTE:*** *You do not need to label your minikube cluster for `ceph-storage`, since development mode uses hostPath.* +### Change Cinder Backend + +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. ### Deploy MariaDB