trove: manage MySQL trove database

- OpenStack Trove database
- add the puppet-trove module in fixtures

Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
This commit is contained in:
Emilien Macchi 2014-07-02 18:22:35 +02:00
parent 1b7b2c5202
commit 530f7f1f90
3 changed files with 27 additions and 0 deletions

View File

@ -27,6 +27,8 @@ fixtures:
'heat': 'heat':
repo: 'git://github.com/enovance/puppet-heat' repo: 'git://github.com/enovance/puppet-heat'
ref: '025b8cb830d7fa476c4ab1a0b0228b88b5ba10c3' ref: '025b8cb830d7fa476c4ab1a0b0228b88b5ba10c3'
'trove':
repo: 'git://github.com/enovance/puppet-trove'
'apt': 'apt':
repo: 'git://github.com/enovance/puppetlabs-apt.git' repo: 'git://github.com/enovance/puppetlabs-apt.git'
ref: '9b001af8775c7231ea2656b7eb43d6141b536f49' ref: '9b001af8775c7231ea2656b7eb43d6141b536f49'

View File

@ -51,6 +51,10 @@ class cloud::database::sql (
$neutron_db_user = 'neutron', $neutron_db_user = 'neutron',
$neutron_db_password = 'neutronpassword', $neutron_db_password = 'neutronpassword',
$neutron_db_allowed_hosts = ['127.0.0.1'], $neutron_db_allowed_hosts = ['127.0.0.1'],
$trove_db_host = '127.0.0.1',
$trove_db_user = 'trove',
$trove_db_password = 'trovepassword',
$trove_db_allowed_hosts = ['127.0.0.1'],
$mysql_root_password = 'rootpassword', $mysql_root_password = 'rootpassword',
$mysql_sys_maint_password = 'sys_maint', $mysql_sys_maint_password = 'sys_maint',
$galera_clustercheck_dbuser = 'clustercheckdbuser', $galera_clustercheck_dbuser = 'clustercheckdbuser',
@ -208,6 +212,14 @@ class cloud::database::sql (
allowed_hosts => $heat_db_allowed_hosts, allowed_hosts => $heat_db_allowed_hosts,
} }
class { 'trove::db::mysql':
dbname => 'trove',
user => $trove_db_user,
password => $trove_db_password,
host => $trove_db_host,
allowed_hosts => $trove_db_allowed_hosts,
}
# Monitoring DB # Monitoring DB
warning('Database mapping must be updated to puppetlabs/puppetlabs-mysql >= 2.x (see: https://dev.ring.enovance.com/redmine/issues/4510)') warning('Database mapping must be updated to puppetlabs/puppetlabs-mysql >= 2.x (see: https://dev.ring.enovance.com/redmine/issues/4510)')

View File

@ -56,6 +56,10 @@ describe 'cloud::database::sql' do
:neutron_db_user => 'neutron', :neutron_db_user => 'neutron',
:neutron_db_password => 'secrete', :neutron_db_password => 'secrete',
:neutron_db_allowed_hosts => ['10.0.0.1','10.0.0.2','10.0.0.3'], :neutron_db_allowed_hosts => ['10.0.0.1','10.0.0.2','10.0.0.3'],
:trove_db_host => '10.0.0.1',
:trove_db_user => 'trove',
:trove_db_password => 'secrete',
:trove_db_allowed_hosts => ['10.0.0.1','10.0.0.2','10.0.0.3'],
:mysql_root_password => 'secrete', :mysql_root_password => 'secrete',
:mysql_sys_maint_password => 'sys', :mysql_sys_maint_password => 'sys',
:galera_clustercheck_dbuser => 'clustercheckuser', :galera_clustercheck_dbuser => 'clustercheckuser',
@ -152,6 +156,15 @@ describe 'cloud::database::sql' do
:allowed_hosts => ['10.0.0.1','10.0.0.2','10.0.0.3'] ) :allowed_hosts => ['10.0.0.1','10.0.0.2','10.0.0.3'] )
end end
it 'configure trove database' do
should contain_class('trove::db::mysql').with(
:dbname => 'trove',
:user => 'trove',
:password => 'secrete',
:host => '10.0.0.1',
:allowed_hosts => ['10.0.0.1','10.0.0.2','10.0.0.3'] )
end
it 'configure monitoring database' do it 'configure monitoring database' do
should contain_database('monitoring').with( should contain_database('monitoring').with(
:ensure => 'present', :ensure => 'present',