Browse Source

Add NetApp Manila driver integration and tidy up generic

Enables configuring a NetApp backend for the Manila service
This was created based on the review at
https://review.openstack.org/#/c/188138/

This makes the netapp and generic backends disabled by default
in the services/manila-backend-*.yaml. A backend is then
enabled via backend-specific environment files, which will set
any config parameters and enable that backend.

It is expected that multiple manila backend specific environment
files might be specified simultaneously.

Finally generic and manila config is split into separate
service files rather than using manila-base for all the things.

Co-Authored-By: Ryan Hefner <rhefner@redhat.com>
Co-Authored-By: Ben Swartzlander <ben@swartzlander.org>
Closes-Bug: 1618479
Depends-On: Ic6f8e8d27ca20b9badddea5d16550aa18bff8418
Change-Id: I35fce32d0f6a5cc1c3382c2d0e0d6028928fd943
changes/19/354019/17
marios 6 years ago
parent
commit
98b4776747
  1. 13
      environments/manila-generic-config.yaml
  2. 30
      environments/manila-netapp-config.yaml
  3. 2
      overcloud-resource-registry-puppet.yaml
  4. 93
      puppet/services/manila-backend-generic.yaml
  5. 112
      puppet/services/manila-backend-netapp.yaml
  6. 66
      puppet/services/manila-base.yaml
  7. 2
      roles_data.yaml

13
environments/manila-generic-config.yaml

@ -1,13 +1,16 @@
# A Heat environment file which can be used to enable a
# a Manila generic driver backend.
# This environment file enables Manila with the Generic backend.
resource_registry:
OS::Tripleo::Services::ManilaApi: ../puppet/services/manila-api.yaml
OS::Tripleo::Services::ManilaScheduler: ../puppet/services/manila-scheduler.yaml
# Only manila-share is pacemaker managed:
OS::Tripleo::Services::ManilaShare: ../puppet/services/pacemaker/manila-share.yaml
OS::Tripleo::Services::ManilaBackendGeneric: ../puppet/services/manila-backend-generic.yaml
parameter_defaults:
ManilaServiceInstanceUser: ''
ManilaServiceInstancePassword: ''
ManilaServiceInstanceFlavorId: 2
ManilaServiceNetworkCidr: '172.16.0.0/16'
ManilaGenericEnableBackend: true
ManilaGenericBackendName: tripleo_generic
ManilaGenericDriverHandlesShareServers: true
@ -20,7 +23,3 @@ parameter_defaults:
ManilaGenericServiceInstanceSmbConfigPath: '$share_mount_path/smb.conf'
ManilaGenericShareVolumeFsType: 'ext4'
ManilaGenericCinderVolumeType: ''
ManilaGenericServiceInstanceUser: ''
ManilaGenericServiceInstancePassword: ''
ManilaGenericServiceInstanceFlavorId: 2
ManilaGenericServiceNetworkCidr: '172.16.0.0/16'

30
environments/manila-netapp-config.yaml

@ -0,0 +1,30 @@
# This environment file enables Manila with the Netapp backend.
resource_registry:
OS::Tripleo::Services::ManilaApi: ../puppet/services/manila-api.yaml
OS::Tripleo::Services::ManilaScheduler: ../puppet/services/manila-scheduler.yaml
# Only manila-share is pacemaker managed:
OS::Tripleo::Services::ManilaShare: ../puppet/services/pacemaker/manila-share.yaml
OS::Tripleo::Services::ManilaBackendNetapp: ../puppet/services/manila-backend-netapp.yaml
parameter_defaults:
ManilaNetappEnableBackend: true
ManilaNetappBackendName: tripleo_netapp
ManilaNetappDriverHandlesShareServers: true
ManilaNetappLogin: ''
ManilaNetappPassword: ''
ManilaNetappServerHostname: ''
ManilaNetappTransportType: 'http'
ManilaNetappStorageFamily: 'ontap_cluster'
ManilaNetappServerPort: 80
ManilaNetappVolumeNameTemplate: 'share_%(share_id)s'
ManilaNetappVserver: ''
ManilaNetappVserverNameTemplate: 'os_%s'
ManilaNetappLifNameTemplate: 'os_%(net_allocation_id)s'
ManilaNetappAggrNameSearchPattern: '(.*)'
ManilaNetappRootVolumeAggr: ''
ManilaNetappRootVolume: 'root'
ManilaNetappPortNameSearchPattern: '(.*)'
ManilaNetappTraceFlags: ''
ManilaNetappEnabledShareProtocols: 'nfs3, nfs4.0'
ManilaNetappVolumeSnapshotReservePercent: 5
ManilaNetappSnapmirrorQuiesceTimeout: 3600

2
overcloud-resource-registry-puppet.yaml

@ -214,6 +214,8 @@ resource_registry:
OS::Tripleo::Services::ManilaApi: OS::Heat::None
OS::Tripleo::Services::ManilaScheduler: OS::Heat::None
OS::Tripleo::Services::ManilaShare: OS::Heat::None
OS::Tripleo::Services::ManilaBackendGeneric: OS::Heat::None
OS::Tripleo::Services::ManilaBackendNetapp: OS::Heat::None
OS::TripleO::Services::ComputeNeutronL3Agent: OS::Heat::None
OS::TripleO::Services::ComputeNeutronMetadataAgent: OS::Heat::None
OS::TripleO::Services::AodhApi: puppet/services/aodh-api.yaml

93
puppet/services/manila-backend-generic.yaml

@ -0,0 +1,93 @@
heat_template_version: 2016-04-08
description: >
Openstack Manila generic backend.
parameters:
ManilaGenericEnableBackend:
type: boolean
default: false
ManilaGenericBackendName:
type: string
default: tripleo_generic
ManilaGenericDriverHandlesShareServers:
type: string
default: true
ManilaGenericSmbTemplateConfigPath:
type: string
default: '$state_path/smb.conf'
ManilaGenericVolumeNameTemplate:
type: string
default: 'manila-share-%s'
ManilaGenericVolumeSnapshotNameTemplate:
type: string
default: 'manila-snapshot-%s'
ManilaGenericShareMountPath:
type: string
default: '/shares'
ManilaGenericMaxTimeToCreateVolume:
type: string
default: '180'
ManilaGenericMaxTimeToAttach:
type: string
default: '120'
ManilaGenericServiceInstanceSmbConfigPath:
type: string
default: '$share_mount_path/smb.conf'
ManilaGenericShareVolumeFsType:
type: string
default: 'ext4'
ManilaGenericCinderVolumeType:
type: string
default: ''
ManilaServiceInstanceUser:
type: string
default: ''
ManilaServiceInstancePassword: #SET THIS via parameter_defaults
type: string
hidden: true
ManilaServiceInstanceFlavorId:
type: number
default: 1
ManilaServiceNetworkCidr:
type: string
default: '172.16.0.0/16'
ServiceNetMap:
default: {}
description: Mapping of service_name -> network name. Typically set
via parameter_defaults in the resource registry. This
mapping overrides those in ServiceNetMapDefaults.
type: json
DefaultPasswords:
default: {}
type: json
EndpointMap:
default: {}
type: json
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
outputs:
role_data:
description: Role data for the Manila Generic backend.
value:
service_name: manila_backend_generic
config_settings:
manila_generic_enable_backend: {get_param: ManilaGenericEnableBackend}
manila::backend::generic::title: {get_param: ManilaGenericBackendName}
manila::backend::generic::driver_handles_share_servers: {get_param: ManilaGenericDriverHandlesShareServers}
manila::backend::generic::smb_template_config_path: {get_param: ManilaGenericSmbTemplateConfigPath}
manila::backend::generic::volume_name_template: {get_param: ManilaGenericVolumeNameTemplate}
manila::backend::generic::volume_snapshot_name_template: {get_param: ManilaGenericVolumeSnapshotNameTemplate}
manila::backend::generic::share_mount_path: {get_param: ManilaGenericShareMountPath}
manila::backend::generic::max_time_to_create_volume: {get_param: ManilaGenericMaxTimeToCreateVolume}
manila::backend::generic::max_time_to_attach: {get_param: ManilaGenericMaxTimeToAttach}
manila::backend::generic::service_instance_smb_config_path: {get_param: ManilaGenericServiceInstanceSmbConfigPath}
manila::backend::generic::share_volume_fstype: {get_param: ManilaGenericShareVolumeFsType}
manila::backend::generic::cinder_volume_type: {get_param: ManilaGenericCinderVolumeType}
manila::service_instance::service_instance_user: {get_param: ManilaServiceInstanceUser}
manila::service_instance::service_instance_password: {get_param: ManilaServiceInstancePassword}
manila::service_instance::service_instance_flavor_id: {get_param: ManilaServiceInstanceFlavorId}
manila::service_instance::service_network_cidr: {get_param: ManilaServiceNetworkCidr}
step_config:

112
puppet/services/manila-backend-netapp.yaml

@ -0,0 +1,112 @@
heat_template_version: 2016-04-08
description: >
Openstack Manila netapp backend.
parameters:
ManilaNetappEnableBackend:
type: boolean
default: false
ManilaNetappDriverHandlesShareServers:
type: string
default: true
ManilaNetappBackendName:
type: string
default: tripleo_netapp
ManilaNetappLogin:
type: string
default: ''
ManilaNetappPassword:
type: string
default: ''
ManilaNetappServerHostname:
type: string
default: ''
ManilaNetappTransportType:
type: string
default: 'http'
ManilaNetappStorageFamily:
type: string
default: 'ontap_cluster'
ManilaNetappServerPort:
type: number
default: 80
ManilaNetappVolumeNameTemplate:
type: string
default: 'share_%(share_id)s'
ManilaNetappVserver:
type: string
default: ''
ManilaNetappVserverNameTemplate:
type: string
default: 'os_%s'
ManilaNetappLifNameTemplate:
type: string
default: 'os_%(net_allocation_id)s'
ManilaNetappAggrNameSearchPattern:
type: string
default: '(.*)'
ManilaNetappRootVolumeAggr:
type: string
default: ''
ManilaNetappRootVolume:
type: string
default: 'root'
ManilaNetappPortNameSearchPattern:
type: string
default: '(.*)'
ManilaNetappTraceFlags:
type: string
default: ''
ManilaNetappEnabledShareProtocols:
type: string
default: 'nfs3, nfs4.0'
ManilaNetappVolumeSnapshotReservePercent:
type: number
default: 5
ManilaNetappSnapmirrorQuiesceTimeout:
type: number
default: 3600
ServiceNetMap:
default: {}
description: Mapping of service_name -> network name. Typically set
via parameter_defaults in the resource registry. This
mapping overrides those in ServiceNetMapDefaults.
type: json
DefaultPasswords:
default: {}
type: json
EndpointMap:
default: {}
type: json
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
outputs:
role_data:
description: Role data for the Manila Netapp backend.
value:
service_name: manila_backend_netapp
config_settings:
manila_netapp_enable_backend: {get_param: ManilaNetappEnableBackend}
manila::backend::netapp::title: {get_param: ManilaNetappBackendName}
manila::backend::netapp::netapp_login: {get_param: ManilaNetappLogin}
manila::backend::netapp::driver_handles_share_servers: {get_param: ManilaNetappDriverHandlesShareServers}
manila::backend::netapp::netapp_password: {get_param: ManilaNetappPassword}
manila::backend::netapp::netapp_server_hostname: {get_param: ManilaNetappServerHostname}
manila::backend::netapp::netapp_transport_type: {get_param: ManilaNetappTransportType}
manila::backend::netapp::netapp_storage_family: {get_param: ManilaNetappStorageFamily}
manila::backend::netapp::netapp_server_port: {get_param: ManilaNetappServerPort}
manila::backend::netapp::netapp_volume_name_template: {get_param: ManilaNetappVolumeNameTemplate}
manila::backend::netapp::netapp_vserver: {get_param: ManilaNetappVserver}
manila::backend::netapp::netapp_vserver_name_template: {get_param: ManilaNetappVserverNameTemplate}
manila::backend::netapp::netapp_lif_name_template: {get_param: ManilaNetappLifNameTemplate}
manila::backend::netapp::netapp_aggregate_name_search_pattern: {get_param: ManilaNetappAggrNameSearchPattern}
manila::backend::netapp::netapp_root_volume_aggregate: {get_param: ManilaNetappRootVolumeAggr}
manila::backend::netapp::netapp_root_volume: {get_param: ManilaNetappRootVolume}
manila::backend::netapp::netapp_port_name_search_pattern: {get_param: ManilaNetappPortNameSearchPattern}
manila::backend::netapp::netapp_trace_flags: {get_param: ManilaNetappTraceFlags}
manila::backend::netapp::netapp_enabled_share_protocols: {get_param: ManilaNetappEnabledShareProtocols}
manila::backend::netapp::netapp_volume_snapshot_reserve_percent: {get_param: ManilaNetappVolumeSnapshotReservePercent}
manila::backend::netapp::netapp_snapmirror_quiesce_timeout: {get_param: ManilaNetappSnapmirrorQuiesceTimeout}
step_config:

66
puppet/services/manila-base.yaml

@ -40,55 +40,6 @@ parameters:
default: 5672
description: Set rabbit subscriber port, change this if using SSL
type: number
# Config specific parameters, to be provided via parameter_defaults
ManilaGenericEnableBackend:
type: boolean
default: true
ManilaGenericBackendName:
type: string
default: tripleo_generic
ManilaGenericDriverHandlesShareServers:
type: string
default: true
ManilaGenericSmbTemplateConfigPath:
type: string
default: '$state_path/smb.conf'
ManilaGenericVolumeNameTemplate:
type: string
default: 'manila-share-%s'
ManilaGenericVolumeSnapshotNameTemplate:
type: string
default: 'manila-snapshot-%s'
ManilaGenericShareMountPath:
type: string
default: '/shares'
ManilaGenericMaxTimeToCreateVolume:
type: string
default: '180'
ManilaGenericMaxTimeToAttach:
type: string
default: '120'
ManilaGenericServiceInstanceSmbConfigPath:
type: string
default: '$share_mount_path/smb.conf'
ManilaGenericShareVolumeFsType:
type: string
default: 'ext4'
ManilaGenericCinderVolumeType:
type: string
default: ''
ManilaGenericServiceInstanceUser:
type: string
default: ''
ManilaGenericServiceInstancePassword: #SET THIS via parameter_defaults
type: string
hidden: true
ManilaGenericServiceInstanceFlavorId:
type: number
default: 1
ManilaGenericServiceNetworkCidr:
type: string
default: '172.16.0.0/16'
outputs:
role_data:
@ -106,23 +57,6 @@ outputs:
manila::db::mysql::dbname: manila
manila::db::database_db_max_retries: -1
manila::db::database_max_retries: -1
manila_generic_enable_backend: {get_param: ManilaGenericEnableBackend}
manila::backend::generic::title: {get_param: ManilaGenericBackendName}
manila::backend::generic::driver_handles_share_servers: {get_param: ManilaGenericDriverHandlesShareServers}
manila::backend::generic::smb_template_config_path: {get_param: ManilaGenericSmbTemplateConfigPath}
manila::backend::generic::volume_name_template: {get_param: ManilaGenericVolumeNameTemplate}
manila::backend::generic::volume_snapshot_name_template: {get_param: ManilaGenericVolumeSnapshotNameTemplate}
manila::backend::generic::share_mount_path: {get_param: ManilaGenericShareMountPath}
manila::backend::generic::max_time_to_create_volume: {get_param: ManilaGenericMaxTimeToCreateVolume}
manila::backend::generic::max_time_to_attach: {get_param: ManilaGenericMaxTimeToAttach}
manila::backend::generic::service_instance_smb_config_path: {get_param: ManilaGenericServiceInstanceSmbConfigPath}
manila::backend::generic::share_volume_fstype: {get_param: ManilaGenericShareVolumeFsType}
manila::backend::generic::cinder_volume_type: {get_param: ManilaGenericCinderVolumeType}
manila::service_instance::service_instance_user: {get_param: ManilaGenericServiceInstanceUser}
manila::service_instance::service_instance_password: {get_param: ManilaGenericServiceInstancePassword}
manila::service_instance::service_instance_flavor_id: {get_param: ManilaGenericServiceInstanceFlavorId}
manila::service_instance::service_network_cidr: {get_param: ManilaGenericServiceNetworkCidr}
manila::db::mysql::allowed_hosts:
- '%'
- "%{hiera('mysql_bind_host')}"

2
roles_data.yaml

@ -52,6 +52,8 @@
- OS::TripleO::Services::GnocchiStatsd
- OS::Tripleo::Services::ManilaApi
- OS::Tripleo::Services::ManilaScheduler
- OS::Tripleo::Services::ManilaBackendGeneric
- OS::Tripleo::Services::ManilaBackendNetapp
- OS::Tripleo::Services::ManilaShare
- OS::TripleO::Services::AodhApi
- OS::TripleO::Services::AodhEvaluator

Loading…
Cancel
Save