7e5d25b503fa32c3d38e8acfff2898e25d0fd3b2
[apex-tripleo-heat-templates.git] / puppet / services / pacemaker / haproxy.yaml
1 heat_template_version: ocata
2
3 description: >
4   HAproxy service with Pacemaker configured with Puppet
5
6 parameters:
7   ServiceNetMap:
8     default: {}
9     description: Mapping of service_name -> network name. Typically set
10                  via parameter_defaults in the resource registry.  This
11                  mapping overrides those in ServiceNetMapDefaults.
12     type: json
13   DefaultPasswords:
14     default: {}
15     type: json
16   RoleName:
17     default: ''
18     description: Role name on which the service is applied
19     type: string
20   RoleParameters:
21     default: {}
22     description: Parameters specific to the role
23     type: json
24   EndpointMap:
25     default: {}
26     description: Mapping of service endpoint -> protocol. Typically set
27                  via parameter_defaults in the resource registry.
28     type: json
29
30 resources:
31   LoadbalancerServiceBase:
32     type: ../haproxy.yaml
33     properties:
34       ServiceNetMap: {get_param: ServiceNetMap}
35       DefaultPasswords: {get_param: DefaultPasswords}
36       EndpointMap: {get_param: EndpointMap}
37       RoleName: {get_param: RoleName}
38       RoleParameters: {get_param: RoleParameters}
39
40 outputs:
41   role_data:
42     description: Role data for the HAproxy with pacemaker role.
43     value:
44       service_name: haproxy
45       monitoring_subscription: {get_attr: [LoadbalancerServiceBase, role_data, monitoring_subscription]}
46       config_settings:
47         map_merge:
48           - get_attr: [LoadbalancerServiceBase, role_data, config_settings]
49           - tripleo::haproxy::haproxy_service_manage: false
50             tripleo::haproxy::mysql_clustercheck: true
51       step_config: |
52         include ::tripleo::profile::pacemaker::haproxy
53       metadata_settings:
54         get_attr: [LoadbalancerServiceBase, role_data, metadata_settings]