Adds network/cidr mapping into a new service property
[apex-tripleo-heat-templates.git] / docker / services / pacemaker / clustercheck.yaml
1 heat_template_version: pike
2
3 description: >
4   MySQL HA clustercheck service deployment using puppet
5   This service is used by HAProxy in a HA scenario to report whether
6   the local galera node is synced
7
8 parameters:
9   DockerNamespace:
10     description: namespace
11     default: 'tripleoupstream'
12     type: string
13   DockerClustercheckImage:
14     description: image
15     default: 'centos-binary-mariadb:latest'
16     type: string
17   DockerClustercheckConfigImage:
18     description: The container image to use for the clustercheck config_volume
19     default: 'centos-binary-mariadb:latest'
20     type: string
21   EndpointMap:
22     default: {}
23     description: Mapping of service endpoint -> protocol. Typically set
24                  via parameter_defaults in the resource registry.
25     type: json
26   ServiceData:
27     default: {}
28     description: Dictionary packing service data
29     type: json
30   ServiceNetMap:
31     default: {}
32     description: Mapping of service_name -> network name. Typically set
33                  via parameter_defaults in the resource registry.  This
34                  mapping overrides those in ServiceNetMapDefaults.
35     type: json
36   DefaultPasswords:
37     default: {}
38     type: json
39   RoleName:
40     default: ''
41     description: Role name on which the service is applied
42     type: string
43   RoleParameters:
44     default: {}
45     description: Parameters specific to the role
46     type: json
47
48 resources:
49
50   ContainersCommon:
51     type: ../containers-common.yaml
52
53   MysqlPuppetBase:
54     type: ../../../puppet/services/pacemaker/database/mysql.yaml
55     properties:
56       EndpointMap: {get_param: EndpointMap}
57       ServiceData: {get_param: ServiceData}
58       ServiceNetMap: {get_param: ServiceNetMap}
59       DefaultPasswords: {get_param: DefaultPasswords}
60       RoleName: {get_param: RoleName}
61       RoleParameters: {get_param: RoleParameters}
62
63 outputs:
64   role_data:
65     description: Containerized service clustercheck using composable services.
66     value:
67       service_name: clustercheck
68       config_settings: {get_attr: [MysqlPuppetBase, role_data, config_settings]}
69       step_config: "include ::tripleo::profile::pacemaker::clustercheck"
70       # BEGIN DOCKER SETTINGS #
71       puppet_config:
72         config_volume: clustercheck
73         puppet_tags: file # set this even though file is the default
74         step_config: "include ::tripleo::profile::pacemaker::clustercheck"
75         config_image:
76           list_join:
77             - '/'
78             - [ {get_param: DockerNamespace}, {get_param: DockerClustercheckConfigImage} ]
79       kolla_config:
80         /var/lib/kolla/config_files/clustercheck.json:
81           command: /usr/sbin/xinetd -dontfork
82           config_files:
83             - source: "/var/lib/kolla/config_files/src/*"
84               dest: "/"
85               merge: true
86               preserve_properties: true
87       docker_config:
88         step_2:
89           clustercheck:
90             start_order: 1
91             image:
92               list_join:
93                 - '/'
94                 - [ {get_param: DockerNamespace}, {get_param: DockerClustercheckImage} ]
95             restart: always
96             net: host
97             volumes:
98               list_concat:
99                 - {get_attr: [ContainersCommon, volumes]}
100                 -
101                   - /var/lib/kolla/config_files/clustercheck.json:/var/lib/kolla/config_files/config.json
102                   - /var/lib/config-data/puppet-generated/clustercheck/:/var/lib/kolla/config_files/src:ro
103                   - /var/lib/mysql:/var/lib/mysql
104             environment:
105               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
106       host_prep_tasks:
107       upgrade_tasks: