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
30 MysqlClustercheckPassword:
35 description: Whether to use Galera instead of regular MariaDB.
38 description: The password for the nova db account
45 type: OS::TripleO::Services::MySQLTLS
47 ServiceNetMap: {get_param: ServiceNetMap}
51 description: Service MySQL using composable services.
56 - get_attr: [MySQLTLS, role_data, config_settings]
58 # The Galera package should work in cluster and
59 # non-cluster modes based on the config file.
60 # We set the package name here explicitly so
61 # that it matches what we pre-install
62 # in tripleo-puppet-elements.
63 mysql::server::package_name: 'mariadb-galera-server'
64 mysql::server::manage_config_file: true
65 tripleo.mysql.firewall_rules:
74 mysql_max_connections: {get_param: MysqlMaxConnections}
75 mysql::server::root_password:
77 expression: $.data.passwords.where($ != '').first()
80 - {get_param: MysqlRootPassword}
81 - {get_param: [DefaultPasswords, mysql_root_password]}
82 mysql_clustercheck_password: {get_param: MysqlClustercheckPassword}
83 enable_galera: {get_param: EnableGalera}
84 # NOTE: bind IP is found in Heat replacing the network name with the
85 # local node IP for the given network; replacement examples
86 # (eg. for internal_api):
88 # internal_api_uri -> [IP]
89 # internal_api_subnet - > IP/CIDR
90 mysql_bind_host: {get_param: [ServiceNetMap, MysqlNetwork]}
91 tripleo::profile::base::database::mysql::bind_address:
94 "%{hiera('fqdn_$NETWORK')}"
96 $NETWORK: {get_param: [ServiceNetMap, MysqlNetwork]}
97 tripleo::profile::base::database::mysql::client_bind_address:
98 {get_param: [ServiceNetMap, MysqlNetwork]}
100 include ::tripleo::profile::base::database::mysql
102 get_attr: [MySQLTLS, role_data, metadata_settings]
104 - name: Check for galera root password
106 file: path=/root/.my.cnf state=file
109 service: name=mariadb state=stopped
110 - name: Start service
112 service: name=mariadb state=started
113 - name: Setup cell_v2 (create cell0 database)
118 - name: Setup cell_v2 (grant access to the nova DB user)
122 template: "name=nova password=PASSWORD host=\"%\" priv=\"nova.*:ALL/nova_cell0.*:ALL,GRANT\" state=present"
124 PASSWORD: {get_param: NovaPassword}