Merge "Wrap ceilometer-upgrade in boostrap_host_exec"
[apex-tripleo-heat-templates.git] / puppet / services / pacemaker / database / mysql.yaml
1 heat_template_version: pike
2
3 description: >
4   MySQL with Pacemaker service deployment using puppet
5
6 parameters:
7   #Parameters not used EndpointMap
8   ServiceData:
9     default: {}
10     description: Dictionary packing service data
11     type: json
12   ServiceNetMap:
13     default: {}
14     description: Mapping of service_name -> network name. Typically set
15                  via parameter_defaults in the resource registry.  This
16                  mapping overrides those in ServiceNetMapDefaults.
17     type: json
18   DefaultPasswords:
19     default: {}
20     type: json
21   RoleName:
22     default: ''
23     description: Role name on which the service is applied
24     type: string
25   RoleParameters:
26     default: {}
27     description: Parameters specific to the role
28     type: json
29   EndpointMap:
30     default: {}
31     description: Mapping of service endpoint -> protocol. Typically set
32                  via parameter_defaults in the resource registry.
33     type: json
34   InternalTLSCAFile:
35     default: '/etc/ipa/ca.crt'
36     type: string
37     description: Specifies the default CA cert to use if TLS is used for
38                  services in the internal network.
39
40 resources:
41
42   MysqlBase:
43     type: ../../database/mysql.yaml
44     properties:
45       ServiceData: {get_param: ServiceData}
46       ServiceNetMap: {get_param: ServiceNetMap}
47       DefaultPasswords: {get_param: DefaultPasswords}
48       EndpointMap: {get_param: EndpointMap}
49       RoleName: {get_param: RoleName}
50       RoleParameters: {get_param: RoleParameters}
51
52 outputs:
53   role_data:
54     description: Service MySQL with Pacemaker using composable services.
55     value:
56       service_name: mysql
57       config_settings:
58         map_merge:
59           - get_attr: [MysqlBase, role_data, config_settings]
60           - tripleo::profile::pacemaker::database::mysql::bind_address:
61               str_replace:
62                 template:
63                   "%{hiera('fqdn_$NETWORK')}"
64                 params:
65                   $NETWORK: {get_param: [ServiceNetMap, MysqlNetwork]}
66             # NOTE: bind IP is found in Heat replacing the network name with the
67             # local node IP for the given network; replacement examples
68             # (eg. for internal_api):
69             # internal_api -> IP
70             # internal_api_uri -> [IP]
71             # internal_api_subnet - > IP/CIDR
72             tripleo::profile::pacemaker::database::mysql::gmcast_listen_addr:
73               get_param: [ServiceNetMap, MysqlNetwork]
74             tripleo::profile::pacemaker::database::mysql::ca_file:
75               get_param: InternalTLSCAFile
76       step_config: |
77         include ::tripleo::profile::pacemaker::database::mysql
78       metadata_settings:
79         get_attr: [MysqlBase, role_data, metadata_settings]
80       upgrade_tasks:
81         - name: Check for galera root password
82           tags: step0
83           file: path=/root/.my.cnf state=file