Deprecates MySQL parameters in favor of MariaDB
Change-Id: I7723b1df6a5f8fc12b86763a57042db29358a522 Fixes: rhbz#1102486
This commit is contained in:

committed by
Gael Chamoulaud

parent
8e3799a06e
commit
dc9902f487
@@ -57,8 +57,8 @@ Global Options
|
||||
**CONFIG_NEUTRON_INSTALL**
|
||||
Set to 'y' if you would like Packstack to install OpenStack Networking (Neutron).
|
||||
|
||||
**CONFIG_MYSQL_INSTALL**
|
||||
Set to 'y' if you would like Packstack to install MySQL.
|
||||
**CONFIG_MARIADB_INSTALL**
|
||||
Set to 'y' if you would like Packstack to install MariaDB.
|
||||
|
||||
**CONFIG_CONTROLLER_HOST**
|
||||
The IP address of the server on which to install OpenStack services specific to controller role such as API servers, Horizon, etc. This parameter replaced following deprecated parameters: CONFIG_CEILOMETER_HOST, CONFIG_CINDER_HOST, CONFIG_GLANCE_HOST, CONFIG_HORIZON_HOST, CONFIG_HEAT_HOST, CONFIG_KEYSTONE_HOST, CONFIG_NAGIOS_HOST, CONFIG_NEUTRON_SERVER_HOST, CONFIG_NEUTRON_LBAAS_HOSTS, CONFIG_NOVA_API_HOST, CONFIG_NOVA_CERT_HOST, CONFIG_NOVA_VNCPROXY_HOST, CONFIG_NOVA_SCHED_HOST, CONFIG_OSCLIENT_HOST, CONFIG_SWIFT_PROXY_HOSTS.
|
||||
@@ -76,17 +76,17 @@ SSH Configs
|
||||
**CONFIG_SSH_KEY**
|
||||
Path to a Public key to install on servers. If a usable key has not been installed on the remote servers the user will be prompted for a password and this key will be installed so the password will not be required again.
|
||||
|
||||
MySQL Config parameters
|
||||
MariaDB Config parameters
|
||||
-----------------------
|
||||
|
||||
**CONFIG_MYSQL_HOST**
|
||||
The IP address of the server on which to install MySQL.
|
||||
**CONFIG_MARIADB_HOST**
|
||||
The IP address of the server on which to install MariaDB.
|
||||
|
||||
**CONFIG_MYSQL_USER**
|
||||
Username for the MySQL admin user.
|
||||
**CONFIG_MARIADB_USER**
|
||||
Username for the MariaDB admin user.
|
||||
|
||||
**CONFIG_MYSQL_PW**
|
||||
Password for the MySQL admin user.
|
||||
**CONFIG_MARIADB_PW**
|
||||
Password for the MariaDB admin user.
|
||||
|
||||
AMQP Config parameters
|
||||
----------------------
|
||||
@@ -419,7 +419,7 @@ Heat Config Parameters
|
||||
----------------------
|
||||
|
||||
**CONFIG_HEAT_DB_PW**
|
||||
The password used by Heat user to authenticate against MySQL.
|
||||
The password used by Heat user to authenticate against MariaDB.
|
||||
|
||||
**CONFIG_HEAT_AUTH_ENC_KEY**
|
||||
The encryption key to use for authentication info in database.
|
||||
|
@@ -18,7 +18,7 @@ def filtered_hosts(config, exclude=True, dbhost=True):
|
||||
for hosttype, hostname in utils.host_iter(config):
|
||||
# if dbhost is being taken into account and we are not installing MySQL
|
||||
# then we should omit the MySQL host
|
||||
if dbhost and not dbinst and hosttype == 'CONFIG_MYSQL_HOST':
|
||||
if dbhost and not dbinst and hosttype == 'CONFIG_MARIADB_HOST':
|
||||
continue
|
||||
if vcenter and hosttype == 'CONFIG_VCENTER_HOST':
|
||||
continue
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
Installs and configures MySQL
|
||||
Installs and configures MariaDB
|
||||
"""
|
||||
|
||||
import uuid
|
||||
@@ -18,55 +18,58 @@ from packstack.modules.ospluginutils import (getManifestTemplate,
|
||||
|
||||
#------------------ oVirt installer initialization ------------------
|
||||
|
||||
PLUGIN_NAME = "MySQL"
|
||||
PLUGIN_NAME = "MariaDB"
|
||||
PLUGIN_NAME_COLORED = utils.color_text(PLUGIN_NAME, 'blue')
|
||||
|
||||
|
||||
def initConfig(controller):
|
||||
params = [
|
||||
{"CMD_OPTION": "mysql-host",
|
||||
"USAGE": ("The IP address of the server on which to install MySQL or "
|
||||
"IP address of DB server to use if MySQL installation was "
|
||||
"not selected"),
|
||||
"PROMPT": "Enter the IP address of the MySQL server",
|
||||
{"CMD_OPTION": "mariadb-host",
|
||||
"USAGE": ("The IP address of the server on which to install MariaDB "
|
||||
"or IP address of DB server to use if MariaDB "
|
||||
"installation was not selected"),
|
||||
"PROMPT": "Enter the IP address of the MariaDB server",
|
||||
"OPTION_LIST": [],
|
||||
"VALIDATORS": [validators.validate_ssh],
|
||||
"DEFAULT_VALUE": utils.get_localhost_ip(),
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": True,
|
||||
"CONF_NAME": "CONFIG_MYSQL_HOST",
|
||||
"CONF_NAME": "CONFIG_MARIADB_HOST",
|
||||
"USE_DEFAULT": False,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
"CONDITION": False,
|
||||
"DEPRECATES": ['CONFIG_MYSQL_HOST']},
|
||||
|
||||
{"CMD_OPTION": "mysql-user",
|
||||
"USAGE": "Username for the MySQL admin user",
|
||||
"PROMPT": "Enter the username for the MySQL admin user",
|
||||
{"CMD_OPTION": "mariadb-user",
|
||||
"USAGE": "Username for the MariaDB admin user",
|
||||
"PROMPT": "Enter the username for the MariaDB admin user",
|
||||
"OPTION_LIST": [],
|
||||
"VALIDATORS": [validators.validate_not_empty],
|
||||
"DEFAULT_VALUE": "root",
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": False,
|
||||
"CONF_NAME": "CONFIG_MYSQL_USER",
|
||||
"CONF_NAME": "CONFIG_MARIADB_USER",
|
||||
"USE_DEFAULT": True,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
"CONDITION": False,
|
||||
"DEPRECATES": ['CONFIG_MYSQL_USER']},
|
||||
|
||||
{"CMD_OPTION": "mysql-pw",
|
||||
"USAGE": "Password for the MySQL admin user",
|
||||
"PROMPT": "Enter the password for the MySQL admin user",
|
||||
{"CMD_OPTION": "mariadb-pw",
|
||||
"USAGE": "Password for the MariaDB admin user",
|
||||
"PROMPT": "Enter the password for the MariaDB admin user",
|
||||
"OPTION_LIST": [],
|
||||
"VALIDATORS": [validators.validate_not_empty],
|
||||
"DEFAULT_VALUE": uuid.uuid4().hex[:16],
|
||||
"MASK_INPUT": True,
|
||||
"LOOSE_VALIDATION": True,
|
||||
"CONF_NAME": "CONFIG_MYSQL_PW",
|
||||
"CONF_NAME": "CONFIG_MARIADB_PW",
|
||||
"USE_DEFAULT": False,
|
||||
"NEED_CONFIRM": True,
|
||||
"CONDITION": False},
|
||||
"CONDITION": False,
|
||||
"DEPRECATES": ['CONFIG_MYSQL_PW']},
|
||||
]
|
||||
group = {"GROUP_NAME": "MYSQL",
|
||||
"DESCRIPTION": "MySQL Config parameters",
|
||||
group = {"GROUP_NAME": "MARIADB",
|
||||
"DESCRIPTION": "MariaDB Config parameters",
|
||||
"PRE_CONDITION": lambda x: 'yes',
|
||||
"PRE_CONDITION_MATCH": "yes",
|
||||
"POST_CONDITION": False,
|
||||
@@ -75,31 +78,31 @@ def initConfig(controller):
|
||||
|
||||
|
||||
def initSequences(controller):
|
||||
mysqlsteps = [
|
||||
{'title': 'Adding MySQL manifest entries',
|
||||
mariadbsteps = [
|
||||
{'title': 'Adding MariaDB manifest entries',
|
||||
'functions': [create_manifest]}
|
||||
]
|
||||
controller.addSequence("Installing MySQL", [], [], mysqlsteps)
|
||||
controller.addSequence("Installing MariaDB", [], [], mariadbsteps)
|
||||
|
||||
|
||||
#-------------------------- step functions --------------------------
|
||||
|
||||
def create_manifest(config, messages):
|
||||
if config['CONFIG_MYSQL_INSTALL'] == 'y':
|
||||
if config['CONFIG_MARIADB_INSTALL'] == 'y':
|
||||
suffix = 'install'
|
||||
host = config['CONFIG_MYSQL_HOST']
|
||||
host = config['CONFIG_MARIADB_HOST']
|
||||
else:
|
||||
suffix = 'noinstall'
|
||||
host = config['CONFIG_CONTROLLER_HOST']
|
||||
|
||||
manifestfile = "%s_mysql.pp" % host
|
||||
manifestdata = [getManifestTemplate('mysql_%s.pp' % suffix)]
|
||||
manifestfile = "%s_mariadb.pp" % host
|
||||
manifestdata = [getManifestTemplate('mariadb_%s.pp' % suffix)]
|
||||
|
||||
def append_for(module, suffix):
|
||||
# Modules have to be appended to the existing mysql.pp
|
||||
# otherwise pp will fail for some of them saying that
|
||||
# Mysql::Config definition is missing.
|
||||
template = "mysql_%s_%s.pp" % (module, suffix)
|
||||
template = "mariadb_%s_%s.pp" % (module, suffix)
|
||||
manifestdata.append(getManifestTemplate(template))
|
||||
|
||||
append_for("keystone", suffix)
|
||||
@@ -109,13 +112,13 @@ def create_manifest(config, messages):
|
||||
|
||||
hosts = filtered_hosts(config, exclude=False, dbhost=True)
|
||||
|
||||
config['FIREWALL_SERVICE_NAME'] = "mysql"
|
||||
config['FIREWALL_SERVICE_NAME'] = "mariadb"
|
||||
config['FIREWALL_PORTS'] = "'3306'"
|
||||
config['FIREWALL_CHAIN'] = "INPUT"
|
||||
config['FIREWALL_PROTOCOL'] = 'tcp'
|
||||
for host in hosts:
|
||||
config['FIREWALL_ALLOWED'] = "'%s'" % host
|
||||
config['FIREWALL_SERVICE_ID'] = "mysql_%s" % host
|
||||
config['FIREWALL_SERVICE_ID'] = "mariadb_%s" % host
|
||||
manifestdata.append(getManifestTemplate("firewall.pp"))
|
||||
|
||||
appendManifestFile(manifestfile, "\n".join(manifestdata), 'pre')
|
@@ -625,7 +625,7 @@ def create_common_manifest(config, messages):
|
||||
perms = "nova"
|
||||
else:
|
||||
perms = "nova:%(CONFIG_NOVA_DB_PW)s"
|
||||
sqlconn = "mysql://%s@%%(CONFIG_MYSQL_HOST)s/nova" % perms
|
||||
sqlconn = "mysql://%s@%%(CONFIG_MARIADB_HOST)s/nova" % perms
|
||||
config['CONFIG_NOVA_SQL_CONN'] = sqlconn % config
|
||||
|
||||
# for nova-network in multihost mode each compute host is metadata
|
||||
|
@@ -53,20 +53,21 @@ def initConfig(controller):
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
|
||||
{"CMD_OPTION": "mysql-install",
|
||||
{"CMD_OPTION": "mariadb-install",
|
||||
"USAGE": (
|
||||
"Set to 'y' if you would like Packstack to install MySQL"
|
||||
"Set to 'y' if you would like Packstack to install MariaDB"
|
||||
),
|
||||
"PROMPT": "Should Packstack install MySQL DB",
|
||||
"PROMPT": "Should Packstack install MariaDB",
|
||||
"OPTION_LIST": ["y", "n"],
|
||||
"VALIDATORS": [validators.validate_options],
|
||||
"DEFAULT_VALUE": "y",
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": False,
|
||||
"CONF_NAME": "CONFIG_MYSQL_INSTALL",
|
||||
"CONF_NAME": "CONFIG_MARIADB_INSTALL",
|
||||
"USE_DEFAULT": False,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
"CONDITION": False,
|
||||
"DEPRECATES": ['CONFIG_MYSQL_INSTALL']},
|
||||
|
||||
{"CMD_OPTION": "os-glance-install",
|
||||
"USAGE": (
|
||||
|
@@ -6,7 +6,7 @@ class {'cinder':
|
||||
qpid_protocol => '%(CONFIG_AMQP_PROTOCOL)s',
|
||||
qpid_username => '%(CONFIG_AMQP_AUTH_USER)s',
|
||||
qpid_password => '%(CONFIG_AMQP_AUTH_PASSWORD)s',
|
||||
sql_connection => "mysql://cinder:%(CONFIG_CINDER_DB_PW)s@%(CONFIG_MYSQL_HOST)s/cinder",
|
||||
sql_connection => "mysql://cinder:%(CONFIG_CINDER_DB_PW)s@%(CONFIG_MARIADB_HOST)s/cinder",
|
||||
verbose => true,
|
||||
debug => %(CONFIG_DEBUG_MODE)s,
|
||||
mysql_module => '2.2',
|
||||
|
@@ -4,7 +4,7 @@ class {'cinder':
|
||||
rabbit_port => '%(CONFIG_AMQP_CLIENTS_PORT)s',
|
||||
rabbit_userid => '%(CONFIG_AMQP_AUTH_USER)s',
|
||||
rabbit_password => '%(CONFIG_AMQP_AUTH_PASSWORD)s',
|
||||
sql_connection => "mysql://cinder:%(CONFIG_CINDER_DB_PW)s@%(CONFIG_MYSQL_HOST)s/cinder",
|
||||
sql_connection => "mysql://cinder:%(CONFIG_CINDER_DB_PW)s@%(CONFIG_MARIADB_HOST)s/cinder",
|
||||
verbose => true,
|
||||
debug => %(CONFIG_DEBUG_MODE)s,
|
||||
mysql_module => '2.2',
|
||||
|
@@ -5,7 +5,7 @@ class {"glance::api":
|
||||
keystone_user => "glance",
|
||||
keystone_password => "%(CONFIG_GLANCE_KS_PW)s",
|
||||
pipeline => 'keystone',
|
||||
sql_connection => "mysql://glance:%(CONFIG_GLANCE_DB_PW)s@%(CONFIG_MYSQL_HOST)s/glance",
|
||||
sql_connection => "mysql://glance:%(CONFIG_GLANCE_DB_PW)s@%(CONFIG_MARIADB_HOST)s/glance",
|
||||
verbose => true,
|
||||
debug => %(CONFIG_DEBUG_MODE)s,
|
||||
mysql_module => '2.2',
|
||||
@@ -18,7 +18,7 @@ class {"glance::registry":
|
||||
keystone_tenant => "services",
|
||||
keystone_user => "glance",
|
||||
keystone_password => "%(CONFIG_GLANCE_KS_PW)s",
|
||||
sql_connection => "mysql://glance:%(CONFIG_GLANCE_DB_PW)s@%(CONFIG_MYSQL_HOST)s/glance",
|
||||
sql_connection => "mysql://glance:%(CONFIG_GLANCE_DB_PW)s@%(CONFIG_MARIADB_HOST)s/glance",
|
||||
verbose => true,
|
||||
debug => %(CONFIG_DEBUG_MODE)s,
|
||||
mysql_module => '2.2',
|
||||
|
@@ -11,5 +11,5 @@ class { 'heat':
|
||||
qpid_protocol => '%(CONFIG_AMQP_PROTOCOL)s',
|
||||
verbose => true,
|
||||
debug => %(CONFIG_DEBUG_MODE)s,
|
||||
sql_connection => "mysql://heat:%(CONFIG_HEAT_DB_PW)s@%(CONFIG_MYSQL_HOST)s/heat",
|
||||
sql_connection => "mysql://heat:%(CONFIG_HEAT_DB_PW)s@%(CONFIG_MARIADB_HOST)s/heat",
|
||||
}
|
||||
|
@@ -9,5 +9,5 @@ class { 'heat':
|
||||
rabbit_password => '%(CONFIG_AMQP_AUTH_PASSWORD)s',
|
||||
verbose => true,
|
||||
debug => %(CONFIG_DEBUG_MODE)s,
|
||||
sql_connection => "mysql://heat:%(CONFIG_HEAT_DB_PW)s@%(CONFIG_MYSQL_HOST)s/heat",
|
||||
sql_connection => "mysql://heat:%(CONFIG_HEAT_DB_PW)s@%(CONFIG_MARIADB_HOST)s/heat",
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
|
||||
class {"keystone":
|
||||
admin_token => "%(CONFIG_KEYSTONE_ADMIN_TOKEN)s",
|
||||
sql_connection => "mysql://keystone_admin:%(CONFIG_KEYSTONE_DB_PW)s@%(CONFIG_MYSQL_HOST)s/keystone",
|
||||
sql_connection => "mysql://keystone_admin:%(CONFIG_KEYSTONE_DB_PW)s@%(CONFIG_MARIADB_HOST)s/keystone",
|
||||
token_format => "%(CONFIG_KEYSTONE_TOKEN_FORMAT)s",
|
||||
verbose => true,
|
||||
debug => %(CONFIG_DEBUG_MODE)s,
|
||||
|
@@ -2,26 +2,26 @@
|
||||
remote_database { 'cinder':
|
||||
ensure => 'present',
|
||||
charset => 'utf8',
|
||||
db_host => '%(CONFIG_MYSQL_HOST)s',
|
||||
db_user => '%(CONFIG_MYSQL_USER)s',
|
||||
db_password => '%(CONFIG_MYSQL_PW)s',
|
||||
db_host => '%(CONFIG_MARIADB_HOST)s',
|
||||
db_user => '%(CONFIG_MARIADB_USER)s',
|
||||
db_password => '%(CONFIG_MARIADB_PW)s',
|
||||
provider => 'mysql',
|
||||
}
|
||||
|
||||
remote_database_user { 'cinder@%%':
|
||||
password_hash => mysql_password('%(CONFIG_CINDER_DB_PW)s'),
|
||||
db_host => '%(CONFIG_MYSQL_HOST)s',
|
||||
db_user => '%(CONFIG_MYSQL_USER)s',
|
||||
db_password => '%(CONFIG_MYSQL_PW)s',
|
||||
db_host => '%(CONFIG_MARIADB_HOST)s',
|
||||
db_user => '%(CONFIG_MARIADB_USER)s',
|
||||
db_password => '%(CONFIG_MARIADB_PW)s',
|
||||
provider => 'mysql',
|
||||
require => Remote_database['cinder'],
|
||||
}
|
||||
|
||||
remote_database_grant { 'cinder@%%/cinder':
|
||||
privileges => "all",
|
||||
db_host => '%(CONFIG_MYSQL_HOST)s',
|
||||
db_user => '%(CONFIG_MYSQL_USER)s',
|
||||
db_password => '%(CONFIG_MYSQL_PW)s',
|
||||
db_host => '%(CONFIG_MARIADB_HOST)s',
|
||||
db_user => '%(CONFIG_MARIADB_USER)s',
|
||||
db_password => '%(CONFIG_MARIADB_PW)s',
|
||||
provider => 'mysql',
|
||||
require => Remote_database_user['cinder@%%'],
|
||||
}
|
@@ -2,26 +2,26 @@
|
||||
remote_database { 'glance':
|
||||
ensure => 'present',
|
||||
charset => 'utf8',
|
||||
db_host => '%(CONFIG_MYSQL_HOST)s',
|
||||
db_user => '%(CONFIG_MYSQL_USER)s',
|
||||
db_password => '%(CONFIG_MYSQL_PW)s',
|
||||
db_host => '%(CONFIG_MARIADB_HOST)s',
|
||||
db_user => '%(CONFIG_MARIADB_USER)s',
|
||||
db_password => '%(CONFIG_MARIADB_PW)s',
|
||||
provider => 'mysql',
|
||||
}
|
||||
|
||||
remote_database_user { 'glance@%%':
|
||||
password_hash => mysql_password('%(CONFIG_GLANCE_DB_PW)s' ),
|
||||
db_host => '%(CONFIG_MYSQL_HOST)s',
|
||||
db_user => '%(CONFIG_MYSQL_USER)s',
|
||||
db_password => '%(CONFIG_MYSQL_PW)s',
|
||||
db_host => '%(CONFIG_MARIADB_HOST)s',
|
||||
db_user => '%(CONFIG_MARIADB_USER)s',
|
||||
db_password => '%(CONFIG_MARIADB_PW)s',
|
||||
provider => 'mysql',
|
||||
require => Remote_database['glance'],
|
||||
}
|
||||
|
||||
remote_database_grant { 'glance@%%/glance':
|
||||
privileges => "all",
|
||||
db_host => '%(CONFIG_MYSQL_HOST)s',
|
||||
db_user => '%(CONFIG_MYSQL_USER)s',
|
||||
db_password => '%(CONFIG_MYSQL_PW)s',
|
||||
db_host => '%(CONFIG_MARIADB_HOST)s',
|
||||
db_user => '%(CONFIG_MARIADB_USER)s',
|
||||
db_password => '%(CONFIG_MARIADB_PW)s',
|
||||
provider => 'mysql',
|
||||
require => Remote_database_user['glance@%%'],
|
||||
}
|
@@ -2,26 +2,26 @@
|
||||
remote_database { 'heat':
|
||||
ensure => 'present',
|
||||
charset => 'utf8',
|
||||
db_host => '%(CONFIG_MYSQL_HOST)s',
|
||||
db_user => '%(CONFIG_MYSQL_USER)s',
|
||||
db_password => '%(CONFIG_MYSQL_PW)s',
|
||||
db_host => '%(CONFIG_MARIADB_HOST)s',
|
||||
db_user => '%(CONFIG_MARIADB_USER)s',
|
||||
db_password => '%(CONFIG_MARIADB_PW)s',
|
||||
provider => 'mysql',
|
||||
}
|
||||
|
||||
remote_database_user { 'heat@%%':
|
||||
password_hash => mysql_password('%(CONFIG_HEAT_DB_PW)s'),
|
||||
db_host => '%(CONFIG_MYSQL_HOST)s',
|
||||
db_user => '%(CONFIG_MYSQL_USER)s',
|
||||
db_password => '%(CONFIG_MYSQL_PW)s',
|
||||
db_host => '%(CONFIG_MARIADB_HOST)s',
|
||||
db_user => '%(CONFIG_MARIADB_USER)s',
|
||||
db_password => '%(CONFIG_MARIADB_PW)s',
|
||||
provider => 'mysql',
|
||||
require => Remote_database['heat'],
|
||||
}
|
||||
|
||||
remote_database_grant { 'heat@%%/heat':
|
||||
privileges => "all",
|
||||
db_host => '%(CONFIG_MYSQL_HOST)s',
|
||||
db_user => '%(CONFIG_MYSQL_USER)s',
|
||||
db_password => '%(CONFIG_MYSQL_PW)s',
|
||||
db_host => '%(CONFIG_MARIADB_HOST)s',
|
||||
db_user => '%(CONFIG_MARIADB_USER)s',
|
||||
db_password => '%(CONFIG_MARIADB_PW)s',
|
||||
provider => 'mysql',
|
||||
require => Remote_database_user['heat@%%'],
|
||||
}
|
@@ -16,7 +16,7 @@ class {"mysql::server":
|
||||
package_name => "mariadb-galera-server",
|
||||
service_manage => $manage_service,
|
||||
restart => true,
|
||||
root_password => "%(CONFIG_MYSQL_PW)s",
|
||||
root_password => "%(CONFIG_MARIADB_PW)s",
|
||||
override_options => {
|
||||
'mysqld' => { bind_address => "0.0.0.0",
|
||||
default_storage_engine => "InnoDB",
|
@@ -2,26 +2,26 @@
|
||||
remote_database { 'keystone':
|
||||
ensure => 'present',
|
||||
charset => 'utf8',
|
||||
db_host => '%(CONFIG_MYSQL_HOST)s',
|
||||
db_user => '%(CONFIG_MYSQL_USER)s',
|
||||
db_password => '%(CONFIG_MYSQL_PW)s',
|
||||
db_host => '%(CONFIG_MARIADB_HOST)s',
|
||||
db_user => '%(CONFIG_MARIADB_USER)s',
|
||||
db_password => '%(CONFIG_MARIADB_PW)s',
|
||||
provider => 'mysql',
|
||||
}
|
||||
|
||||
remote_database_user { 'keystone_admin@%%':
|
||||
password_hash => mysql_password('%(CONFIG_KEYSTONE_DB_PW)s' ),
|
||||
db_host => '%(CONFIG_MYSQL_HOST)s',
|
||||
db_user => '%(CONFIG_MYSQL_USER)s',
|
||||
db_password => '%(CONFIG_MYSQL_PW)s',
|
||||
db_host => '%(CONFIG_MARIADB_HOST)s',
|
||||
db_user => '%(CONFIG_MARIADB_USER)s',
|
||||
db_password => '%(CONFIG_MARIADB_PW)s',
|
||||
provider => 'mysql',
|
||||
require => Remote_database['keystone'],
|
||||
}
|
||||
|
||||
remote_database_grant { 'keystone_admin@%%/keystone':
|
||||
privileges => "all",
|
||||
db_host => '%(CONFIG_MYSQL_HOST)s',
|
||||
db_user => '%(CONFIG_MYSQL_USER)s',
|
||||
db_password => '%(CONFIG_MYSQL_PW)s',
|
||||
db_host => '%(CONFIG_MARIADB_HOST)s',
|
||||
db_user => '%(CONFIG_MARIADB_USER)s',
|
||||
db_password => '%(CONFIG_MARIADB_PW)s',
|
||||
provider => 'mysql',
|
||||
require => Remote_database_user['keystone_admin@%%'],
|
||||
}
|
@@ -2,26 +2,26 @@
|
||||
remote_database { '%(CONFIG_NEUTRON_L2_DBNAME)s':
|
||||
ensure => 'present',
|
||||
charset => 'utf8',
|
||||
db_host => '%(CONFIG_MYSQL_HOST)s',
|
||||
db_user => '%(CONFIG_MYSQL_USER)s',
|
||||
db_password => '%(CONFIG_MYSQL_PW)s',
|
||||
db_host => '%(CONFIG_MARIADB_HOST)s',
|
||||
db_user => '%(CONFIG_MARIADB_USER)s',
|
||||
db_password => '%(CONFIG_MARIADB_PW)s',
|
||||
provider => 'mysql',
|
||||
}
|
||||
|
||||
remote_database_user { 'neutron@%%':
|
||||
password_hash => mysql_password('%(CONFIG_NEUTRON_DB_PW)s' ),
|
||||
db_host => '%(CONFIG_MYSQL_HOST)s',
|
||||
db_user => '%(CONFIG_MYSQL_USER)s',
|
||||
db_password => '%(CONFIG_MYSQL_PW)s',
|
||||
db_host => '%(CONFIG_MARIADB_HOST)s',
|
||||
db_user => '%(CONFIG_MARIADB_USER)s',
|
||||
db_password => '%(CONFIG_MARIADB_PW)s',
|
||||
provider => 'mysql',
|
||||
require => Remote_database['%(CONFIG_NEUTRON_L2_DBNAME)s'],
|
||||
}
|
||||
|
||||
remote_database_grant { 'neutron@%%/%(CONFIG_NEUTRON_L2_DBNAME)s':
|
||||
privileges => "all",
|
||||
db_host => '%(CONFIG_MYSQL_HOST)s',
|
||||
db_user => '%(CONFIG_MYSQL_USER)s',
|
||||
db_password => '%(CONFIG_MYSQL_PW)s',
|
||||
db_host => '%(CONFIG_MARIADB_HOST)s',
|
||||
db_user => '%(CONFIG_MARIADB_USER)s',
|
||||
db_password => '%(CONFIG_MARIADB_PW)s',
|
||||
provider => 'mysql',
|
||||
require => Remote_database_user['neutron@%%'],
|
||||
}
|
@@ -2,26 +2,26 @@
|
||||
remote_database { 'nova':
|
||||
ensure => 'present',
|
||||
charset => 'utf8',
|
||||
db_host => '%(CONFIG_MYSQL_HOST)s',
|
||||
db_user => '%(CONFIG_MYSQL_USER)s',
|
||||
db_password => '%(CONFIG_MYSQL_PW)s',
|
||||
db_host => '%(CONFIG_MARIADB_HOST)s',
|
||||
db_user => '%(CONFIG_MARIADB_USER)s',
|
||||
db_password => '%(CONFIG_MARIADB_PW)s',
|
||||
provider => 'mysql',
|
||||
}
|
||||
|
||||
remote_database_user { 'nova@%%':
|
||||
password_hash => mysql_password('%(CONFIG_NOVA_DB_PW)s' ),
|
||||
db_host => '%(CONFIG_MYSQL_HOST)s',
|
||||
db_user => '%(CONFIG_MYSQL_USER)s',
|
||||
db_password => '%(CONFIG_MYSQL_PW)s',
|
||||
db_host => '%(CONFIG_MARIADB_HOST)s',
|
||||
db_user => '%(CONFIG_MARIADB_USER)s',
|
||||
db_password => '%(CONFIG_MARIADB_PW)s',
|
||||
provider => 'mysql',
|
||||
require => Remote_database['nova'],
|
||||
}
|
||||
|
||||
remote_database_grant { 'nova@%%/nova':
|
||||
privileges => "all",
|
||||
db_host => '%(CONFIG_MYSQL_HOST)s',
|
||||
db_user => '%(CONFIG_MYSQL_USER)s',
|
||||
db_password => '%(CONFIG_MYSQL_PW)s',
|
||||
db_host => '%(CONFIG_MARIADB_HOST)s',
|
||||
db_user => '%(CONFIG_MARIADB_USER)s',
|
||||
db_password => '%(CONFIG_MARIADB_PW)s',
|
||||
provider => 'mysql',
|
||||
require => Remote_database_user['nova@%%'],
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
$neutron_db_host = '%(CONFIG_MYSQL_HOST)s'
|
||||
$neutron_db_host = '%(CONFIG_MARIADB_HOST)s'
|
||||
$neutron_db_name = '%(CONFIG_NEUTRON_L2_DBNAME)s'
|
||||
$neutron_db_user = 'neutron'
|
||||
$neutron_db_password = '%(CONFIG_NEUTRON_DB_PW)s'
|
||||
|
@@ -38,7 +38,7 @@ class ParameterTestCase(PackstackTestCaseMixin, TestCase):
|
||||
"DEFAULT_VALUE": "127.0.0.1",
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": True,
|
||||
"CONF_NAME": "CONFIG_MYSQL_HOST",
|
||||
"CONF_NAME": "CONFIG_MARIADB_HOST",
|
||||
"USE_DEFAULT": False,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False}
|
||||
@@ -71,9 +71,9 @@ class GroupTestCase(PackstackTestCaseMixin, TestCase):
|
||||
"POST_CONDITION": False,
|
||||
"POST_CONDITION_MATCH": False}
|
||||
self.params = [
|
||||
{"CONF_NAME": "CONFIG_MYSQL_HOST", "PROMPT": "find_me"},
|
||||
{"CONF_NAME": "CONFIG_MYSQL_USER"},
|
||||
{"CONF_NAME": "CONFIG_MYSQL_PW"}]
|
||||
{"CONF_NAME": "CONFIG_MARIADB_HOST", "PROMPT": "find_me"},
|
||||
{"CONF_NAME": "CONFIG_MARIADB_USER"},
|
||||
{"CONF_NAME": "CONFIG_MARIADB_PW"}]
|
||||
|
||||
def test_group_init(self):
|
||||
"""
|
||||
@@ -93,4 +93,4 @@ class GroupTestCase(PackstackTestCaseMixin, TestCase):
|
||||
param_list = group.search('PROMPT', 'find_me')
|
||||
self.assertEqual(len(param_list), 1)
|
||||
self.assertIsInstance(param_list[0], Parameter)
|
||||
self.assertEqual(param_list[0].CONF_NAME, 'CONFIG_MYSQL_HOST')
|
||||
self.assertEqual(param_list[0].CONF_NAME, 'CONFIG_MARIADB_HOST')
|
||||
|
Reference in New Issue
Block a user