diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 922484c3f607f97a6f36daa9af6da08dbb2588b0..f20bcef4c9ad0d6180591e2f0cf914dc52e7eb23 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -265,6 +265,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 757022f02c8ced96baf391b2237f6e01c9a630d5..7d3dddd644ca3d4168a3d033ff38e8b4484a1814 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 5e714e7fda16a018c84fdcec8f8725ea5f862857..fb41803d674fa9e0bd4219738467daacd0c7dc46 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 b09adb140afbfe4c3a44529e7a62ee98785f4c92..b0c27f1f0f08fcc4b341eec3794e4b6b4d9b0e03 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" @@ -226,6 +227,7 @@ kolla_internal_vip_address: "10.10.10.254" #cinder_backup_share: "" #cinder_backup_mount_options_nfs: "" + ######################### # Nova - Compute Options #########################