From f77cc87e81aae8a3a1b890e455fa1e1a8903700e Mon Sep 17 00:00:00 2001 From: Patrick O'Neill Date: Mon, 24 Sep 2018 14:38:08 +0100 Subject: [PATCH] Add support for Quobyte backend to Cinder and Nova Add an enable_cinder_backend_quobyte option to etc/kolla/globals.yml to enable use the Quobyte Cinder backend. Change the bind mounts for /var/lib/nova/mnt to include the shared propogation if Quobyte is enabled. Update the documentation to include a section on configuring the Cinder. Implements: blueprint cinder-quobyte-backend Change-Id: I364939407ad244fe81cea40f880effdbcaa8a20d --- ansible/group_vars/all.yml | 1 + ansible/roles/cinder/defaults/main.yml | 8 +++++ ansible/roles/cinder/tasks/precheck.yml | 1 + ansible/roles/cinder/templates/cinder.conf.j2 | 6 ++++ ansible/roles/nova/defaults/main.yml | 12 ++++++-- .../storage/cinder-guide-quobyte.rst | 29 +++++++++++++++++++ doc/source/reference/storage/index.rst | 1 + etc/kolla/globals.yml | 1 + ...nder-quobyte-support-0de697a0800fb962.yaml | 3 ++ 9 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 doc/source/reference/storage/cinder-guide-quobyte.rst create mode 100644 releasenotes/notes/add-cinder-quobyte-support-0de697a0800fb962.yaml diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index ae77e96a9d..9f9e6d88b5 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -452,6 +452,7 @@ enable_cinder_backend_iscsi: "{{ enable_cinder_backend_lvm | bool or enable_cind enable_cinder_backend_lvm: "no" enable_cinder_backend_nfs: "no" enable_cinder_backend_zfssa_iscsi: "no" +enable_cinder_backend_quobyte: "no" enable_cloudkitty: "no" enable_congress: "no" enable_designate: "no" diff --git a/ansible/roles/cinder/defaults/main.yml b/ansible/roles/cinder/defaults/main.yml index b813979cb0..ca7433d0e7 100644 --- a/ansible/roles/cinder/defaults/main.yml +++ b/ansible/roles/cinder/defaults/main.yml @@ -188,6 +188,8 @@ cinder_backends: enabled: "{{ cinder_backend_vmwarevc_vmdk | bool }}" - name: "zfssa-iscsi" enabled: "{{ enable_cinder_backend_zfssa_iscsi | bool }}" + - name: "QuobyteHD" + enabled: "{{ enable_cinder_backend_quobyte | bool }}" cinder_enabled_backends: "{{ cinder_backends|selectattr('enabled', 'equalto', true)|list }}" @@ -221,6 +223,12 @@ zfssa_iscsi_initiator_group: zfssa_iscsi_target_portal: zfssa_iscsi_target_interfaces: +######################### +# Quobyte Storage Driver +######################### +quobyte_storage_host: +quobyte_storage_volume: + #################### # Kolla diff --git a/ansible/roles/cinder/tasks/precheck.yml b/ansible/roles/cinder/tasks/precheck.yml index e2457bac1d..7767fc5141 100644 --- a/ansible/roles/cinder/tasks/precheck.yml +++ b/ansible/roles/cinder/tasks/precheck.yml @@ -28,6 +28,7 @@ - not cinder_backend_ceph | bool - not cinder_backend_vmwarevc_vmdk | bool - not enable_cinder_backend_zfssa_iscsi | bool + - not enable_cinder_backend_quobyte | bool - name: Checking LVM volume group exists for Cinder command: "vgs {{ cinder_volume_group }}" diff --git a/ansible/roles/cinder/templates/cinder.conf.j2 b/ansible/roles/cinder/templates/cinder.conf.j2 index 99769247ca..225e1585e5 100644 --- a/ansible/roles/cinder/templates/cinder.conf.j2 +++ b/ansible/roles/cinder/templates/cinder.conf.j2 @@ -197,6 +197,12 @@ zfssa_target_portal = {{ zfssa_iscsi_target_portal }} zfssa_target_interfaces = {{ zfssa_iscsi_target_interfaces }} {% endif %} +{% if enable_cinder_backend_quobyte | bool %} +[QuobyteHD] +volume_driver = cinder.volume.drivers.quobyte.QuobyteDriver +quobyte_volume_url = quobyte://{{ quobyte_storage_host }}/{{ quobyte_storage_volume }} +{% endif %} + [privsep_entrypoint] helper_command=sudo cinder-rootwrap /etc/cinder/rootwrap.conf privsep-helper --config-file /etc/cinder/cinder.conf diff --git a/ansible/roles/nova/defaults/main.yml b/ansible/roles/nova/defaults/main.yml index af08651e7e..76fcd918d4 100644 --- a/ansible/roles/nova/defaults/main.yml +++ b/ansible/roles/nova/defaults/main.yml @@ -19,7 +19,7 @@ nova_services: - "kolla_logs:/var/log/kolla/" - "libvirtd:/var/lib/libvirt" - "{{ nova_instance_datadir_volume }}:/var/lib/nova/" - - "{% if enable_cinder_backend_nfs | bool %}/var/lib/nova/mnt:/var/lib/nova/mnt:shared{% endif %}" + - "{% if enable_shared_var_lib_nova_mnt | bool %}/var/lib/nova/mnt:/var/lib/nova/mnt:shared{% endif %}" - "nova_libvirt_qemu:/etc/libvirt/qemu" - "{{ kolla_dev_repos_directory ~ '/nova/nova:/var/lib/kolla/venv/lib/python2.7/site-packages/nova' if nova_dev_mode | bool else '' }}" dimensions: "{{ nova_libvirt_dimensions }}" @@ -33,7 +33,7 @@ nova_services: - "/etc/localtime:/etc/localtime:ro" - "kolla_logs:/var/log/kolla" - "{{ nova_instance_datadir_volume }}:/var/lib/nova" - - "{% if enable_cinder_backend_nfs | bool %}/var/lib/nova/mnt:/var/lib/nova/mnt:shared{% endif %}" + - "{% if enable_shared_var_lib_nova_mnt | bool %}/var/lib/nova/mnt:/var/lib/nova/mnt:shared{% endif %}" - "{{ kolla_dev_repos_directory ~ '/nova/nova:/var/lib/kolla/venv/lib/python2.7/site-packages/nova' if nova_dev_mode | bool else '' }}" dimensions: "{{ nova_ssh_dimensions }}" placement-api: @@ -222,7 +222,7 @@ nova_services: - "{% if enable_iscsid | bool %}iscsi_info:/etc/iscsi{% endif %}" - "libvirtd:/var/lib/libvirt" - "{{ nova_instance_datadir_volume }}:/var/lib/nova/" - - "{% if enable_cinder_backend_nfs | bool %}/var/lib/nova/mnt:/var/lib/nova/mnt:shared{% endif %}" + - "{% if enable_shared_var_lib_nova_mnt | bool %}/var/lib/nova/mnt:/var/lib/nova/mnt:shared{% endif %}" - "{{ kolla_dev_repos_directory ~ '/nova/nova:/var/lib/kolla/venv/lib/python2.7/site-packages/nova' if nova_dev_mode | bool else '' }}" dimensions: "{{ nova_compute_dimensions }}" nova-compute-ironic: @@ -403,3 +403,9 @@ nova_git_repository: "{{ kolla_dev_repos_git }}/{{ project_name }}" nova_dev_repos_pull: "{{ kolla_dev_repos_pull }}" nova_dev_mode: "{{ kolla_dev_mode }}" nova_source_version: "{{ kolla_source_version }}" + +################################### +# Enable Shared Bind Propogation +################################### + +enable_shared_var_lib_nova_mnt: "{{ enable_cinder_backend_nfs | bool or enable_cinder_backend_quobyte | bool }}" diff --git a/doc/source/reference/storage/cinder-guide-quobyte.rst b/doc/source/reference/storage/cinder-guide-quobyte.rst new file mode 100644 index 0000000000..575239eb47 --- /dev/null +++ b/doc/source/reference/storage/cinder-guide-quobyte.rst @@ -0,0 +1,29 @@ +.. _cinder-guide-quobyte: + +============================= +Quobyte Storage for OpenStack +============================= + +Quobyte Cinder Driver +~~~~~~~~~~~~~~~~~~~~~ + +To use the ``Quobyte`` Cinder backend, enable and configure the ``Quobyte`` +Cinder driver in ``/etc/kolla/globals.yml``. + +.. code-block:: yaml + + enable_cinder_backend_quobyte: "yes" + +.. end + +Also set values for ``quobyte_storage_host`` and ``quobyte_storage_volume`` in +``/etc/kolla/globals.yml`` to the hostname or IP address of the Quobyte +registry and the Quobyte volume respectively. + +Since ``Quobyte`` is proprietary software that requires a license, the use of +this backend requires the ``Quobyte`` Client software package to be installed +in the ``cinder-volume`` and ``nova-compute`` containers. To do this follow the +steps outlined in the `kolla image building guide +`__, +particularly the ``Package Customisation`` and ``Custom Repos`` sections. The +repository information is available in the ``Quobyte`` customer portal. diff --git a/doc/source/reference/storage/index.rst b/doc/source/reference/storage/index.rst index 43559d2277..e17e82836c 100644 --- a/doc/source/reference/storage/index.rst +++ b/doc/source/reference/storage/index.rst @@ -12,6 +12,7 @@ supported by kolla. external-ceph-guide cinder-guide cinder-guide-hnas + cinder-guide-quobyte manila-guide manila-hnas-guide swift-guide diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index a859427ae6..072847ffa7 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -189,6 +189,7 @@ kolla_internal_vip_address: "10.10.10.254" #enable_cinder_backend_iscsi: "no" #enable_cinder_backend_lvm: "no" #enable_cinder_backend_nfs: "no" +#enable_cinder_backend_quobyte: "no" #enable_cloudkitty: "no" #enable_collectd: "no" #enable_congress: "no" diff --git a/releasenotes/notes/add-cinder-quobyte-support-0de697a0800fb962.yaml b/releasenotes/notes/add-cinder-quobyte-support-0de697a0800fb962.yaml new file mode 100644 index 0000000000..894a510448 --- /dev/null +++ b/releasenotes/notes/add-cinder-quobyte-support-0de697a0800fb962.yaml @@ -0,0 +1,3 @@ +--- +features: + - Add support in Cinder and Nova for Quobyte volumes