Merge "decouple mysql setup from gerrit module"
This commit is contained in:
commit
22e07fc8e6
@ -71,8 +71,6 @@
|
||||
#
|
||||
class gerrit(
|
||||
$war = '',
|
||||
$mysql_password = '',
|
||||
$mysql_root_password = '',
|
||||
$email_private_key = '',
|
||||
$vhost_name = $::fqdn,
|
||||
$canonicalweburl = "https://${::fqdn}/",
|
||||
@ -261,29 +259,6 @@ class gerrit(
|
||||
require => File['/home/gerrit2/review_site/etc'],
|
||||
}
|
||||
|
||||
# Set up MySQL.
|
||||
|
||||
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 { 'reviewdb':
|
||||
user => 'gerrit2',
|
||||
password => $mysql_password,
|
||||
host => 'localhost',
|
||||
grant => ['all'],
|
||||
charset => 'latin1',
|
||||
require => [
|
||||
Class['mysql::server'],
|
||||
Class['mysql::server::account_security'],
|
||||
],
|
||||
}
|
||||
|
||||
# Set up apache.
|
||||
|
||||
apache::vhost { $vhost_name:
|
||||
|
32
modules/gerrit/manifests/mysql.pp
Normal file
32
modules/gerrit/manifests/mysql.pp
Normal file
@ -0,0 +1,32 @@
|
||||
# == Class: gerrit::mysql
|
||||
#
|
||||
class gerrit::mysql(
|
||||
$mysql_root_password = '',
|
||||
$database_name = '',
|
||||
$database_user = '',
|
||||
$database_password = '',
|
||||
) {
|
||||
|
||||
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 { $database_name:
|
||||
user => $database_user,
|
||||
password => $database_password,
|
||||
host => 'localhost',
|
||||
grant => ['all'],
|
||||
charset => 'latin1',
|
||||
require => [
|
||||
Class['mysql::server'],
|
||||
Class['mysql::server::account_security'],
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
# vim:sw=2:ts=2:expandtab:textwidth=79
|
@ -45,8 +45,6 @@ class openstack_project::gerrit (
|
||||
$github_oauth_token = '',
|
||||
$github_project_username = '',
|
||||
$github_project_password = '',
|
||||
$mysql_password = '',
|
||||
$mysql_root_password = '',
|
||||
$trivial_rebase_role_id = '',
|
||||
$email_private_key = '',
|
||||
$replicate_local = true,
|
||||
@ -155,8 +153,6 @@ class openstack_project::gerrit (
|
||||
contactstore_appsec => $contactstore_appsec,
|
||||
contactstore_pubkey => $contactstore_pubkey,
|
||||
contactstore_url => $contactstore_url,
|
||||
mysql_password => $mysql_password,
|
||||
mysql_root_password => $mysql_root_password,
|
||||
email_private_key => $email_private_key,
|
||||
replicate_local => $replicate_local,
|
||||
replication => $replication,
|
||||
|
@ -68,6 +68,15 @@ class openstack_project::review (
|
||||
$swift_username = '',
|
||||
$swift_password = ''
|
||||
) {
|
||||
|
||||
# Setup MySQL
|
||||
class { 'gerrit::mysql':
|
||||
mysql_root_password => $mysql_root_password,
|
||||
database_name => 'reviewdb',
|
||||
database_user => 'gerrit2',
|
||||
database_password => $mysql_password,
|
||||
}
|
||||
|
||||
class { 'openstack_project::gerrit':
|
||||
ssl_cert_file =>
|
||||
'/etc/ssl/certs/review.openstack.org.pem',
|
||||
|
@ -22,6 +22,15 @@ class openstack_project::review_dev (
|
||||
$swift_username = '',
|
||||
$swift_password = ''
|
||||
) {
|
||||
|
||||
# Setup MySQL
|
||||
class { 'gerrit::mysql':
|
||||
mysql_root_password => $mysql_root_password,
|
||||
database_name => 'reviewdb',
|
||||
database_user => 'gerrit2',
|
||||
database_password => $mysql_password,
|
||||
}
|
||||
|
||||
class { 'openstack_project::gerrit':
|
||||
vhost_name => 'review-dev.openstack.org',
|
||||
canonicalweburl => 'https://review-dev.openstack.org/',
|
||||
@ -51,8 +60,6 @@ class openstack_project::review_dev (
|
||||
github_oauth_token => $github_oauth_token,
|
||||
github_project_username => $github_project_username,
|
||||
github_project_password => $github_project_password,
|
||||
mysql_password => $mysql_password,
|
||||
mysql_root_password => $mysql_root_password,
|
||||
trivial_rebase_role_id =>
|
||||
'trivial-rebase@review-dev.openstack.org',
|
||||
email_private_key => $email_private_key,
|
||||
|
Loading…
Reference in New Issue
Block a user