Support configurable mysql host in gerrit
In further support of using a trove db, remove the gerrit::mysql module from review-dev. Plumb mysql_host throughout and remove the no longer necessary mysql_root_password. Configure review-dev to use mysql_host from hiera, but configure review to use 'localhost'. Change-Id: Id13cea66601f80c5b17d2a4069a14f7b458ea09d
This commit is contained in:
parent
8e9011171d
commit
0c5b2fad15
@ -16,8 +16,8 @@ node 'review.openstack.org' {
|
||||
github_oauth_token => hiera('gerrit_github_token'),
|
||||
github_project_username => hiera('github_project_username'),
|
||||
github_project_password => hiera('github_project_password'),
|
||||
mysql_host => 'localhost',
|
||||
mysql_password => hiera('gerrit_mysql_password'),
|
||||
mysql_root_password => hiera('gerrit_mysql_root_password'),
|
||||
email_private_key => hiera('gerrit_email_private_key'),
|
||||
gerritbot_password => hiera('gerrit_gerritbot_password'),
|
||||
ssl_cert_file_contents => hiera('gerrit_ssl_cert_file_contents'),
|
||||
@ -49,8 +49,8 @@ node 'review-dev.openstack.org' {
|
||||
github_oauth_token => hiera('gerrit_dev_github_token'),
|
||||
github_project_username => hiera('github_dev_project_username'),
|
||||
github_project_password => hiera('github_dev_project_password'),
|
||||
mysql_host => hiera('gerrit_dev_mysql_host'),
|
||||
mysql_password => hiera('gerrit_dev_mysql_password'),
|
||||
mysql_root_password => hiera('gerrit_dev_mysql_root_password'),
|
||||
email_private_key => hiera('gerrit_dev_email_private_key'),
|
||||
contactstore_appsec => hiera('gerrit_dev_contactstore_appsec'),
|
||||
contactstore_pubkey => hiera('gerrit_dev_contactstore_pubkey'),
|
||||
|
@ -1,5 +1,7 @@
|
||||
# Install and maintain Gerrit Code Review.
|
||||
# params:
|
||||
# mysql_host:
|
||||
# The mysql host to which gerrit should connect.
|
||||
# mysql_password:
|
||||
# The password with which gerrit connects to mysql.
|
||||
# vhost_name:
|
||||
@ -76,6 +78,7 @@
|
||||
# TODO: make more gerrit options configurable here
|
||||
#
|
||||
class gerrit(
|
||||
$mysql_host = 'localhost',
|
||||
$mysql_password,
|
||||
$war = '',
|
||||
$email_private_key = '',
|
||||
@ -252,6 +255,7 @@ class gerrit(
|
||||
|
||||
# Gerrit sets these permissions in 'init'; don't fight them.
|
||||
# Template uses:
|
||||
# - $mysql_host
|
||||
# - $canonicalweburl
|
||||
# - $database_poollimit
|
||||
# - $gerrit_contributor_agreement
|
||||
|
@ -6,7 +6,7 @@
|
||||
canonicalWebUrl = <%= canonicalweburl %>
|
||||
[database]
|
||||
type = MYSQL
|
||||
hostname = localhost
|
||||
hostname = <%= mysql_host %>
|
||||
database = reviewdb
|
||||
username = gerrit2
|
||||
<% if database_poollimit != "" -%>
|
||||
|
@ -4,6 +4,7 @@
|
||||
# up for launchpad single sign on and bug/blueprint links
|
||||
|
||||
class openstack_project::gerrit (
|
||||
$mysql_host,
|
||||
$mysql_password,
|
||||
$vhost_name = $::fqdn,
|
||||
$canonicalweburl = "https://${::fqdn}/",
|
||||
|
@ -38,8 +38,8 @@ class openstack_project::review (
|
||||
$github_project_password = '',
|
||||
# Create arbitrary values and put here, puppet will use during
|
||||
# provisioning.
|
||||
$mysql_host = '',
|
||||
$mysql_password = '',
|
||||
$mysql_root_password = '',
|
||||
$email_private_key = '',
|
||||
# Register an IRC bot and supply it's password here.
|
||||
$gerritbot_password = '',
|
||||
@ -124,6 +124,7 @@ class openstack_project::review (
|
||||
github_project_username => $github_project_username,
|
||||
github_project_password => $github_project_password,
|
||||
trivial_rebase_role_id => 'trivial-rebase@review.openstack.org',
|
||||
mysql_host => $mysql_host,
|
||||
mysql_password => $mysql_password,
|
||||
email_private_key => $email_private_key,
|
||||
sysadmins => $sysadmins,
|
||||
|
@ -4,8 +4,8 @@ class openstack_project::review_dev (
|
||||
$github_oauth_token = '',
|
||||
$github_project_username = '',
|
||||
$github_project_password = '',
|
||||
$mysql_host = '',
|
||||
$mysql_password = '',
|
||||
$mysql_root_password = '',
|
||||
$email_private_key = '',
|
||||
$contactstore = true,
|
||||
$contactstore_appsec = '',
|
||||
@ -28,14 +28,6 @@ class openstack_project::review_dev (
|
||||
User::Virtual::Localuser['zaro'],
|
||||
)
|
||||
|
||||
# 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/',
|
||||
@ -67,6 +59,7 @@ class openstack_project::review_dev (
|
||||
github_oauth_token => $github_oauth_token,
|
||||
github_project_username => $github_project_username,
|
||||
github_project_password => $github_project_password,
|
||||
mysql_host => $mysql_host,
|
||||
mysql_password => $mysql_password,
|
||||
email_private_key => $email_private_key,
|
||||
sysadmins => $sysadmins,
|
||||
|
Loading…
x
Reference in New Issue
Block a user