Unify the Manila HA and non-HA docker configurations
Relocate the list of docker volumes and environment used by the ManilaShare service so that a common list can be used in both HA and non-HA deployments. For HA, the list is passed to puppet-tripleo via hiera data. Closes-Bug: #1749752 Depends-On: Ia81602f8a3454fcb0be2eaa9126021331d37b147 Change-Id: I66a76d3226d5a1d3e0b5387326305d1f3313a340
This commit is contained in:
parent
43154d8a47
commit
27548d4145
77
docker/services/manila-common.yaml
Normal file
77
docker/services/manila-common.yaml
Normal file
@ -0,0 +1,77 @@
|
||||
heat_template_version: rocky
|
||||
|
||||
description: >
|
||||
Provides the list of Docker volumes and environment to be used by the
|
||||
ManilaShare service. The same list is used for HA and non-HA deployments.
|
||||
|
||||
parameters:
|
||||
EndpointMap:
|
||||
default: {}
|
||||
description: Mapping of service endpoint -> protocol. Typically set
|
||||
via parameter_defaults in the resource registry.
|
||||
type: json
|
||||
ServiceData:
|
||||
default: {}
|
||||
description: Dictionary packing service data
|
||||
type: json
|
||||
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
|
||||
RoleName:
|
||||
default: ''
|
||||
description: Role name on which the service is applied
|
||||
type: string
|
||||
RoleParameters:
|
||||
default: {}
|
||||
description: Parameters specific to the role
|
||||
type: json
|
||||
ManilaCephFSCephFSProtocolHelperType:
|
||||
default: CEPHFS
|
||||
description: Protocol type ('CEPHFS' or 'NFS') when cephfs back end
|
||||
is enabled. Set via manila cephfs environment files.
|
||||
type: string
|
||||
constraints:
|
||||
- allowed_values: ['CEPHFS', 'NFS']
|
||||
|
||||
conditions:
|
||||
|
||||
cephfs_nfs_enabled: {equals: [{get_param: ManilaCephFSCephFSProtocolHelperType}, 'NFS']}
|
||||
|
||||
resources:
|
||||
|
||||
ContainersCommon:
|
||||
type: ./containers-common.yaml
|
||||
|
||||
outputs:
|
||||
manila_share_volumes:
|
||||
description: Volumes for the manila-share container (HA or non-HA)
|
||||
value:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
-
|
||||
- /var/lib/kolla/config_files/manila_share.json:/var/lib/kolla/config_files/config.json:ro
|
||||
- /var/lib/config-data/puppet-generated/manila/:/var/lib/kolla/config_files/src:ro
|
||||
- /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
|
||||
- /dev/:/dev/
|
||||
- /run/:/run/
|
||||
- /sys:/sys
|
||||
- /lib/modules:/lib/modules:ro
|
||||
- /var/lib/manila:/var/lib/manila
|
||||
- /var/log/containers/manila:/var/log/manila
|
||||
- if:
|
||||
- cephfs_nfs_enabled
|
||||
-
|
||||
- /etc/ganesha:/etc/ganesha
|
||||
- /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket
|
||||
- null
|
||||
|
||||
manila_share_environment:
|
||||
description: Docker environment for the manila-share container (HA or non-HA)
|
||||
value:
|
||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
@ -67,6 +67,9 @@ resources:
|
||||
RoleName: {get_param: RoleName}
|
||||
RoleParameters: {get_param: RoleParameters}
|
||||
|
||||
ManilaCommon:
|
||||
type: ./manila-common.yaml
|
||||
|
||||
outputs:
|
||||
role_data:
|
||||
description: Role data for the Manila Share role.
|
||||
@ -116,16 +119,8 @@ outputs:
|
||||
image: &manila_share_image {get_param: DockerManilaShareImage}
|
||||
net: host
|
||||
restart: always
|
||||
volumes:
|
||||
list_concat:
|
||||
- {get_attr: [ContainersCommon, volumes]}
|
||||
-
|
||||
- /var/lib/kolla/config_files/manila_share.json:/var/lib/kolla/config_files/config.json:ro
|
||||
- /var/lib/config-data/puppet-generated/manila/:/var/lib/kolla/config_files/src:ro
|
||||
- /var/log/containers/manila:/var/log/manila
|
||||
- /etc/ceph:/var/lib/kolla/config_files/src-ceph:ro
|
||||
environment:
|
||||
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
|
||||
volumes: {get_attr: [ManilaCommon, manila_share_volumes]}
|
||||
environment: {get_attr: [ManilaCommon, manila_share_environment]}
|
||||
host_prep_tasks:
|
||||
- name: create persistent directories
|
||||
file:
|
||||
|
@ -73,6 +73,9 @@ resources:
|
||||
RoleName: {get_param: RoleName}
|
||||
RoleParameters: {get_param: RoleParameters}
|
||||
|
||||
ManilaCommon:
|
||||
type: ../manila-common.yaml
|
||||
|
||||
outputs:
|
||||
role_data:
|
||||
description: Role data for the Manila Share role.
|
||||
@ -88,6 +91,8 @@ outputs:
|
||||
data: {get_param: DockerManilaShareImage}
|
||||
expression: $.data.rightSplit(separator => ":", maxSplits => 1)[0]
|
||||
- 'pcmklatest'
|
||||
tripleo::profile::pacemaker::manila::share_bundle::docker_volumes: {get_attr: [ManilaCommon, manila_share_volumes]}
|
||||
tripleo::profile::pacemaker::manila::share_bundle::docker_environment: {get_attr: [ManilaCommon, manila_share_environment]}
|
||||
manila::share::manage_service: false
|
||||
manila::share::enabled: false
|
||||
manila::host: hostgroup
|
||||
|
@ -57,7 +57,11 @@ parameters:
|
||||
default: false
|
||||
ManilaCephFSCephFSProtocolHelperType:
|
||||
default: CEPHFS
|
||||
description: Protocol type ('CEPHFS' or 'NFS') when cephfs back end
|
||||
is enabled. Set via manila cephfs environment files.
|
||||
type: string
|
||||
constraints:
|
||||
- allowed_values: ['CEPHFS', 'NFS']
|
||||
# (jprovazn) default value is set to assure this templates works with an
|
||||
# external ceph too (user/key is created only when ceph is deployed by
|
||||
# TripleO)
|
||||
|
Loading…
x
Reference in New Issue
Block a user