diff --git a/docs/packstack.rst b/docs/packstack.rst index 4538fdd39..70fcb8121 100644 --- a/docs/packstack.rst +++ b/docs/packstack.rst @@ -491,7 +491,7 @@ Cinder Config parameters Password to use for the Block Storage service to authenticate with the Identity service. **CONFIG_CINDER_BACKEND** - Storage backend to use for the Block Storage service; valid options are: lvm, gluster, nfs, vmdk, netapp. ['lvm', 'gluster', 'nfs', 'vmdk', 'netapp'] + Storage backend to use for the Block Storage service; valid options are: lvm, gluster, nfs, vmdk, netapp, solidfire. ['lvm', 'gluster', 'nfs', 'vmdk', 'netapp', 'solidfire'] Cinder volume create Config parameters -------------------------------------- @@ -605,6 +605,18 @@ Cinder NetApp E-Series configuration **CONFIG_CINDER_NETAPP_STORAGE_POOLS** Restricts provisioning to the specified storage pools. Only dynamic disk pools are currently supported. The value must be a comma-separated list of disk pool names to be used for provisioning. Defaults to ''. +Cinder SolidFire configuration +------------------------------ + +**CONFIG_CINDER_SOLIDFIRE_LOGIN** + Cluster admin account name used to access the SolidFire storage system. + +**CONFIG_CINDER_SOLIDFIRE_PASSWORD** + Password for the SolidFire cluster admin user account specified in the CONFIG_CINDER_SOLIDFIRE_LOGIN parameter. + +**CONFIG_CINDER_SOLIDFIRE_HOSTNAME** + Hostname (or IP address) for the SolidFire storage system's MVIP. + Manila Config parameters ------------------------ diff --git a/packstack/plugins/cinder_250.py b/packstack/plugins/cinder_250.py index 61e5474ba..8239d4aef 100644 --- a/packstack/plugins/cinder_250.py +++ b/packstack/plugins/cinder_250.py @@ -89,7 +89,8 @@ def initConfig(controller): {"CMD_OPTION": "cinder-backend", "PROMPT": "Enter the Cinder backend to be configured", - "OPTION_LIST": ["lvm", "gluster", "nfs", "vmdk", "netapp"], + "OPTION_LIST": ["lvm", "gluster", "nfs", "vmdk", "netapp", + "solidfire"], "VALIDATORS": [validators.validate_options], "DEFAULT_VALUE": "lvm", "MASK_INPUT": False, @@ -445,6 +446,45 @@ def initConfig(controller): "USE_DEFAULT": True, "NEED_CONFIRM": False, "CONDITION": False}, + ], + + "CINDERSOLIDFIRE": [ + {"CMD_OPTION": "cinder-solidfire-login", + "PROMPT": ("Enter the cluster admin login"), + "OPTION_LIST": [""], + "VALIDATORS": [validators.validate_not_empty], + "PROCESSORS": [], + "DEFAULT_VALUE": "", + "MASK_INPUT": False, + "LOOSE_VALIDATION": False, + "CONF_NAME": "CONFIG_CINDER_SOLIDFIRE_LOGIN", + "USE_DEFAULT": False, + "NEED_CONFIRM": False, + "CONDITION": False}, + {"CMD_OPTION": "cinder-solidfire-password", + "PROMPT": ("Enter cluster admin password"), + "OPTION_LIST": [""], + "VALIDATORS": [validators.validate_not_empty], + "PROCESSORS": [], + "DEFAULT_VALUE": "", + "MASK_INPUT": True, + "LOOSE_VALIDATION": False, + "CONF_NAME": "CONFIG_CINDER_SOLIDFIRE_PASSWORD", + "USE_DEFAULT": False, + "NEED_CONFIRM": True, + "CONDITION": False}, + {"CMD_OPTION": "cinder-solidfire-hostname", + "PROMPT": ("Enter a SolidFire hostname or IP"), + "OPTION_LIST": [], + "VALIDATORS": [validators.validate_not_empty], + "PROCESSORS": [processors.process_add_quotes_around_values], + "DEFAULT_VALUE": "", + "MASK_INPUT": False, + "LOOSE_VALIDATION": False, + "CONF_NAME": "CONFIG_CINDER_SOLIDFIRE_HOSTNAME", + "USE_DEFAULT": False, + "NEED_CONFIRM": False, + "CONDITION": False}, ] } update_params_usage(basedefs.PACKSTACK_DOC, conf_params) @@ -532,6 +572,13 @@ def initConfig(controller): "PRE_CONDITION": check_netapp_eseries_options, "PRE_CONDITION_MATCH": True, "POST_CONDITION": False, + "POST_CONDITION_MATCH": True}, + + {"GROUP_NAME": "CINDERSOLIDFIRE", + "DESCRIPTION": "Cinder SolidFire configuration", + "PRE_CONDITION": check_solidfire_options, + "PRE_CONDITION_MATCH": True, + "POST_CONDITION": False, "POST_CONDITION_MATCH": True} ] for group in conf_groups: @@ -634,6 +681,11 @@ def check_netapp_eseries_options(config): config['CONFIG_CINDER_NETAPP_STORAGE_FAMILY'] == "eseries") +def check_solidfire_options(config): + return (config['CONFIG_CINDER_INSTALL'] == 'y' and + 'solidfire' in config['CONFIG_CINDER_BACKEND']) + + # -------------------------- step functions -------------------------- def check_cinder_vg(config, messages): diff --git a/packstack/puppet/templates/cinder_solidfire.pp b/packstack/puppet/templates/cinder_solidfire.pp new file mode 100644 index 000000000..a8adbf586 --- /dev/null +++ b/packstack/puppet/templates/cinder_solidfire.pp @@ -0,0 +1,18 @@ +# Copyright (c) – 2016, Edward Balduf. All rights reserved. + +$solidfire_backend_name = 'solidfire' + +cinder::backend::solidfire { $solidfire_backend_name : + san_ip => hiera('CONFIG_CINDER_SOLIDFIRE_LOGIN'), + san_login => hiera('CONFIG_CINDER_SOLIDFIRE_PASSWORD'), + san_password => hiera('CONFIG_CINDER_SOLIDFIRE_HOSTNAME'), + volume_backend_name => $solidfire_backend_name, +} + +package { 'iscsi-initiator-utils': ensure => present } + +cinder::type { $solidfire_backend_name: + set_key => 'volume_backend_name', + set_value => $solidfire_backend_name, + require => Class['cinder::api'], +} diff --git a/releasenotes/notes/add_cinder_solidfire-9b62f78b86a52a09.yaml b/releasenotes/notes/add_cinder_solidfire-9b62f78b86a52a09.yaml new file mode 100644 index 000000000..f14d95e1b --- /dev/null +++ b/releasenotes/notes/add_cinder_solidfire-9b62f78b86a52a09.yaml @@ -0,0 +1,9 @@ +--- +features: + - | + Added basic support for SolidFire storage as a backend to Cinder. + The following 3 config options have been added: + + * CONFIG_CINDER_SOLIDFIRE_LOGIN - SolidFire cluster admin name. + * CONFIG_CINDER_SOLIDFIRE_PASSWORD - SolidFire cluster admin password. + * CONFIG_CINDER_SOLIDFIRE_HOSTNAME - SolidFire MVIP hostname or IP.