564f8ab237
This change adds credentials as set up by fungi (2014-04-05T03:16:46)
http://eavesdrop.openstack.org/irclogs/%23openstack-infra/%23openstack-infra.2014-04-05.log
This allows zuul to send signed URL's for workers to push files to on
a per-job basis.
This change will require a zuul restart, not just a reload!
Note this is unreverts the revert in
c1b98eaff6
but is slightly edited hence
the lack of a proper revert commit. The reason for the revert has been
debugged and was due to rax identity service not providing a catalog
entry for swift when a tenant name is provided.
Change-Id: I04d3207002f7422b9851515ee88a74b19dd2f248
117 lines
3.8 KiB
Puppet
117 lines
3.8 KiB
Puppet
# == Class: openstack_project::zuul_prod
|
|
#
|
|
class openstack_project::zuul_prod(
|
|
$vhost_name = $::fqdn,
|
|
$gearman_server = '127.0.0.1',
|
|
$gerrit_server = '',
|
|
$gerrit_user = '',
|
|
$gerrit_ssh_host_key = '',
|
|
$zuul_ssh_private_key = '',
|
|
$url_pattern = '',
|
|
$zuul_url = '',
|
|
$swift_authurl = '',
|
|
$swift_user = '',
|
|
$swift_key = '',
|
|
$swift_tenant_name = '',
|
|
$swift_region_name = '',
|
|
$swift_default_container = '',
|
|
$swift_default_logserver_prefix = '',
|
|
$sysadmins = [],
|
|
$statsd_host = '',
|
|
$gearman_workers = [],
|
|
) {
|
|
# Turn a list of hostnames into a list of iptables rules
|
|
$iptables_rules = regsubst ($gearman_workers, '^(.*)$', '-m state --state NEW -m tcp -p tcp --dport 4730 -s \1 -j ACCEPT')
|
|
|
|
class { 'openstack_project::server':
|
|
iptables_public_tcp_ports => [80],
|
|
iptables_rules6 => $iptables_rules,
|
|
iptables_rules4 => $iptables_rules,
|
|
sysadmins => $sysadmins,
|
|
}
|
|
|
|
class { '::zuul':
|
|
vhost_name => $vhost_name,
|
|
gearman_server => $gearman_server,
|
|
gerrit_server => $gerrit_server,
|
|
gerrit_user => $gerrit_user,
|
|
zuul_ssh_private_key => $zuul_ssh_private_key,
|
|
url_pattern => $url_pattern,
|
|
zuul_url => $zuul_url,
|
|
job_name_in_report => true,
|
|
status_url => 'http://status.openstack.org/zuul/',
|
|
statsd_host => $statsd_host,
|
|
git_email => 'jenkins@openstack.org',
|
|
git_name => 'OpenStack Jenkins',
|
|
swift_authurl => $swift_authurl,
|
|
swift_user => $swift_user,
|
|
swift_key => $swift_key,
|
|
swift_tenant_name => $swift_tenant_name,
|
|
swift_region_name => $swift_region_name,
|
|
swift_default_container => $swift_default_container,
|
|
swift_default_logserver_prefix => $swift_default_logserver_prefix,
|
|
}
|
|
|
|
class { '::zuul::server': }
|
|
|
|
if $gerrit_ssh_host_key != '' {
|
|
file { '/home/zuul/.ssh':
|
|
ensure => directory,
|
|
owner => 'zuul',
|
|
group => 'zuul',
|
|
mode => '0700',
|
|
require => Class['::zuul'],
|
|
}
|
|
file { '/home/zuul/.ssh/known_hosts':
|
|
ensure => present,
|
|
owner => 'zuul',
|
|
group => 'zuul',
|
|
mode => '0600',
|
|
content => "review.openstack.org,23.253.232.87,2001:4800:7815:104:3bc3:d7f6:ff03:bf5d ${gerrit_ssh_host_key}",
|
|
replace => true,
|
|
require => File['/home/zuul/.ssh'],
|
|
}
|
|
}
|
|
|
|
file { '/etc/zuul/layout.yaml':
|
|
ensure => present,
|
|
source => 'puppet:///modules/openstack_project/zuul/layout.yaml',
|
|
notify => Exec['zuul-reload'],
|
|
}
|
|
|
|
file { '/etc/zuul/openstack_functions.py':
|
|
ensure => present,
|
|
source => 'puppet:///modules/openstack_project/zuul/openstack_functions.py',
|
|
notify => Exec['zuul-reload'],
|
|
}
|
|
|
|
file { '/etc/zuul/logging.conf':
|
|
ensure => present,
|
|
source => 'puppet:///modules/openstack_project/zuul/logging.conf',
|
|
notify => Exec['zuul-reload'],
|
|
}
|
|
|
|
file { '/etc/zuul/gearman-logging.conf':
|
|
ensure => present,
|
|
source => 'puppet:///modules/openstack_project/zuul/gearman-logging.conf',
|
|
notify => Exec['zuul-reload'],
|
|
}
|
|
|
|
file { '/etc/zuul/merger-logging.conf':
|
|
ensure => present,
|
|
source => 'puppet:///modules/openstack_project/zuul/merger-logging.conf',
|
|
}
|
|
|
|
class { '::recheckwatch':
|
|
gerrit_server => $gerrit_server,
|
|
gerrit_user => $gerrit_user,
|
|
recheckwatch_ssh_private_key => $zuul_ssh_private_key,
|
|
}
|
|
|
|
file { '/var/lib/recheckwatch/scoreboard.html':
|
|
ensure => present,
|
|
source => 'puppet:///modules/openstack_project/zuul/scoreboard.html',
|
|
require => File['/var/lib/recheckwatch'],
|
|
}
|
|
}
|