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