Update devstack-plugin-vmax to reflect VMAX to PowerMax rebrand
Update the devstack script to point to the correct PowerMax drivers and to leverage the new PowerMax tags in cinder.conf merged in https://review.openstack.org/#/c/620659. Will change the name of the git repo at a later date. Change-Id: I0139e1ffd04ac7eb33021cd276e5b27379da79d0
This commit is contained in:
parent
cd3b97978c
commit
971503c6a3
32
README.md
32
README.md
@ -1,5 +1,5 @@
|
|||||||
# devstack-plugin-vmax
|
# devstack-plugin-vmax
|
||||||
This plugin enables the VMAX backend for cinder. For each backend, it creates the required xml file, populating said file along with cinder.conf with the appropriate values
|
This plugin enables the POWERMAX backend for cinder. For each backend, it creates the required xml file, populating said file along with cinder.conf with the appropriate values
|
||||||
|
|
||||||
# Enabling in devstack
|
# Enabling in devstack
|
||||||
* Add this repo as an external repository to localrc::
|
* Add this repo as an external repository to localrc::
|
||||||
@ -7,27 +7,27 @@ This plugin enables the VMAX backend for cinder. For each backend, it creates th
|
|||||||
[[local|localrc]]</br>
|
[[local|localrc]]</br>
|
||||||
enable_plugin devstack-plugin-vmax https://github.com/openstack/devstack-plugin-vmax
|
enable_plugin devstack-plugin-vmax https://github.com/openstack/devstack-plugin-vmax
|
||||||
|
|
||||||
* For each vmax cinder backend to be used in the devstack setup, add the
|
* For each powermax cinder backend to be used in the devstack setup, add the
|
||||||
backend name to the enabled backends in localrc as shown below. Backend name
|
backend name to the enabled backends in localrc as shown below. Backend name
|
||||||
has to start with VMAX::
|
has to start with POWERMAX::
|
||||||
|
|
||||||
[[local|localrc]]</br>
|
[[local|localrc]]</br>
|
||||||
CINDER_ENABLED_BACKENDS=vmax:VMAX_Backend_1,vmax:VMAX_Backend_2
|
CINDER_ENABLED_BACKENDS=powermax:POWERMAX_Backend_1,powermax:POWERMAX_Backend_2
|
||||||
|
|
||||||
* For each vmax backend in CINDER_ENABLED_BACKENDS above, append the
|
* For each vmax backend in CINDER_ENABLED_BACKENDS above, append the
|
||||||
configuration details to localrc as shown below for VMAX_Backend_1. Contact
|
configuration details to localrc as shown below for POWERMAX_Backend_1. Contact
|
||||||
your Storage Admin for your parameters::
|
your Storage Admin for your parameters::
|
||||||
|
|
||||||
VMAX_Backend_1_RestServerIp=<insert_ip_address></br>
|
POWERMAX_Backend_1_RestServerIp=<insert_ip_address></br>
|
||||||
VMAX_Backend_1_RestServerPort=<Rest_port_number></br>
|
POWERMAX_Backend_1_RestServerPort=<Rest_port_number></br>
|
||||||
VMAX_Backend_1_RestUserName=<Rest_password></br>
|
POWERMAX_Backend_1_RestUserName=<Rest_password></br>
|
||||||
VMAX_Backend_1_Array=<Array_to_use></br>
|
POWERMAX_Backend_1_Array=<Array_to_use></br>
|
||||||
VMAX_Backend_1_SRP=<storage_resource_pool></br>
|
POWERMAX_Backend_1_SRP=<storage_resource_pool></br>
|
||||||
VMAX_Backend_1_WORKLOAD=<work_load></br>
|
POWERMAX_Backend_1_WORKLOAD=<work_load></br>
|
||||||
VMAX_Backend_1_SLO=<Service_level></br>
|
POWERMAX_Backend_1_SLO=<Service_level></br>
|
||||||
VMAX_Backend_1_SSLVerify=<pem_file_for_ssl_verification></br>
|
POWERMAX_Backend_1_SSLVerify=<pem_file_for_ssl_verification></br>
|
||||||
VMAX_Backend_1_PortGroup1=<port_group></br>
|
POWERMAX_Backend_1_PortGroup1=<port_group></br>
|
||||||
VMAX_Backend_1_PortGroup2=<port_group></br>
|
POWERMAX_Backend_1_PortGroup2=<port_group></br>
|
||||||
VMAX_Backend_1_StorageProtocol=<Storage_protocol>
|
POWERMAX_Backend_1_StorageProtocol=<Storage_protocol>
|
||||||
|
|
||||||
* run "stack.sh"
|
* run "stack.sh"
|
@ -1,28 +1,28 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# devstack/plugin.sh
|
# devstack/plugin.sh
|
||||||
# Setup VMAX as backend for Devstack
|
# Setup PowerMax as backend for Devstack
|
||||||
|
|
||||||
function update_volume_type {
|
function update_volume_type {
|
||||||
# Update volume types
|
# Update volume types
|
||||||
for be in ${CINDER_ENABLED_BACKENDS//,/ }; do
|
for be in ${CINDER_ENABLED_BACKENDS//,/ }; do
|
||||||
be_name=${be##*:}
|
be_name=${be##*:}
|
||||||
be_type=${be%%:*}
|
be_type=${be%%:*}
|
||||||
if [[ ${be_type} == "vmax" ]]; then
|
if [[ ${be_type} == "powermax" ]]; then
|
||||||
array="${be_name}_Array"
|
array="${be_name}_Array"
|
||||||
srp="${be_name}_SRP"
|
srp="${be_name}_SRP"
|
||||||
slo="None"
|
slo="None"
|
||||||
workload="None"
|
workload="None"
|
||||||
pool_name=${!srp}+${!array}
|
pool_name=${!srp}+${!array}
|
||||||
vmax_temp="${be_name}_WORKLOAD"
|
powermax_temp="${be_name}_WORKLOAD"
|
||||||
if [ -n "${!vmax_temp}" ]; then
|
if [ -n "${!powermax_temp}" ]; then
|
||||||
workload="${be_name}_WORKLOAD"
|
workload="${be_name}_WORKLOAD"
|
||||||
pool_name=${!workload}+${pool_name}
|
pool_name=${!workload}+${pool_name}
|
||||||
else
|
else
|
||||||
pool_name=${workload}+${pool_name}
|
pool_name=${workload}+${pool_name}
|
||||||
fi
|
fi
|
||||||
vmax_temp="${be_name}_SLO"
|
powermax_temp="${be_name}_SLO"
|
||||||
if [ -n "${!vmax_temp}" ]; then
|
if [ -n "${!powermax_temp}" ]; then
|
||||||
slo="${be_name}_SLO"
|
slo="${be_name}_SLO"
|
||||||
pool_name=${!slo}+${pool_name}
|
pool_name=${!slo}+${pool_name}
|
||||||
else
|
else
|
||||||
@ -36,10 +36,10 @@ function update_volume_type {
|
|||||||
|
|
||||||
function configure_port_groups {
|
function configure_port_groups {
|
||||||
local be_name=$1
|
local be_name=$1
|
||||||
vmax_temp="${be_name}_PortGroup"
|
powermax_temp="${be_name}_PortGroup"
|
||||||
dell_emc_portGroups=0
|
dell_emc_portGroups=0
|
||||||
for i in ${!VMAX*}; do
|
for i in ${!POWERMAX*}; do
|
||||||
temp1=${i##${vmax_temp}}
|
temp1=${i##${powermax_temp}}
|
||||||
if [[ "$temp1" == "$i" ]]; then
|
if [[ "$temp1" == "$i" ]]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
@ -50,14 +50,14 @@ function configure_port_groups {
|
|||||||
done
|
done
|
||||||
pg_list="["
|
pg_list="["
|
||||||
for (( m=1 ; m<=dell_emc_portGroups ; m++ )) ; do
|
for (( m=1 ; m<=dell_emc_portGroups ; m++ )) ; do
|
||||||
vmax_temp="${be_name}_PortGroup${m}"
|
powermax_temp="${be_name}_PortGroup${m}"
|
||||||
pg_list="${pg_list}${!vmax_temp}"
|
pg_list="${pg_list}${!powermax_temp}"
|
||||||
if (( m!=dell_emc_portGroups )) ; then
|
if (( m!=dell_emc_portGroups )) ; then
|
||||||
pg_list="${pg_list},"
|
pg_list="${pg_list},"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
pg_list="${pg_list}]"
|
pg_list="${pg_list}]"
|
||||||
iniset ${CINDER_CONF} ${be_name} vmax_port_groups ${pg_list}
|
iniset ${CINDER_CONF} ${be_name} powermax_port_groups ${pg_list}
|
||||||
}
|
}
|
||||||
|
|
||||||
function configure_single_pool {
|
function configure_single_pool {
|
||||||
@ -65,47 +65,47 @@ function configure_single_pool {
|
|||||||
configure_port_groups ${be_name}
|
configure_port_groups ${be_name}
|
||||||
for val in "SSLVerify" "Array" "SRP" "RestPassword" "RestUserName"\
|
for val in "SSLVerify" "Array" "SRP" "RestPassword" "RestUserName"\
|
||||||
"RestServerPort" "RestServerIp" ; do
|
"RestServerPort" "RestServerIp" ; do
|
||||||
vmax_temp="${be_name}_${val}"
|
powermax_temp="${be_name}_${val}"
|
||||||
if [ -n "${!vmax_temp}" ]; then
|
if [ -n "${!powermax_temp}" ]; then
|
||||||
if [[ "${val}" == "RestServerIp" ]]; then
|
if [[ "${val}" == "RestServerIp" ]]; then
|
||||||
iniset ${CINDER_CONF} ${be_name} san_ip ${!vmax_temp}
|
iniset ${CINDER_CONF} ${be_name} san_ip ${!powermax_temp}
|
||||||
elif [[ "${val}" == "RestServerPort" ]]; then
|
elif [[ "${val}" == "RestServerPort" ]]; then
|
||||||
iniset ${CINDER_CONF} ${be_name} san_rest_port ${!vmax_temp}
|
iniset ${CINDER_CONF} ${be_name} san_rest_port ${!powermax_temp}
|
||||||
elif [[ "${val}" == "RestUserName" ]]; then
|
elif [[ "${val}" == "RestUserName" ]]; then
|
||||||
iniset ${CINDER_CONF} ${be_name} san_login ${!vmax_temp}
|
iniset ${CINDER_CONF} ${be_name} san_login ${!powermax_temp}
|
||||||
elif [[ "${val}" == "RestPassword" ]]; then
|
elif [[ "${val}" == "RestPassword" ]]; then
|
||||||
iniset ${CINDER_CONF} ${be_name} san_password ${!vmax_temp}
|
iniset ${CINDER_CONF} ${be_name} san_password ${!powermax_temp}
|
||||||
elif [[ "${val}" == "Array" ]]; then
|
elif [[ "${val}" == "Array" ]]; then
|
||||||
iniset ${CINDER_CONF} ${be_name} vmax_array ${!vmax_temp}
|
iniset ${CINDER_CONF} ${be_name} powermax_array ${!powermax_temp}
|
||||||
elif [[ "${val}" == "SRP" ]]; then
|
elif [[ "${val}" == "SRP" ]]; then
|
||||||
iniset ${CINDER_CONF} ${be_name} vmax_srp ${!vmax_temp}
|
iniset ${CINDER_CONF} ${be_name} powermax_srp ${!powermax_temp}
|
||||||
elif [[ "${val}" == "SSLVerify" ]]; then
|
elif [[ "${val}" == "SSLVerify" ]]; then
|
||||||
if [[ "${!vmax_temp}" != "False" ]]; then
|
if [[ "${!powermax_temp}" != "False" ]]; then
|
||||||
iniset ${CINDER_CONF} ${be_name} driver_ssl_cert_verify \
|
iniset ${CINDER_CONF} ${be_name} driver_ssl_cert_verify \
|
||||||
True
|
True
|
||||||
iniset ${CINDER_CONF} ${be_name} driver_ssl_cert_path \
|
iniset ${CINDER_CONF} ${be_name} driver_ssl_cert_path \
|
||||||
${!vmax_temp}
|
${!powermax_temp}
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
function configure_cinder_backend_vmax {
|
function configure_cinder_backend_powermax {
|
||||||
local be_name=$1
|
local be_name=$1
|
||||||
local emc_multi=${be_name%%_*}
|
local emc_multi=${be_name%%_*}
|
||||||
|
|
||||||
configure_single_pool ${be_name}
|
configure_single_pool ${be_name}
|
||||||
|
|
||||||
storage_proto="${be_name}_StorageProtocol"
|
storage_proto="${be_name}_StorageProtocol"
|
||||||
vmax_directory="cinder.volume.drivers.dell_emc.vmax."
|
powermax_directory="cinder.volume.drivers.dell_emc.powermax."
|
||||||
if [[ "${!storage_proto}" == "iSCSI" ]]; then
|
if [[ "${!storage_proto}" == "iSCSI" ]]; then
|
||||||
iniset ${CINDER_CONF} ${be_name} volume_driver \
|
iniset ${CINDER_CONF} ${be_name} volume_driver \
|
||||||
"${vmax_directory}iscsi.VMAXISCSIDriver"
|
"${powermax_directory}iscsi.PowerMaxISCSIDriver"
|
||||||
fi
|
fi
|
||||||
if [ "${!storage_proto}" = "FC" ]; then
|
if [ "${!storage_proto}" = "FC" ]; then
|
||||||
iniset ${CINDER_CONF} ${be_name} volume_driver \
|
iniset ${CINDER_CONF} ${be_name} volume_driver \
|
||||||
"${vmax_directory}fc.VMAXFCDriver"
|
"${powermax_directory}fc.PowerMaxFCDriver"
|
||||||
fi
|
fi
|
||||||
iniset ${CINDER_CONF} ${be_name} volume_backend_name ${be_name}
|
iniset ${CINDER_CONF} ${be_name} volume_backend_name ${be_name}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user