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
49 type: OS::TripleO::Services::MySQLTLS
51 ServiceNetMap: {get_param: ServiceNetMap}
55 description: Service MySQL using composable services.
60 - get_attr: [MySQLTLS, role_data, config_settings]
62 # The Galera package should work in cluster and
63 # non-cluster modes based on the config file.
64 # We set the package name here explicitly so
65 # that it matches what we pre-install
66 # in tripleo-puppet-elements.
67 mysql::server::package_name: 'mariadb-galera-server'
68 mysql::server::manage_config_file: true
69 tripleo.mysql.firewall_rules:
78 mysql_max_connections: {get_param: MysqlMaxConnections}
79 mysql::server::root_password:
81 expression: $.data.passwords.where($ != '').first()
84 - {get_param: MysqlRootPassword}
85 - {get_param: [DefaultPasswords, mysql_root_password]}
86 mysql_clustercheck_password: {get_param: MysqlClustercheckPassword}
87 enable_galera: {get_param: EnableGalera}
88 # NOTE: bind IP is found in Heat replacing the network name with the
89 # local node IP for the given network; replacement examples
90 # (eg. for internal_api):
92 # internal_api_uri -> [IP]
93 # internal_api_subnet - > IP/CIDR
94 mysql_bind_host: {get_param: [ServiceNetMap, MysqlNetwork]}
95 tripleo::profile::base::database::mysql::bind_address:
98 "%{hiera('fqdn_$NETWORK')}"
100 $NETWORK: {get_param: [ServiceNetMap, MysqlNetwork]}
101 tripleo::profile::base::database::mysql::client_bind_address:
102 {get_param: [ServiceNetMap, MysqlNetwork]}
103 tripleo::profile::base::database::mysql::generate_dropin_file_limit:
104 {get_param: MysqlIncreaseFileLimit}
106 include ::tripleo::profile::base::database::mysql
108 get_attr: [MySQLTLS, role_data, metadata_settings]
110 - name: Check for galera root password
112 file: path=/root/.my.cnf state=file
115 service: name=mariadb state=stopped
116 - name: Start service
118 service: name=mariadb state=started
119 - name: Setup cell_v2 (create cell0 database)
124 - name: Setup cell_v2 (grant access to the nova DB user)
128 template: "name=nova password=PASSWORD host=\"%\" priv=\"nova.*:ALL/nova_cell0.*:ALL,GRANT\" state=present"
130 PASSWORD: {get_param: NovaPassword}