b5d128d43707969cf00d96ba7c232e8e7eef9add
[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   DockerClustercheckImage:
10     description: image
11     type: string
12   DockerClustercheckConfigImage:
13     description: The container image to use for the clustercheck config_volume
14     type: string
15   EndpointMap:
16     default: {}
17     description: Mapping of service endpoint -> protocol. Typically set
18                  via parameter_defaults in the resource registry.
19     type: json
20   ServiceData:
21     default: {}
22     description: Dictionary packing service data
23     type: json
24   ServiceNetMap:
25     default: {}
26     description: Mapping of service_name -> network name. Typically set
27                  via parameter_defaults in the resource registry.  This
28                  mapping overrides those in ServiceNetMapDefaults.
29     type: json
30   DefaultPasswords:
31     default: {}
32     type: json
33   RoleName:
34     default: ''
35     description: Role name on which the service is applied
36     type: string
37   RoleParameters:
38     default: {}
39     description: Parameters specific to the role
40     type: json
41
42 resources:
43
44   ContainersCommon:
45     type: ../containers-common.yaml
46
47   MysqlPuppetBase:
48     type: ../../../puppet/services/pacemaker/database/mysql.yaml
49     properties:
50       EndpointMap: {get_param: EndpointMap}
51       ServiceData: {get_param: ServiceData}
52       ServiceNetMap: {get_param: ServiceNetMap}
53       DefaultPasswords: {get_param: DefaultPasswords}
54       RoleName: {get_param: RoleName}
55       RoleParameters: {get_param: RoleParameters}
56
57 outputs:
58   role_data:
59     description: Containerized service clustercheck using composable services.
60     value:
61       service_name: clustercheck
62       config_settings: {get_attr: [MysqlPuppetBase, role_data, config_settings]}
63       logging_source: {get_attr: [MysqlPuppetBase, role_data, logging_source]}
64       logging_groups: {get_attr: [MysqlPuppetBase, role_data, logging_groups]}
65       step_config: "include ::tripleo::profile::pacemaker::clustercheck"
66       # BEGIN DOCKER SETTINGS #
67       puppet_config:
68         config_volume: clustercheck
69         puppet_tags: file # set this even though file is the default
70         step_config: "include ::tripleo::profile::pacemaker::clustercheck"
71         config_image: {get_param: DockerClustercheckConfigImage}
72       kolla_config:
73         /var/lib/kolla/config_files/clustercheck.json:
74           command: /usr/sbin/xinetd -dontfork
75           config_files:
76             - source: "/var/lib/kolla/config_files/src/*"
77               dest: "/"
78               merge: true
79               preserve_properties: true
80       docker_config:
81         step_2:
82           clustercheck:
83             start_order: 1
84             image: {get_param: DockerClustercheckImage}
85             restart: always
86             net: host
87             volumes:
88               list_concat:
89                 - {get_attr: [ContainersCommon, volumes]}
90                 -
91                   - /var/lib/kolla/config_files/clustercheck.json:/var/lib/kolla/config_files/config.json
92                   - /var/lib/config-data/puppet-generated/clustercheck/:/var/lib/kolla/config_files/src:ro
93                   - /var/lib/mysql:/var/lib/mysql
94             environment:
95               - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
96       host_prep_tasks:
97       upgrade_tasks:
98       update_tasks:
99         # Nothing: It's not managed by pacemaker, so let paunch do it.