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

Commit

Permalink
Add support for 'fake' Cinder backend
Browse files Browse the repository at this point in the history
This commit adds the ability to use the fake cinder backend
over Ceph if necessary.
  • Loading branch information
wilkers-steve committed Mar 13, 2017
1 parent e16ea80 commit fb6eefa
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 19 deletions.
4 changes: 4 additions & 0 deletions cinder/templates/deployment-volume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: {}
Expand All @@ -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 }}
7 changes: 7 additions & 0 deletions cinder/templates/etc/_cinder.conf.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
37 changes: 19 additions & 18 deletions cinder/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -102,7 +104,6 @@ messaging:
user: rabbitmq
password: password


api:
workers: 8

Expand Down
5 changes: 4 additions & 1 deletion docs/developer/minikube.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit fb6eefa

Please sign in to comment.