Support deploying multiple Cinder Pure Storage backends

CinderPureBackendName is enhanced to support a list of backend names,
and a new CinderPureMultiConfig parameter provides a way to specify
parameter values for each backend. For example:

parameter_defaults:
  CinderEnableIscsiBackend: false
  CinderEnablePureBackend: true
  CinderPureBackendName:
    - tripleo_pure_1
    - tripleo_pure_2
  # These will be the default parameter values for each backend.
  CinderPureStorageProtocol: 'iSCSI'
  CinderPureUseChap: false
  CinderPureMultipathXfer: true
  CinderPureImageCache: true
  # Use CinderPureMultiConfig to override values in specific backends.
  CinderPureMultiConfig:
    tripleo_pure_1:
      CinderPureSanIp: '10.0.0.1'
      CinderPureAPIToken: 'secret'
    tripleo_pure_2:
      CinderPureSanIp: '10.0.0.2'
      CinderPureAPIToken: 'anothersecret'
      # This will take precedence over the default value.
      CinderPureUseChap: true

Co-Authored-By: Alan Bishop <abishop@redhat.com>
Depends-On: Ia7cc82f5eb4e228a43e47624d87e319ac5340268
Change-Id: I1083ef9893dede234b4cafd9888c898fa0e31077
This commit is contained in:
Emilien Macchi 2019-09-09 18:39:22 -04:00 committed by Alan Bishop
parent d5844628c1
commit 91e8ed328a
3 changed files with 34 additions and 1 deletions

View File

@ -47,8 +47,16 @@ parameters:
type: boolean
default: true
CinderPureBackendName:
type: string
type: comma_delimited_list
default: 'tripleo_pure'
description: A list of Cinder Pure Storage backend names.
CinderPureMultiConfig:
type: json
default: {}
description: >
Dictionary of settings when configuring multiple Pure backends. The
hash key is the backend name, and the value is a dictionary of parameter
values unique to that backend.
CinderPureAvailabilityZone:
default: ''
description: >
@ -81,6 +89,7 @@ outputs:
map_merge:
- tripleo::profile::base::cinder::volume::cinder_enable_pure_backend: {get_param: CinderEnablePureBackend}
cinder::backend::pure::volume_backend_name: {get_param: CinderPureBackendName}
cinder::backend::pure::volume_multi_config: {get_param: CinderPureMultiConfig}
cinder::backend::pure::pure_storage_protocol: {get_param: CinderPureStorageProtocol}
cinder::backend::pure::san_ip: {get_param: CinderPureSanIp}
cinder::backend::pure::pure_api_token: {get_param: CinderPureAPIToken}

View File

@ -7,9 +7,26 @@ parameter_defaults:
CinderEnableIscsiBackend: false
CinderEnablePureBackend: true
CinderPureBackendName: 'tripleo_pure'
CinderPureMultiConfig: {}
CinderPureAvailabilityZone: ''
CinderPureStorageProtocol: 'iSCSI'
CinderPureSanIp: ''
CinderPureAPIToken: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
CinderPureUseChap: false
CinderPureMultipathXfer: true
CinderPureImageCache: true
# To configure multiple Pure backends, use CinderPureMultiConfig to
# assign parameter values specific to that backend. For example:
# CinderPureBackendName:
# - tripleo_pure_1
# - tripleo_pure_2
# CinderPureUseChap: false # Default value for the Pure backends
# CinderPureMultiConfig:
# tripleo_pure_1:
# CinderPureSanIp: '10.0.0.1'
# CinderPureAPIToken: 'secret'
# tripleo_pure_2:
# CinderPureSanIp: '10.0.0.2'
# CinderPureAPIToken: 'anothersecret'
# CinderPureUseChap: true # Specific value for this backend

View File

@ -0,0 +1,7 @@
---
features:
- |
Support deploying multiple Cinder Pure Storage backends.
CinderPureBackendName is enhanced to support a list of backend names, and
a new CinderPureMultiConfig parameter provides a way to specify parameter
values for each backend.