diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 2d82639438..f5e293524e 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -260,6 +260,7 @@ enable_central_logging: "no" enable_ceph: "no" enable_ceph_rgw: "no" enable_cinder: "no" +enable_cinder_backend_hnas_iscsi: "no" enable_cinder_backend_iscsi: "no" enable_cinder_backend_lvm: "no" enable_cinder_backend_nfs: "no" diff --git a/ansible/roles/cinder/defaults/main.yml b/ansible/roles/cinder/defaults/main.yml index 757022f02c..7d3dddd644 100644 --- a/ansible/roles/cinder/defaults/main.yml +++ b/ansible/roles/cinder/defaults/main.yml @@ -77,5 +77,20 @@ cinder_backends: - name: "nfs-1" driver: "nfs" enabled: "{{ enable_cinder_backend_nfs | bool }}" + - name: "hnas_iscsi" + driver: "iscsi" + enabled: "{{ enable_cinder_backend_hnas_iscsi | bool }}" cinder_enabled_backends: "{{ cinder_backends|selectattr('enabled', 'equalto', true)|list }}" + + +##################### +# HNAS iscsi backend +##################### +hnas_volume_backend_name: "hnas_iscsi_backend" +hnas_username: +hnas_password: +hnas_mgmt_ip0: +hnas_svc0_volume_type: +hnas_svc0_hdp: +hnas_svc0_iscsi_ip: diff --git a/ansible/roles/cinder/templates/cinder.conf.j2 b/ansible/roles/cinder/templates/cinder.conf.j2 index 5e714e7fda..fb41803d67 100644 --- a/ansible/roles/cinder/templates/cinder.conf.j2 +++ b/ansible/roles/cinder/templates/cinder.conf.j2 @@ -122,5 +122,19 @@ volume_backend_name = nfs-1 nfs_shares_config = /etc/cinder/nfs_shares {% endif %} +{% if enable_cinder_backend_hnas_iscsi | bool %} +[hnas-iscsi] +volume_driver = cinder.volume.drivers.hitachi.hnas_iscsi.HNASISCSIDriver +volume_backend_name = {{ hnas_volume_backend_name }} +hnas_username = {{ hnas_username }} +hnas_password = {{ hnas_password }} +hnas_mgmt_ip0 = {{ hnas_mgmt_ip0 }} +hnas_chap_enabled = True + +hnas_svc0_volume_type = {{ hnas_svc0_volume_type }} +hnas_svc0_hdp = {{ hnas_svc0_hdp }} +hnas_svc0_iscsi_ip = {{ hnas_svc0_iscsi_ip }} +{% endif %} + [privsep_entrypoint] helper_command=sudo cinder-rootwrap /etc/cinder/rootwrap.conf privsep-helper --config-file /etc/cinder/cinder.conf diff --git a/etc/kolla/globals.yml b/etc/kolla/globals.yml index 5d150f4384..bcee284927 100644 --- a/etc/kolla/globals.yml +++ b/etc/kolla/globals.yml @@ -123,6 +123,7 @@ kolla_internal_vip_address: "10.10.10.254" #enable_ceph: "no" #enable_ceph_rgw: "no" #enable_cinder: "no" +#enable_cinder_backend_hnas_iscsi: "no" #enable_cinder_backend_iscsi: "no" #enable_cinder_backend_lvm: "no" #enable_cinder_backend_nfs: "no" @@ -220,6 +221,7 @@ kolla_internal_vip_address: "10.10.10.254" #cinder_backup_share: "" #cinder_backup_mount_options_nfs: "" + ######################### # Nova - Compute Options #########################