Alexandros Kosiaris has submitted this change and it was merged.
Change subject: zuul: migrate settings to role::zuul::configuration
......................................................................
zuul: migrate settings to role::zuul::configuration
Further rely on role::zuul::configuration. Will soon let us merge both
realm based classes and then split them by role (server/merger).
I also changed the Gearman server IP from 127.0.0.1 to the public
address of gallium.wikimedia.org. The Zuul merger will need to be able
to reach it so I widened the ferm rule that protects the Gearman port.
We will later on need to collect any server having zuul::merger applied.
Change-Id: I4cff5cfe27401af7c2d2f21496dcc426cc197b51
---
M manifests/role/zuul.pp
M modules/contint/manifests/firewall.pp
2 files changed, 87 insertions(+), 32 deletions(-)
Approvals:
Ottomata: Looks good to me, approved
Alexandros Kosiaris: Verified; Looks good to me, approved
jenkins-bot: Verified
diff --git a/manifests/role/zuul.pp b/manifests/role/zuul.pp
index c80d70c..ec69ef0 100644
--- a/manifests/role/zuul.pp
+++ b/manifests/role/zuul.pp
@@ -7,14 +7,58 @@
# Realm based configuration for Zuul roles.
class role::zuul::configuration {
+ $shared = {
+ 'production' => {
+ 'gearman_server' => '208.80.154.135', # gallium.wikimedia.org
+ 'git_source_branch' => 'master',
+ 'gerrit_server' => 'ytterbium.wikimedia.org',
+ 'gerrit_user' => 'jenkins-bot',
+ 'url_pattern' =>
'https://integration.wikimedia.org/ci/job/{job.name}/{build.number}/console',
+ 'status_url' => 'https://integration.wikimedia.org/zuul/',
+ },
+ 'labs' => {
+ 'gearman_server' => '127.0.0.1',
+ 'git_source_branch' => 'labs',
+ 'gerrit_server' => '127.0.0.1',
+ 'gerrit_user' => 'jenkins',
+ 'url_pattern' =>
'http://integration.wmflabs.org/ci/job/{job.name}/{build.number}/console',
+ 'status_url' =>
'http://integration.wmflabs.org/zuul/status',
+ },
+ }
+
$merger = {
'production' => {
- 'git_dir' => '/srv/ssd/zuul/git'
+ 'git_dir' => '/srv/ssd/zuul/git',
+ 'git_email' => "zuul-merger@${::hostname}",
+ 'git_name' => 'Wikimedia Zuul Merger',
+ # FIXME should be $::fqdn
+ 'zuul_url' => 'git://zuul.eqiad.wmnet',
},
'labs' => {
# FIXME migrate under /data/project whenever bug 64868 is solved
# 'git_dir' => '/data/project/zuul/git',
- 'git_dir' => '/srv/zuul/git'
+ 'git_dir' => '/srv/zuul/git',
+ 'git_email' => "zuul-merger@${::hostname}",
+ 'git_name' => 'Wikimedia Zuul Merger',
+ # FIXME should be $::fqdn
+ 'zuul_url' => 'git://localhost',
+ },
+ }
+
+ $server = {
+ 'production' => {
+ 'config_git_branch' => 'master',
+ 'gearman_server_start' => true,
+ 'jenkins_server' => 'http://127.0.0.1:8080/ci',
+ 'jenkins_user' => 'zuul-bot',
+ 'statsd_host' => 'statsd.eqiad.wmnet',
+ },
+ 'labs' => {
+ 'config_git_branch' => 'labs',
+ 'gearman_server_start' => true,
+ 'jenkins_server' => 'http://127.0.0.1:8080/ci',
+ 'jenkins_user' => 'zuul',
+ 'statsd_host' => '',
},
}
@@ -32,25 +76,30 @@
role::zuul::configuration
class { '::zuul':
- git_source_branch => 'labs',
+ git_source_branch =>
$role::zuul::configuration::shared[$::realm]['git_source_branch'],
}
# Setup the instance for labs usage
zuulwikimedia::instance { 'zuul-labs':
- gearman_server => '127.0.0.1',
- gearman_server_start => true,
- jenkins_server => 'http://127.0.0.1:8080/ci',
- jenkins_user => 'zuul',
- gerrit_server => '127.0.0.1',
- gerrit_user => 'jenkins',
- url_pattern =>
'http://integration.wmflabs.org/ci/job/{job.name}/{build.number}/console',
- status_url => 'http://integration.wmflabs.org/zuul/status',
- zuul_url => 'git://localhost',
- config_git_branch => 'labs',
+ # Server related
+ config_git_branch =>
$role::zuul::configuration::server[$::realm]['config_git_branch'],
+ gearman_server_start =>
$role::zuul::configuration::server[$::realm]['gearman_server_start'],
+ jenkins_server =>
$role::zuul::configuration::server[$::realm]['jenkins_server'],
+ jenkins_user =>
$role::zuul::configuration::server[$::realm]['jenkins_user'],
+ statsd_host =>
$role::zuul::configuration::server[$::realm]['statsd_host'],
+
+ # Shared settings
+ gearman_server =>
$role::zuul::configuration::shared[$::realm]['gearman_server'],
+ gerrit_server =>
$role::zuul::configuration::shared[$::realm]['gerrit_server'],
+ gerrit_user =>
$role::zuul::configuration::shared[$::realm]['gerrit_user'],
+ url_pattern =>
$role::zuul::configuration::shared[$::realm]['url_pattern'],
+ status_url =>
$role::zuul::configuration::shared[$::realm]['status_url'],
+
+ # Merger related
git_dir =>
$role::zuul::configuration::merger[$::realm]['git_dir'],
- statsd_host => '',
- git_email => "zuul-merger@${::instancename}",
- git_name => 'Wikimedia Zuul Merger',
+ git_email =>
$role::zuul::configuration::merger[$::realm]['git_email'],
+ git_name =>
$role::zuul::configuration::merger[$::realm]['git_name'],
+ zuul_url =>
$role::zuul::configuration::merger[$::realm]['zuul_url'],
}
# Serves Zuul git repositories
@@ -78,25 +127,30 @@
include contint::proxy_zuul
class { '::zuul':
- git_source_branch => 'master',
+ git_source_branch =>
$role::zuul::configuration::shared[$::realm]['git_source_branch'],
}
# TODO: should require Mount['/srv/ssd']
zuulwikimedia::instance { 'zuul-production':
- gearman_server => '127.0.0.1',
- gearman_server_start => true,
- jenkins_server => 'http://127.0.0.1:8080/ci',
- jenkins_user => 'zuul-bot',
- gerrit_server => 'ytterbium.wikimedia.org',
- gerrit_user => 'jenkins-bot',
- url_pattern =>
'https://integration.wikimedia.org/ci/job/{job.name}/{build.number}/console',
- status_url => 'https://integration.wikimedia.org/zuul/',
- zuul_url => 'git://zuul.eqiad.wmnet',
- config_git_branch => 'master',
+ # Server related
+ config_git_branch =>
$role::zuul::configuration::server[$::realm]['config_git_branch'],
+ gearman_server_start =>
$role::zuul::configuration::server[$::realm]['gearman_server_start'],
+ jenkins_server =>
$role::zuul::configuration::server[$::realm]['jenkins_server'],
+ jenkins_user =>
$role::zuul::configuration::server[$::realm]['jenkins_user'],
+ statsd_host =>
$role::zuul::configuration::server[$::realm]['statsd_host'],
+
+ # Shared settings
+ gearman_server =>
$role::zuul::configuration::shared[$::realm]['gearman_server'],
+ gerrit_server =>
$role::zuul::configuration::shared[$::realm]['gerrit_server'],
+ gerrit_user =>
$role::zuul::configuration::shared[$::realm]['gerrit_user'],
+ url_pattern =>
$role::zuul::configuration::shared[$::realm]['url_pattern'],
+ status_url =>
$role::zuul::configuration::shared[$::realm]['status_url'],
+
+ # Merger related
git_dir =>
$role::zuul::configuration::merger[$::realm]['git_dir'],
- statsd_host => 'statsd.eqiad.wmnet',
- git_email => "zuul-merger@${::hostname}",
- git_name => 'Wikimedia Zuul Merger',
+ git_email =>
$role::zuul::configuration::merger[$::realm]['git_email'],
+ git_name =>
$role::zuul::configuration::merger[$::realm]['git_name'],
+ zuul_url =>
$role::zuul::configuration::merger[$::realm]['zuul_url'],
}
# Serves Zuul git repositories on git://zuul.eqiad.wmnet/...
diff --git a/modules/contint/manifests/firewall.pp
b/modules/contint/manifests/firewall.pp
index be66c42..cf530cb 100644
--- a/modules/contint/manifests/firewall.pp
+++ b/modules/contint/manifests/firewall.pp
@@ -15,9 +15,10 @@
rule => 'proto tcp dport 8001 { saddr (127.0.0.1 ::1) ACCEPT; }'
}
# Gearman is used between Zuul and the Jenkin master, both on the same
- # server and communicating over localhost
+ # server and communicating over localhost.
+ # It is also used by Zuul merger daemon. The IPs will need to be collected
ferm::rule { 'gearman_localhost_only':
- rule => 'proto tcp dport 4730 { saddr (127.0.0.1 ::1) ACCEPT; }'
+ rule => 'proto tcp dport 4730 { saddr (127.0.0.1 208.80.154.135 ::1)
ACCEPT; }'
}
# The master runs a git-daemon process used by slave to fetch changes from
--
To view, visit https://gerrit.wikimedia.org/r/144709
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4cff5cfe27401af7c2d2f21496dcc426cc197b51
Gerrit-PatchSet: 10
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits