Use db class to set database parameters

Since the ones in the base class (like aodh, cinder, heat, ...) are
deprecated now.

Change-Id: Ib19882d5f9d8ebb7863d6a9651d16ea4a3ad76a7
This commit is contained in:
Takashi Kajinami 2020-10-26 23:58:15 +09:00
parent 89e0a65e51
commit 8156e9bb68
9 changed files with 31 additions and 11 deletions

View File

@ -27,6 +27,9 @@ class openstack_integration::aodh (
class { 'aodh::logging':
debug => true,
}
class { 'aodh::db':
database_connection => 'mysql+pymysql://aodh:aodh@127.0.0.1/aodh?charset=utf8',
}
class { 'aodh':
default_transport_url => os_transport_url({
'transport' => $::openstack_integration::config::messaging_default_proto,
@ -44,7 +47,6 @@ class openstack_integration::aodh (
}),
rabbit_use_ssl => $::openstack_integration::config::ssl,
amqp_sasl_mechanisms => 'PLAIN',
database_connection => 'mysql+pymysql://aodh:aodh@127.0.0.1/aodh?charset=utf8',
notification_topics => $notification_topics,
notification_driver => 'messagingv2',
}

View File

@ -67,6 +67,9 @@ class openstack_integration::cinder (
$keymgr_encryption_api_url = undef
$keymgr_encryption_auth_url = undef
}
class { 'cinder::db':
database_connection => 'mysql+pymysql://cinder:cinder@127.0.0.1/cinder?charset=utf8',
}
class { 'cinder':
default_transport_url => os_transport_url({
'transport' => $::openstack_integration::config::messaging_default_proto,
@ -84,7 +87,6 @@ class openstack_integration::cinder (
}),
notification_topics => $notification_topics,
notification_driver => 'messagingv2',
database_connection => 'mysql+pymysql://cinder:cinder@127.0.0.1/cinder?charset=utf8',
rabbit_use_ssl => $::openstack_integration::config::ssl,
amqp_sasl_mechanisms => 'PLAIN',
keymgr_backend => $keymgr_backend,

View File

@ -40,6 +40,9 @@ class openstack_integration::heat (
class { 'heat::logging':
debug => true,
}
class { 'heat::db':
database_connection => 'mysql+pymysql://heat:heat@127.0.0.1/heat?charset=utf8',
}
class { 'heat':
default_transport_url => os_transport_url({
'transport' => $::openstack_integration::config::messaging_default_proto,
@ -57,7 +60,6 @@ class openstack_integration::heat (
}),
rabbit_use_ssl => $::openstack_integration::config::ssl,
amqp_sasl_mechanisms => 'PLAIN',
database_connection => 'mysql+pymysql://heat:heat@127.0.0.1/heat?charset=utf8',
notification_topics => $notification_topics,
notification_driver => 'messagingv2',
}

View File

@ -18,6 +18,9 @@ class openstack_integration::ironic {
class { 'ironic::logging':
debug => true,
}
class { 'ironic::db':
database_connection => 'mysql+pymysql://ironic:ironic@127.0.0.1/ironic?charset=utf8',
}
class { 'ironic':
default_transport_url => os_transport_url({
'transport' => $::openstack_integration::config::messaging_default_proto,
@ -28,7 +31,6 @@ class openstack_integration::ironic {
}),
rabbit_use_ssl => $::openstack_integration::config::ssl,
amqp_sasl_mechanisms => 'PLAIN',
database_connection => 'mysql+pymysql://ironic:ironic@127.0.0.1/ironic?charset=utf8',
}
class { 'ironic::db::mysql':
password => 'ironic',
@ -87,6 +89,9 @@ class openstack_integration::ironic {
password => 'a_big_secret',
}
class { 'ironic::pxe': }
class { 'ironic::inspector::db':
database_connection => 'mysql+pymysql://ironic-inspector:a_big_secret@127.0.0.1/ironic-inspector?charset=utf8',
}
class { 'ironic::inspector':
listen_address => $::openstack_integration::config::host,
default_transport_url => os_transport_url({
@ -99,7 +104,6 @@ class openstack_integration::ironic {
ironic_password => 'a_big_secret',
ironic_auth_url => "${::openstack_integration::config::keystone_auth_uri}/v3",
dnsmasq_interface => 'eth0',
db_connection => 'mysql+pymysql://ironic-inspector:a_big_secret@127.0.0.1/ironic-inspector?charset=utf8',
}
}
default: {

View File

@ -54,12 +54,14 @@ class openstack_integration::keystone (
class { 'keystone::db::mysql':
password => 'keystone',
}
class { 'keystone::db':
database_connection => 'mysql+pymysql://keystone:keystone@127.0.0.1/keystone',
}
class { 'keystone::logging':
debug => true,
}
include keystone::cache
class { 'keystone':
database_connection => 'mysql+pymysql://keystone:keystone@127.0.0.1/keystone',
enabled => true,
service_name => 'httpd',
default_domain => $default_domain,

View File

@ -22,6 +22,9 @@ class openstack_integration::mistral {
class { 'mistral::logging':
debug => true,
}
class { 'mistral::db':
database_connection => 'mysql+pymysql://mistral:mistral@127.0.0.1/mistral?charset=utf8',
}
class { 'mistral':
default_transport_url => os_transport_url({
'transport' => $::openstack_integration::config::messaging_default_proto,
@ -30,7 +33,6 @@ class openstack_integration::mistral {
'username' => 'mistral',
'password' => 'an_even_bigger_secret',
}),
database_connection => 'mysql+pymysql://mistral:mistral@127.0.0.1/mistral?charset=utf8',
rabbit_use_ssl => $::openstack_integration::config::ssl,
}
class { 'mistral::keystone::auth':

View File

@ -45,6 +45,9 @@ class openstack_integration::murano {
class { 'murano::logging':
debug => true,
}
class { 'murano::db':
database_connection => 'mysql+pymysql://murano:a_big_secret@127.0.0.1/murano?charset=utf8',
}
class { 'murano':
admin_password => 'a_big_secret',
default_transport_url => os_transport_url({
@ -61,7 +64,6 @@ class openstack_integration::murano {
rabbit_own_host => $::openstack_integration::config::host,
rabbit_own_port => $::openstack_integration::config::rabbit_port,
rabbit_own_use_ssl => $::openstack_integration::config::ssl,
database_connection => 'mysql+pymysql://murano:a_big_secret@127.0.0.1/murano?charset=utf8',
identity_uri => $::openstack_integration::config::keystone_admin_uri,
www_authenticate_uri => $::openstack_integration::config::keystone_auth_uri,
use_ssl => $::openstack_integration::config::ssl,

View File

@ -97,11 +97,13 @@ class openstack_integration::nova (
class { 'nova::logging':
debug => true,
}
class { 'nova::db':
database_connection => 'mysql+pymysql://nova:nova@127.0.0.1/nova?charset=utf8',
api_database_connection => 'mysql+pymysql://nova_api:nova@127.0.0.1/nova_api?charset=utf8',
}
class { 'nova':
default_transport_url => $default_transport_url,
notification_transport_url => $notification_transport_url,
database_connection => 'mysql+pymysql://nova:nova@127.0.0.1/nova?charset=utf8',
api_database_connection => 'mysql+pymysql://nova_api:nova@127.0.0.1/nova_api?charset=utf8',
rabbit_use_ssl => $::openstack_integration::config::ssl,
amqp_sasl_mechanisms => 'PLAIN',
notification_driver => 'messagingv2',

View File

@ -37,9 +37,11 @@ class openstack_integration::sahara (
class { 'sahara::logging':
debug => true,
}
class { 'sahara::db':
database_connection => 'mysql+pymysql://sahara:sahara@127.0.0.1/sahara?charset=utf8',
}
class { 'sahara':
host => $::openstack_integration::config::host,
database_connection => 'mysql+pymysql://sahara:sahara@127.0.0.1/sahara?charset=utf8',
use_ssl => $::openstack_integration::config::ssl,
cert_file => $::openstack_integration::params::cert_path,
key_file => "/etc/sahara/ssl/private/${::fqdn}.pem",