Use openstackci module for zuul_merger zuul_prod and zuul_dev

Depends-On: I48e49c760d5304bd7dd5b0bbbdaa27329b2d8a5f

Change-Id: I98ab36cca49f8784fc93c46db69bc2a777a61938
This commit is contained in:
Fabien Boucher 2015-04-21 17:19:48 +00:00 committed by Ramy Asselin
parent b3b7a48d63
commit 9bdf19978e
3 changed files with 39 additions and 104 deletions

View File

@ -30,49 +30,25 @@ class openstack_project::zuul_dev(
sysadmins => $sysadmins,
}
class { 'project_config':
url => $project_config_repo,
base => 'dev/',
class { 'openstackci::zuul_scheduler':
vhost_name => $vhost_name,
gearman_server => $gearman_server,
gerrit_server => $gerrit_server,
gerrit_user => $gerrit_user,
known_hosts_content => "review-dev.openstack.org,23.253.78.13,2001:4800:7817:101:be76:4eff:fe04 ${gerrit_ssh_host_key}",
zuul_ssh_private_key => $zuul_ssh_private_key,
url_pattern => $url_pattern,
zuul_url => $zuul_url,
job_name_in_report => true,
status_url => $status_url,
statsd_host => $statsd_host,
git_email => 'jenkins@openstack.org',
git_name => 'OpenStack Jenkins',
project_config_repo => $project_config_repo,
project_config_base => 'dev/',
}
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 => $status_url,
statsd_host => $statsd_host,
git_email => 'jenkins@openstack.org',
git_name => 'OpenStack Jenkins',
}
class { '::zuul::server':
layout_dir => $::project_config::zuul_layout_dir,
require => $::project_config::config_dir,
}
class { '::zuul::merger': }
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-dev.openstack.org,23.253.78.13,2001:4800:7817:101:be76:4eff:fe04 ${gerrit_ssh_host_key}",
replace => true,
require => File['/home/zuul/.ssh'],
}
class { 'openstackci::zuul_merger':
manage_common_zuul => false,
}
}

View File

@ -9,6 +9,8 @@ class openstack_project::zuul_merger(
$zuul_ssh_private_key = '',
$zuul_url = "http://${::fqdn}/p",
$sysadmins = [],
$git_email = 'jenkins@openstack.org',
$git_name = 'OpenStack Jenkins',
) {
class { 'openstack_project::server':
@ -16,35 +18,16 @@ class openstack_project::zuul_merger(
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,
zuul_url => $zuul_url,
git_email => 'jenkins@openstack.org',
git_name => 'OpenStack Jenkins',
}
class { '::zuul::merger': }
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'],
}
class { 'openstackci::zuul_merger':
vhost_name => $vhost_name,
gearman_server => $gearman_server,
gerrit_server => $gerrit_server,
gerrit_user => $gerrit_user,
known_hosts_content => "review.openstack.org,23.253.232.87,2001:4800:7815:104:3bc3:d7f6:ff03:bf5d ${gerrit_ssh_host_key}",
zuul_ssh_private_key => $zuul_ssh_private_key,
zuul_url => $zuul_url,
git_email => $git_email,
git_name => $git_name,
manage_common_zuul => true,
}
}

View File

@ -26,6 +26,8 @@ class openstack_project::zuul_prod(
$statsd_host = '',
$gearman_workers = [],
$project_config_repo = '',
$git_email = 'jenkins@openstack.org',
$git_name = 'OpenStack Jenkins',
) {
# 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')
@ -37,23 +39,17 @@ class openstack_project::zuul_prod(
sysadmins => $sysadmins,
}
class { 'project_config':
url => $project_config_repo,
}
class { '::zuul':
class { 'openstackci::zuul_scheduler':
vhost_name => $vhost_name,
gearman_server => $gearman_server,
gerrit_server => $gerrit_server,
gerrit_user => $gerrit_user,
known_hosts_content => "review.openstack.org,104.130.159.134,2001:4800:7818:102:be76:4eff:fe05:9b12 ${gerrit_ssh_host_key}",
zuul_ssh_private_key => $zuul_ssh_private_key,
url_pattern => $url_pattern,
zuul_url => $zuul_url,
job_name_in_report => true,
status_url => $status_url,
statsd_host => $statsd_host,
git_email => 'jenkins@openstack.org',
git_name => 'OpenStack Jenkins',
swift_authurl => $swift_authurl,
swift_auth_version => $swift_auth_version,
swift_user => $swift_user,
@ -66,29 +62,9 @@ class openstack_project::zuul_prod(
proxy_ssl_cert_file_contents => $proxy_ssl_cert_file_contents,
proxy_ssl_key_file_contents => $proxy_ssl_key_file_contents,
proxy_ssl_chain_file_contents => $proxy_ssl_chain_file_contents,
}
class { '::zuul::server':
layout_dir => $::project_config::zuul_layout_dir,
require => $::project_config::config_dir,
}
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,104.130.159.134,2001:4800:7818:102:be76:4eff:fe05:9b12 ${gerrit_ssh_host_key}",
replace => true,
require => File['/home/zuul/.ssh'],
}
statsd_host => $statsd_host,
project_config_repo => $project_config_repo,
git_email => $git_email,
git_name => $git_name,
}
}