Fix all of the gerrit module problems.
Change-Id: I46001fd677bc9a3634c9860ec07438c326e908e3
This commit is contained in:
parent
1966771caf
commit
dbd4da09a7
@ -51,7 +51,6 @@
|
|||||||
|
|
||||||
class gerrit($virtual_hostname=$fqdn,
|
class gerrit($virtual_hostname=$fqdn,
|
||||||
$canonicalweburl="https://$fqdn/",
|
$canonicalweburl="https://$fqdn/",
|
||||||
$canonicalweburl='',
|
|
||||||
$ssl_cert_file='',
|
$ssl_cert_file='',
|
||||||
$ssl_key_file='',
|
$ssl_key_file='',
|
||||||
$ssl_chain_file='',
|
$ssl_chain_file='',
|
||||||
@ -70,6 +69,7 @@ class gerrit($virtual_hostname=$fqdn,
|
|||||||
$commentlinks = [],
|
$commentlinks = [],
|
||||||
$war,
|
$war,
|
||||||
$script_user,
|
$script_user,
|
||||||
|
$script_site,
|
||||||
$script_key_file,
|
$script_key_file,
|
||||||
$enable_melody = 'false',
|
$enable_melody = 'false',
|
||||||
$melody_session = 'false',
|
$melody_session = 'false',
|
||||||
|
@ -2,7 +2,8 @@ class gerritbot(
|
|||||||
$nick,
|
$nick,
|
||||||
$password,
|
$password,
|
||||||
$server,
|
$server,
|
||||||
$user
|
$user,
|
||||||
|
$virtual_hostname
|
||||||
) {
|
) {
|
||||||
|
|
||||||
file { "/usr/local/gerrit/gerritbot":
|
file { "/usr/local/gerrit/gerritbot":
|
||||||
@ -10,7 +11,7 @@ class gerritbot(
|
|||||||
group => 'root',
|
group => 'root',
|
||||||
mode => 555,
|
mode => 555,
|
||||||
ensure => 'present',
|
ensure => 'present',
|
||||||
source => 'puppet:///modules/gerrit/gerritbot',
|
source => 'puppet:///modules/gerritbot/gerritbot',
|
||||||
require => File['/usr/local/gerrit'],
|
require => File['/usr/local/gerrit'],
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -19,7 +20,7 @@ class gerritbot(
|
|||||||
group => 'root',
|
group => 'root',
|
||||||
mode => 555,
|
mode => 555,
|
||||||
ensure => 'present',
|
ensure => 'present',
|
||||||
source => 'puppet:///modules/gerrit/gerritbot.init',
|
source => 'puppet:///modules/gerritbot/gerritbot.init',
|
||||||
require => File['/usr/local/gerrit/gerritbot'],
|
require => File['/usr/local/gerrit/gerritbot'],
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,7 +29,7 @@ class gerritbot(
|
|||||||
group => 'gerrit2',
|
group => 'gerrit2',
|
||||||
mode => 440,
|
mode => 440,
|
||||||
ensure => 'present',
|
ensure => 'present',
|
||||||
source => 'puppet:///modules/gerrit/gerritbot_channel_config.yaml',
|
source => 'puppet:///modules/gerritbot/gerritbot_channel_config.yaml',
|
||||||
replace => true,
|
replace => true,
|
||||||
require => User['gerrit2'],
|
require => User['gerrit2'],
|
||||||
}
|
}
|
||||||
@ -48,7 +49,7 @@ class gerritbot(
|
|||||||
group => 'gerrit2',
|
group => 'gerrit2',
|
||||||
mode => 440,
|
mode => 440,
|
||||||
ensure => 'present',
|
ensure => 'present',
|
||||||
content => template('gerrit/gerritbot.config.erb'),
|
content => template('gerritbot/gerritbot.config.erb'),
|
||||||
replace => 'true',
|
replace => 'true',
|
||||||
require => User['gerrit2']
|
require => User['gerrit2']
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ class github (
|
|||||||
group => 'github',
|
group => 'github',
|
||||||
mode => 440,
|
mode => 440,
|
||||||
ensure => 'present',
|
ensure => 'present',
|
||||||
content => template('gerrit/github.secure.config.erb'),
|
content => template('github/github.secure.config.erb'),
|
||||||
replace => 'true',
|
replace => 'true',
|
||||||
require => [Group['github'], File['/etc/github']],
|
require => [Group['github'], File['/etc/github']],
|
||||||
}
|
}
|
||||||
|
@ -101,50 +101,38 @@ class openstack_project::gerrit (
|
|||||||
ensure => 'present',
|
ensure => 'present',
|
||||||
source => 'puppet:///modules/openstack_project/gerrit/echosign-cla.html',
|
source => 'puppet:///modules/openstack_project/gerrit/echosign-cla.html',
|
||||||
replace => 'true',
|
replace => 'true',
|
||||||
require => Class['gerrit::launchpad'],
|
require => Class['::gerrit'],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/home/gerrit2/review_site/static/title.png':
|
file { '/home/gerrit2/review_site/static/title.png':
|
||||||
ensure => 'present',
|
ensure => 'present',
|
||||||
source => "puppet:///modules/openstack_project/openstack.png",
|
source => "puppet:///modules/openstack_project/openstack.png",
|
||||||
require => Class['gerrit::launchpad'],
|
require => Class['::gerrit'],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/home/gerrit2/review_site/static/openstack-page-bkg.jpg':
|
file { '/home/gerrit2/review_site/static/openstack-page-bkg.jpg':
|
||||||
ensure => 'present',
|
ensure => 'present',
|
||||||
source => 'puppet:///modules/openstack_project/openstack-page-bkg.jpg',
|
source => 'puppet:///modules/openstack_project/openstack-page-bkg.jpg',
|
||||||
require => Class['gerrit::launchpad'],
|
require => Class['::gerrit'],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/home/gerrit2/review_site/etc/GerritSite.css':
|
file { '/home/gerrit2/review_site/etc/GerritSite.css':
|
||||||
ensure => 'present',
|
ensure => 'present',
|
||||||
source => 'puppet:///modules/openstack_project/gerrit/GerritSite.css',
|
source => 'puppet:///modules/openstack_project/gerrit/GerritSite.css',
|
||||||
require => Class['gerrit::launchpad'],
|
require => Class['::gerrit'],
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/home/gerrit2/review_site/etc/GerritSiteHeader.html':
|
file { '/home/gerrit2/review_site/etc/GerritSiteHeader.html':
|
||||||
ensure => 'present',
|
ensure => 'present',
|
||||||
source => 'puppet:///modules/openstack_project/GerritSiteHeader.html',
|
source => 'puppet:///modules/openstack_project/gerrit/GerritSiteHeader.html',
|
||||||
require => Class['gerrit::launchpad'],
|
require => Class['::gerrit'],
|
||||||
}
|
}
|
||||||
|
|
||||||
cron { "gerritsyncusers":
|
cron { "gerritsyncusers":
|
||||||
user => gerrit2,
|
user => gerrit2,
|
||||||
minute => "*/15",
|
minute => "*/15",
|
||||||
command => "sleep $((RANDOM\\%60+60)) && python /usr/local/gerrit/scripts/update_gerrit_users.py ${script_user} ${script_key_file} ${script_site}",
|
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'],
|
require => Class['::gerrit'],
|
||||||
}
|
|
||||||
|
|
||||||
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",
|
|
||||||
],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/home/gerrit2/review_site/hooks/change-merged':
|
file { '/home/gerrit2/review_site/hooks/change-merged':
|
||||||
@ -154,7 +142,7 @@ class openstack_project::gerrit (
|
|||||||
ensure => 'present',
|
ensure => 'present',
|
||||||
source => 'puppet:///modules/gerrit/change-merged',
|
source => 'puppet:///modules/gerrit/change-merged',
|
||||||
replace => 'true',
|
replace => 'true',
|
||||||
require => Class['gerrit']
|
require => Class['::gerrit']
|
||||||
}
|
}
|
||||||
|
|
||||||
file { '/home/gerrit2/review_site/hooks/patchset-created':
|
file { '/home/gerrit2/review_site/hooks/patchset-created':
|
||||||
@ -164,6 +152,6 @@ class openstack_project::gerrit (
|
|||||||
ensure => 'present',
|
ensure => 'present',
|
||||||
source => 'puppet:///modules/gerrit/patchset-created',
|
source => 'puppet:///modules/gerrit/patchset-created',
|
||||||
replace => 'true',
|
replace => 'true',
|
||||||
require => Class['gerrit']
|
require => Class['::gerrit']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -48,10 +48,11 @@ class openstack_project::review {
|
|||||||
email_private_key => hiera('gerrit_email_private_key'),
|
email_private_key => hiera('gerrit_email_private_key'),
|
||||||
}
|
}
|
||||||
class { 'gerritbot':
|
class { 'gerritbot':
|
||||||
gerritbot_nick => 'openstackgerrit',
|
nick => 'openstackgerrit',
|
||||||
gerritbot_password => hiera('gerrit_gerritbot_password'),
|
password => hiera('gerrit_gerritbot_password'),
|
||||||
gerritbot_server => 'irc.freenode.net',
|
server => 'irc.freenode.net',
|
||||||
gerritbot_user => 'gerritbot'
|
user => 'gerritbot',
|
||||||
|
virtual_hostname => $fqdn
|
||||||
}
|
}
|
||||||
class { 'gerrit::remotes':
|
class { 'gerrit::remotes':
|
||||||
upstream_projects => [ {
|
upstream_projects => [ {
|
||||||
|
18
modules/openstack_project/templates/puppet.conf.erb
Normal file
18
modules/openstack_project/templates/puppet.conf.erb
Normal 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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user