Merge "Neutron metadata agent worker count fix"
[apex-tripleo-heat-templates.git] / puppet / services / database / mysql.yaml
1 heat_template_version: 2016-10-14
2
3 description: >
4   MySQL 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   MysqlMaxConnections:
23     description: Configures MySQL max_connections config setting
24     type: number
25     default: 4096
26   MysqlRootPassword:
27     type: string
28     hidden: true
29     default: ''
30   MysqlClustercheckPassword:
31     type: string
32     hidden: true
33   EnableGalera:
34     default: true
35     description: Whether to use Galera instead of regular MariaDB.
36     type: boolean
37
38 outputs:
39   role_data:
40     description: Service MySQL using composable services.
41     value:
42       service_name: mysql
43       config_settings:
44         # The Galera package should work in cluster and
45         # non-cluster modes based on the config file.
46         # We set the package name here explicitly so
47         # that it matches what we pre-install
48         # in tripleo-puppet-elements.
49         mysql::server::package_name: 'mariadb-galera-server'
50         mysql::server::manage_config_file: true
51         tripleo.mysql.firewall_rules:
52           '104 mysql galera':
53             dport:
54               - 873
55               - 3306
56               - 4444
57               - 4567
58               - 4568
59               - 9200
60         mysql_max_connections: {get_param: MysqlMaxConnections}
61         mysql::server::root_password:
62           yaql:
63             expression: $.data.passwords.where($ != '').first()
64             data:
65               passwords:
66                 - {get_param: MysqlRootPassword}
67                 - {get_param: [DefaultPasswords, mysql_root_password]}
68         mysql_clustercheck_password: {get_param: MysqlClustercheckPassword}
69         enable_galera: {get_param: EnableGalera}
70         # NOTE: bind IP is found in Heat replacing the network name with the
71         # local node IP for the given network; replacement examples
72         # (eg. for internal_api):
73         # internal_api -> IP
74         # internal_api_uri -> [IP]
75         # internal_api_subnet - > IP/CIDR
76         mysql_bind_host: {get_param: [ServiceNetMap, MysqlNetwork]}
77         tripleo::profile::base::database::mysql::bind_address:
78           str_replace:
79             template:
80               '"%{::fqdn_$NETWORK}"'
81             params:
82               $NETWORK: {get_param: [ServiceNetMap, MysqlNetwork]}
83       step_config: |
84         include ::tripleo::profile::base::database::mysql