Merge "Add a local MySQL database to paste.o.o"

This commit is contained in:
Jenkins 2015-01-09 15:49:53 +00:00 committed by Gerrit Code Review
commit f82c676114
2 changed files with 27 additions and 3 deletions

View File

@ -249,6 +249,7 @@ node 'paste.openstack.org' {
class { 'openstack_project::paste': class { 'openstack_project::paste':
db_host => hiera('paste_db_host', 'localhost'), db_host => hiera('paste_db_host', 'localhost'),
db_password => hiera('paste_db_password', 'XXX'), db_password => hiera('paste_db_password', 'XXX'),
mysql_root_password => hiera('paste_mysql_root_password', 'XXX'),
sysadmins => hiera('sysadmins', []), sysadmins => hiera('sysadmins', []),
} }
} }

View File

@ -3,6 +3,7 @@
class openstack_project::paste ( class openstack_project::paste (
$db_host, $db_host,
$db_password, $db_password,
$mysql_root_password,
$sysadmins = [] $sysadmins = []
) { ) {
class { 'openstack_project::server': class { 'openstack_project::server':
@ -15,5 +16,27 @@ class openstack_project::paste (
db_password => $db_password, db_password => $db_password,
port => '5000', port => '5000',
image => 'header-bg2.png', image => 'header-bg2.png',
require => mysql::db['openstack'],
}
class { 'mysql::server':
config_hash => {
'root_password' => $mysql_root_password,
'default_engine' => 'InnoDB',
'bind_address' => '127.0.0.1',
}
}
include mysql::server::account_security
mysql::db { 'openstack':
user => 'openstack',
password => $db_password,
host => 'localhost',
grant => ['all'],
charset => 'utf8',
require => [
Class['mysql::server'],
Class['mysql::server::account_security'],
],
} }
} }