Merge "Enable splay for os-collect-config"
[apex-tripleo-heat-templates.git] / puppet / services / pacemaker / database / mysql.yaml
1 heat_template_version: ocata
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   RoleName:
18     default: ''
19     description: Role name on which the service is applied
20     type: string
21   RoleParameters:
22     default: {}
23     description: Parameters specific to the role
24     type: json
25   EndpointMap:
26     default: {}
27     description: Mapping of service endpoint -> protocol. Typically set
28                  via parameter_defaults in the resource registry.
29     type: json
30
31 resources:
32
33   MysqlBase:
34     type: ../../database/mysql.yaml
35     properties:
36       ServiceNetMap: {get_param: ServiceNetMap}
37       DefaultPasswords: {get_param: DefaultPasswords}
38       EndpointMap: {get_param: EndpointMap}
39       RoleName: {get_param: RoleName}
40       RoleParameters: {get_param: RoleParameters}
41
42 outputs:
43   role_data:
44     description: Service MySQL with Pacemaker using composable services.
45     value:
46       service_name: mysql
47       config_settings:
48         map_merge:
49           - get_attr: [MysqlBase, role_data, config_settings]
50           - tripleo::profile::pacemaker::database::mysql::bind_address:
51               str_replace:
52                 template:
53                   "%{hiera('fqdn_$NETWORK')}"
54                 params:
55                   $NETWORK: {get_param: [ServiceNetMap, MysqlNetwork]}
56             # NOTE: bind IP is found in Heat replacing the network name with the
57             # local node IP for the given network; replacement examples
58             # (eg. for internal_api):
59             # internal_api -> IP
60             # internal_api_uri -> [IP]
61             # internal_api_subnet - > IP/CIDR
62             tripleo::profile::pacemaker::database::mysql::gmcast_listen_addr:
63               get_param: [ServiceNetMap, MysqlNetwork]
64       step_config: |
65         include ::tripleo::profile::pacemaker::database::mysql
66       metadata_settings:
67         get_attr: [MysqlBase, role_data, metadata_settings]
68       upgrade_tasks:
69         - name: Check for galera root password
70           tags: step0
71           file: path=/root/.my.cnf state=file