From ac094cb143395662c4f51eca028e1c03d87f6e63 Mon Sep 17 00:00:00 2001 From: yuval Date: Tue, 20 Aug 2024 15:10:08 +0300 Subject: [PATCH] adding lighbits cinder driver support --- ansible/group_vars/all.yml | 1 + ansible/roles/cinder/defaults/main.yml | 3 ++ ansible/roles/cinder/tasks/precheck.yml | 1 + ansible/roles/cinder/templates/cinder.conf.j2 | 10 ++++++ .../storage/cinder-guide-lightbits.rst | 33 +++++++++++++++++++ doc/source/reference/storage/cinder-guide.rst | 3 ++ etc/kolla/globals.yml | 1 + 7 files changed, 52 insertions(+) create mode 100644 doc/source/reference/storage/cinder-guide-lightbits.rst diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 57d195a68a..0446f9ae47 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -753,6 +753,7 @@ enable_cinder_backend_quobyte: "no" enable_cinder_backend_pure_iscsi: "no" enable_cinder_backend_pure_fc: "no" enable_cinder_backend_pure_roce: "no" +enable_cinder_backend_lightbits: "no" enable_cloudkitty: "no" enable_collectd: "no" enable_cyborg: "no" diff --git a/ansible/roles/cinder/defaults/main.yml b/ansible/roles/cinder/defaults/main.yml index db000ae035..f5a5e8ce9e 100644 --- a/ansible/roles/cinder/defaults/main.yml +++ b/ansible/roles/cinder/defaults/main.yml @@ -253,6 +253,8 @@ cinder_backends: enabled: "{{ enable_cinder_backend_pure_fc | bool }}" - name: "{{ cinder_backend_pure_roce_name }}" enabled: "{{ enable_cinder_backend_pure_roce | bool }}" + - name: "{{ cinder_backend_lightbits_name }}" + enabled: "{{ cinder_backend_lightbits | bool }}" cinder_backend_ceph_name: "rbd-1" cinder_backend_lvm_name: "lvm-1" @@ -264,6 +266,7 @@ cinder_backend_quobyte_name: "QuobyteHD" cinder_backend_pure_iscsi_name: "Pure-FlashArray-iscsi" cinder_backend_pure_fc_name: "Pure-FlashArray-fc" cinder_backend_pure_roce_name: "Pure-FlashArray-roce" +cinder_backend_lightbits_name: "Lightbits-NVMe-TCP" cinder_ceph_backends: - name: "{{ cinder_backend_ceph_name }}" diff --git a/ansible/roles/cinder/tasks/precheck.yml b/ansible/roles/cinder/tasks/precheck.yml index 9a14b8c1d7..d7e97555fa 100644 --- a/ansible/roles/cinder/tasks/precheck.yml +++ b/ansible/roles/cinder/tasks/precheck.yml @@ -43,6 +43,7 @@ - not enable_cinder_backend_pure_iscsi | bool - not enable_cinder_backend_pure_fc | bool - not enable_cinder_backend_pure_roce | bool + - not enable_cinder_backend_lightbits | bool - name: Checking LVM volume group exists for Cinder become: true diff --git a/ansible/roles/cinder/templates/cinder.conf.j2 b/ansible/roles/cinder/templates/cinder.conf.j2 index 7523b50f55..738fcd0e26 100644 --- a/ansible/roles/cinder/templates/cinder.conf.j2 +++ b/ansible/roles/cinder/templates/cinder.conf.j2 @@ -237,6 +237,16 @@ san_ip = {{ pure_san_ip }} pure_api_token = {{ pure_api_token }} {% endif %} +{% if enable_cinder_backend_lightbits | bool %} +[{{ cinder_backend_lightbits_name }}] +volume_driver: 'cinder.volume.drivers.lightos.LightOSVolumeDriver' +volume_backend_name: {{ lightbits_nvme_tcp_backend_name }} +lightos_api_address: {{ lightbits_target_ips }} +lightos_api_port: {{ lightbits_api_port}} +lightos_default_num_replicas: {{ lightbits_default_num_replicas }} +lightos_skip_ssl_verify: {{ lightbits_skip_ssl_verify }} +lightos_jwt: {{ Lightbits_JWT }} + [privsep_entrypoint] helper_command=sudo cinder-rootwrap /etc/cinder/rootwrap.conf privsep-helper --config-file /etc/cinder/cinder.conf diff --git a/doc/source/reference/storage/cinder-guide-lightbits.rst b/doc/source/reference/storage/cinder-guide-lightbits.rst new file mode 100644 index 0000000000..b09d0e4a1f --- /dev/null +++ b/doc/source/reference/storage/cinder-guide-lightbits.rst @@ -0,0 +1,33 @@ +.. cinder-guide-Lightbits: + +===================================== +Lightbits labs storage for OpenStack +===================================== + +Lightbits labs Cinder Driver +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To use the ``Lightbits labs`` Cinder backend, enable and +configure the ``Lightbits labs`` Cinder driver in +``/etc/kolla/globals.yml``. + +.. code-block:: yaml + + enable_cinder_backend_lightbits: "yes" + +.. end + +Also set the values for the following parameters in ``/etc/kolla/globals.yml``: + +- ``lightos_api_address`` +- ``lightos_api_port`` +- ``lightos_default_num_replicas`` +- ``lightos_skip_ssl_verify`` +- ``lightos_jwt`` + + +For details on how to use these parameters, refer to the +`Lightbits labs Cinder Reference Guide `_. + +There are numerous other parameters that can be set for this driver and +these are detailed in the above link. diff --git a/doc/source/reference/storage/cinder-guide.rst b/doc/source/reference/storage/cinder-guide.rst index 49f16405c1..6935bcb820 100644 --- a/doc/source/reference/storage/cinder-guide.rst +++ b/doc/source/reference/storage/cinder-guide.rst @@ -278,6 +278,9 @@ that appears in cinder.conf: * - Pure Storage FlashArray for OpenStack - cinder_backend_pure_roce_name - Pure-FlashArray-roce + * - Lightbits Labs storage backend + - cinder_backend_lightbits_name + - Lightbits-NVMe-TCP These are the names you use when `configuring `_ diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index 065d9c9dbf..e78eb4abeb 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -343,6 +343,7 @@ workaround_ansible_issue_8743: yes #enable_cinder_backend_pure_iscsi: "no" #enable_cinder_backend_pure_fc: "no" #enable_cinder_backend_pure_roce: "no" +#enable_cinder_backend_lightbits: "no" #enable_cloudkitty: "no" #enable_collectd: "no" #enable_cyborg: "no"