Break out openstack_project::server from zuul_prod.pp

Change-Id: I1a38a283ed0fe06d51a57b3c43ca708978132255
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2017-02-07 15:05:42 -05:00
parent f13efacb5f
commit ab30c8d249
2 changed files with 28 additions and 32 deletions

View File

@ -1011,6 +1011,34 @@ node /^nb\d+\.openstack\.org$/ {
# Node-OS: trusty
node 'zuul.openstack.org' {
$gearman_workers = [
'nodepool.openstack.org',
'zlstatic01.openstack.org',
'zl01.openstack.org',
'zl02.openstack.org',
'zl03.openstack.org',
'zl04.openstack.org',
'zl05.openstack.org',
'zl06.openstack.org',
'zl07.openstack.org',
'zm01.openstack.org',
'zm02.openstack.org',
'zm03.openstack.org',
'zm04.openstack.org',
'zm05.openstack.org',
'zm06.openstack.org',
'zm07.openstack.org',
'zm08.openstack.org',
]
$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, 443],
iptables_rules6 => $iptables_rules,
iptables_rules4 => $iptables_rules,
sysadmins => hiera('sysadmins', []),
}
class { 'openstack_project::zuul_prod':
project_config_repo => 'https://git.openstack.org/openstack-infra/project-config',
gerrit_server => 'review.openstack.org',
@ -1022,27 +1050,7 @@ node 'zuul.openstack.org' {
proxy_ssl_key_file_contents => hiera('zuul_ssl_key_file_contents'),
proxy_ssl_chain_file_contents => hiera('zuul_ssl_chain_file_contents'),
zuul_url => 'http://zuul.openstack.org/p',
sysadmins => hiera('sysadmins', []),
statsd_host => 'graphite.openstack.org',
gearman_workers => [
'nodepool.openstack.org',
'zlstatic01.openstack.org',
'zl01.openstack.org',
'zl02.openstack.org',
'zl03.openstack.org',
'zl04.openstack.org',
'zl05.openstack.org',
'zl06.openstack.org',
'zl07.openstack.org',
'zm01.openstack.org',
'zm02.openstack.org',
'zm03.openstack.org',
'zm04.openstack.org',
'zm05.openstack.org',
'zm06.openstack.org',
'zm07.openstack.org',
'zm08.openstack.org',
],
}
}

View File

@ -22,23 +22,11 @@ class openstack_project::zuul_prod(
$proxy_ssl_cert_file_contents = '',
$proxy_ssl_key_file_contents = '',
$proxy_ssl_chain_file_contents = '',
$sysadmins = [],
$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')
class { 'openstack_project::server':
iptables_public_tcp_ports => [80, 443],
iptables_rules6 => $iptables_rules,
iptables_rules4 => $iptables_rules,
sysadmins => $sysadmins,
}
class { 'openstackci::zuul_scheduler':
vhost_name => $vhost_name,
gearman_server => $gearman_server,