Fix all of the gerrit module problems.

Change-Id: I46001fd677bc9a3634c9860ec07438c326e908e3
This commit is contained in:
Monty Taylor 2012-07-23 20:09:17 -05:00
parent 1966771caf
commit dbd4da09a7
6 changed files with 40 additions and 32 deletions

View File

@ -51,7 +51,6 @@
class gerrit($virtual_hostname=$fqdn,
$canonicalweburl="https://$fqdn/",
$canonicalweburl='',
$ssl_cert_file='',
$ssl_key_file='',
$ssl_chain_file='',
@ -70,6 +69,7 @@ class gerrit($virtual_hostname=$fqdn,
$commentlinks = [],
$war,
$script_user,
$script_site,
$script_key_file,
$enable_melody = 'false',
$melody_session = 'false',

View File

@ -2,7 +2,8 @@ class gerritbot(
$nick,
$password,
$server,
$user
$user,
$virtual_hostname
) {
file { "/usr/local/gerrit/gerritbot":
@ -10,7 +11,7 @@ class gerritbot(
group => 'root',
mode => 555,
ensure => 'present',
source => 'puppet:///modules/gerrit/gerritbot',
source => 'puppet:///modules/gerritbot/gerritbot',
require => File['/usr/local/gerrit'],
}
@ -19,7 +20,7 @@ class gerritbot(
group => 'root',
mode => 555,
ensure => 'present',
source => 'puppet:///modules/gerrit/gerritbot.init',
source => 'puppet:///modules/gerritbot/gerritbot.init',
require => File['/usr/local/gerrit/gerritbot'],
}
@ -28,7 +29,7 @@ class gerritbot(
group => 'gerrit2',
mode => 440,
ensure => 'present',
source => 'puppet:///modules/gerrit/gerritbot_channel_config.yaml',
source => 'puppet:///modules/gerritbot/gerritbot_channel_config.yaml',
replace => true,
require => User['gerrit2'],
}
@ -48,7 +49,7 @@ class gerritbot(
group => 'gerrit2',
mode => 440,
ensure => 'present',
content => template('gerrit/gerritbot.config.erb'),
content => template('gerritbot/gerritbot.config.erb'),
replace => 'true',
require => User['gerrit2']
}

View File

@ -46,7 +46,7 @@ class github (
group => 'github',
mode => 440,
ensure => 'present',
content => template('gerrit/github.secure.config.erb'),
content => template('github/github.secure.config.erb'),
replace => 'true',
require => [Group['github'], File['/etc/github']],
}

View File

@ -101,50 +101,38 @@ class openstack_project::gerrit (
ensure => 'present',
source => 'puppet:///modules/openstack_project/gerrit/echosign-cla.html',
replace => 'true',
require => Class['gerrit::launchpad'],
require => Class['::gerrit'],
}
file { '/home/gerrit2/review_site/static/title.png':
ensure => 'present',
source => "puppet:///modules/openstack_project/openstack.png",
require => Class['gerrit::launchpad'],
require => Class['::gerrit'],
}
file { '/home/gerrit2/review_site/static/openstack-page-bkg.jpg':
ensure => 'present',
source => 'puppet:///modules/openstack_project/openstack-page-bkg.jpg',
require => Class['gerrit::launchpad'],
require => Class['::gerrit'],
}
file { '/home/gerrit2/review_site/etc/GerritSite.css':
ensure => 'present',
source => 'puppet:///modules/openstack_project/gerrit/GerritSite.css',
require => Class['gerrit::launchpad'],
require => Class['::gerrit'],
}
file { '/home/gerrit2/review_site/etc/GerritSiteHeader.html':
ensure => 'present',
source => 'puppet:///modules/openstack_project/GerritSiteHeader.html',
require => Class['gerrit::launchpad'],
source => 'puppet:///modules/openstack_project/gerrit/GerritSiteHeader.html',
require => Class['::gerrit'],
}
cron { "gerritsyncusers":
user => gerrit2,
minute => "*/15",
command => "sleep $((RANDOM\\%60+60)) && python /usr/local/gerrit/scripts/update_gerrit_users.py ${script_user} ${script_key_file} ${script_site}",
require => File['/usr/local/gerrit/scripts'],
}
file { '/usr/local/gerrit/scripts':
owner => 'root',
group => 'root',
mode => 755,
ensure => 'directory',
recurse => true,
require => Class['gerrit'],
source => [
"puppet:///modules/openstack_project/gerrit/scripts",
],
require => Class['::gerrit'],
}
file { '/home/gerrit2/review_site/hooks/change-merged':
@ -154,7 +142,7 @@ class openstack_project::gerrit (
ensure => 'present',
source => 'puppet:///modules/gerrit/change-merged',
replace => 'true',
require => Class['gerrit']
require => Class['::gerrit']
}
file { '/home/gerrit2/review_site/hooks/patchset-created':
@ -164,6 +152,6 @@ class openstack_project::gerrit (
ensure => 'present',
source => 'puppet:///modules/gerrit/patchset-created',
replace => 'true',
require => Class['gerrit']
require => Class['::gerrit']
}
}

View File

@ -48,10 +48,11 @@ class openstack_project::review {
email_private_key => hiera('gerrit_email_private_key'),
}
class { 'gerritbot':
gerritbot_nick => 'openstackgerrit',
gerritbot_password => hiera('gerrit_gerritbot_password'),
gerritbot_server => 'irc.freenode.net',
gerritbot_user => 'gerritbot'
nick => 'openstackgerrit',
password => hiera('gerrit_gerritbot_password'),
server => 'irc.freenode.net',
user => 'gerritbot',
virtual_hostname => $fqdn
}
class { 'gerrit::remotes':
upstream_projects => [ {

View File

@ -0,0 +1,18 @@
[main]
logdir=/var/log/puppet
vardir=/var/lib/puppet
ssldir=/var/lib/puppet/ssl
rundir=/var/run/puppet
factpath=$vardir/lib/facter
templatedir=$confdir/templates
prerun_command=/etc/puppet/etckeeper-commit-pre
postrun_command=/etc/puppet/etckeeper-commit-post
server=ci-puppetmaster.openstack.org
certname=<%= fqdn %>
[master]
# These are needed when the puppetmaster is run by passenger
# and can safely be removed if webrick is used.
ssl_client_header = SSL_CLIENT_S_DN
ssl_client_verify_header = SSL_CLIENT_VERIFY