1 heat_template_version: ocata
4 MySQL service deployment using puppet
7 #Parameters not used EndpointMap
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.
19 description: Mapping of service endpoint -> protocol. Typically set
20 via parameter_defaults in the resource registry.
23 description: Configures MySQL max_connections config setting
26 MysqlIncreaseFileLimit:
27 description: Flag to increase MySQL open-files-limit to 16384
34 MysqlClustercheckPassword:
39 description: Whether to use Galera instead of regular MariaDB.
42 description: The password for the nova db account
51 internal_tls_enabled: {equals: [{get_param: EnableInternalTLS}, true]}
55 description: Service MySQL using composable services.
61 # The Galera package should work in cluster and
62 # non-cluster modes based on the config file.
63 # We set the package name here explicitly so
64 # that it matches what we pre-install
65 # in tripleo-puppet-elements.
66 mysql::server::package_name: 'mariadb-galera-server'
67 mysql::server::manage_config_file: true
68 tripleo.mysql.firewall_rules:
77 mysql_max_connections: {get_param: MysqlMaxConnections}
78 mysql::server::root_password:
80 expression: $.data.passwords.where($ != '').first()
83 - {get_param: MysqlRootPassword}
84 - {get_param: [DefaultPasswords, mysql_root_password]}
85 mysql_clustercheck_password: {get_param: MysqlClustercheckPassword}
86 enable_galera: {get_param: EnableGalera}
87 # NOTE: bind IP is found in Heat replacing the network name with the
88 # local node IP for the given network; replacement examples
89 # (eg. for internal_api):
91 # internal_api_uri -> [IP]
92 # internal_api_subnet - > IP/CIDR
93 mysql_bind_host: {get_param: [ServiceNetMap, MysqlNetwork]}
94 tripleo::profile::base::database::mysql::bind_address:
97 "%{hiera('fqdn_$NETWORK')}"
99 $NETWORK: {get_param: [ServiceNetMap, MysqlNetwork]}
100 tripleo::profile::base::database::mysql::client_bind_address:
101 {get_param: [ServiceNetMap, MysqlNetwork]}
102 tripleo::profile::base::database::mysql::generate_dropin_file_limit:
103 {get_param: MysqlIncreaseFileLimit}
104 - generate_service_certificates: true
105 tripleo::profile::base::database::mysql::certificate_specs:
106 service_certificate: '/etc/pki/tls/certs/mysql.crt'
107 service_key: '/etc/pki/tls/private/mysql.key'
110 template: "%{hiera('cloud_name_NETWORK')}"
112 NETWORK: {get_param: [ServiceNetMap, MysqlNetwork]}
115 template: "mysql/%{hiera('cloud_name_NETWORK')}"
117 NETWORK: {get_param: [ServiceNetMap, MysqlNetwork]}
119 include ::tripleo::profile::base::database::mysql
122 - internal_tls_enabled
125 network: {get_param: [ServiceNetMap, MysqlNetwork]}
129 - name: Check for galera root password
131 file: path=/root/.my.cnf state=file
134 service: name=mariadb state=stopped
135 - name: Start service
137 service: name=mariadb state=started
138 - name: Setup cell_v2 (create cell0 database)
143 - name: Setup cell_v2 (grant access to the nova DB user)
147 template: "name=nova password=PASSWORD host=\"%\" priv=\"nova.*:ALL/nova_cell0.*:ALL,GRANT\" state=present"
149 PASSWORD: {get_param: NovaPassword}