Merge "Modify external loadbalancer environments to use new FixedIPs"
[apex-tripleo-heat-templates.git] / puppet / services / pacemaker / database / mysql.yaml
1 heat_template_version: 2016-04-08
2
3 description: >
4   MySQL with Pacemaker service deployment using puppet
5
6 parameters:
7   #Parameters not used EndpointMap
8   ServiceNetMap:
9     default: {}
10     description: Mapping of service_name -> network name. Typically set
11                  via parameter_defaults in the resource registry.  This
12                  mapping overrides those in ServiceNetMapDefaults.
13     type: json
14   DefaultPasswords:
15     default: {}
16     type: json
17   EndpointMap:
18     default: {}
19     description: Mapping of service endpoint -> protocol. Typically set
20                  via parameter_defaults in the resource registry.
21     type: json
22
23 resources:
24
25   MysqlBase:
26     type: ../../database/mysql.yaml
27     properties:
28       ServiceNetMap: {get_param: ServiceNetMap}
29       DefaultPasswords: {get_param: DefaultPasswords}
30       EndpointMap: {get_param: EndpointMap}
31
32 outputs:
33   role_data:
34     description: Service MySQL with Pacemaker using composable services.
35     value:
36       service_name: mysql
37       config_settings:
38         map_merge:
39           - get_attr: [MysqlBase, role_data, config_settings]
40           - tripleo::profile::pacemaker::database::mysql::bind_address:
41               str_replace:
42                 template:
43                   "%{hiera('fqdn_$NETWORK')}"
44                 params:
45                   $NETWORK: {get_param: [ServiceNetMap, MysqlNetwork]}
46             # NOTE: bind IP is found in Heat replacing the network name with the
47             # local node IP for the given network; replacement examples
48             # (eg. for internal_api):
49             # internal_api -> IP
50             # internal_api_uri -> [IP]
51             # internal_api_subnet - > IP/CIDR
52             tripleo::profile::pacemaker::database::mysql::gmcast_listen_addr:
53               get_param: [ServiceNetMap, MysqlNetwork]
54       step_config: |
55         include ::tripleo::profile::pacemaker::database::mysql