Hashar has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/399311 )
Change subject: contint: convert Apache proxying to profiles
......................................................................
contint: convert Apache proxying to profiles
Jenkins and Zuul exposes a web interface which is proxified behind a
frontend Apache. Move them to profiles.
Move the proxy up to the roles (from zuul::server and jenkins profiles).
Change-Id: Ia9d26bfbe295341742d90f2b779ca303663a7382
---
M hieradata/role/common/ci/master.yaml
D modules/contint/manifests/proxy_common.pp
M modules/profile/manifests/ci/jenkins.pp
A modules/profile/manifests/ci/proxy_common.pp
R modules/profile/manifests/ci/proxy_jenkins.pp
R modules/profile/manifests/ci/proxy_zuul.pp
M modules/profile/manifests/zuul/server.pp
M modules/role/manifests/ci/master.pp
8 files changed, 25 insertions(+), 22 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/11/399311/1
diff --git a/hieradata/role/common/ci/master.yaml
b/hieradata/role/common/ci/master.yaml
index b4d91a6..7b43002 100644
--- a/hieradata/role/common/ci/master.yaml
+++ b/hieradata/role/common/ci/master.yaml
@@ -7,6 +7,8 @@
contactgroups: 'admins,contint'
profile::ci::jenkins::prefix: '/ci'
+profile::ci::proxy_jenkins::http_port: 80
+profile::ci::proxy_jenkins::prefix: '/ci'
profile::zuul::merger::conf:
gearman_server: '208.80.154.17' # contint1001.wikimedia.org
diff --git a/modules/contint/manifests/proxy_common.pp
b/modules/contint/manifests/proxy_common.pp
deleted file mode 100644
index 2469adb..0000000
--- a/modules/contint/manifests/proxy_common.pp
+++ /dev/null
@@ -1,9 +0,0 @@
-# Basic configuration of Apache as a proxy
-class contint::proxy_common {
-
- include ::apache
- include ::apache::mod::php5
- include ::apache::mod::proxy
- include ::apache::mod::proxy_http
-
-}
diff --git a/modules/profile/manifests/ci/jenkins.pp
b/modules/profile/manifests/ci/jenkins.pp
index 296fa6f..783c1ae 100644
--- a/modules/profile/manifests/ci/jenkins.pp
+++ b/modules/profile/manifests/ci/jenkins.pp
@@ -18,11 +18,6 @@
service_enable => $service_enable,
service_monitor => $service_monitor,
}
- class { '::contint::proxy_jenkins':
- http_port => '8080',
- prefix => $prefix,
- }
-
# Nodepool spawns non ephemeral slaves which causes config-history plugin
# to fill up entries until it reaches the limit of 32k inodes. T126552
cron { 'tidy_jenkins_ephemeral_nodes_configs':
diff --git a/modules/profile/manifests/ci/proxy_common.pp
b/modules/profile/manifests/ci/proxy_common.pp
new file mode 100644
index 0000000..15d087d
--- /dev/null
+++ b/modules/profile/manifests/ci/proxy_common.pp
@@ -0,0 +1,9 @@
+# Basic configuration of Apache as a proxy
+class profile::ci::proxy_common {
+
+ class { '::apache': }
+ class { '::apache::mod::php5': }
+ class { '::apache::mod::proxy': }
+ class { '::apache::mod::proxy_http': }
+
+}
diff --git a/modules/contint/manifests/proxy_jenkins.pp
b/modules/profile/manifests/ci/proxy_jenkins.pp
similarity index 77%
rename from modules/contint/manifests/proxy_jenkins.pp
rename to modules/profile/manifests/ci/proxy_jenkins.pp
index f55848c..1fb50ef 100644
--- a/modules/contint/manifests/proxy_jenkins.pp
+++ b/modules/profile/manifests/ci/proxy_jenkins.pp
@@ -8,12 +8,13 @@
# [*prefix*]
# The HTTP path used to reach the Jenkins instance. Must have a leading slash.
# Example: /ci
-class contint::proxy_jenkins (
- $http_port,
- $prefix,
+#
+class profile::ci::proxy_jenkins (
+ $http_port = hiera('profile::ci::proxy_jenkins::http_port'),
+ $prefix = hiera('profile::ci::proxy_jenkins::prefix'),
) {
- include ::contint::proxy_common
+ require ::profile::ci::proxy_common
# run jenkins behind Apache and have pretty URLs / proxy port 80
# https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache
diff --git a/modules/contint/manifests/proxy_zuul.pp
b/modules/profile/manifests/ci/proxy_zuul.pp
similarity index 81%
rename from modules/contint/manifests/proxy_zuul.pp
rename to modules/profile/manifests/ci/proxy_zuul.pp
index fbf104d..34d8033 100644
--- a/modules/contint/manifests/proxy_zuul.pp
+++ b/modules/profile/manifests/ci/proxy_zuul.pp
@@ -1,7 +1,7 @@
# A http proxy in front of Zuul status page
-class contint::proxy_zuul {
+class profile::ci::proxy_zuul {
- include ::contint::proxy_common
+ require ::profile::ci::proxy_common
file {
'/etc/apache2/conf.d/zuul_proxy':
diff --git a/modules/profile/manifests/zuul/server.pp
b/modules/profile/manifests/zuul/server.pp
index b92379c..b5f02d1 100644
--- a/modules/profile/manifests/zuul/server.pp
+++ b/modules/profile/manifests/zuul/server.pp
@@ -7,8 +7,6 @@
) {
system::role { 'zuul::server': description => 'Zuul server (scheduler)' }
- include contint::proxy_zuul
-
$monitoring_active = $service_enable ? {
false => 'absent',
default => 'present',
diff --git a/modules/role/manifests/ci/master.pp
b/modules/role/manifests/ci/master.pp
index 5100f6b..73c97ee 100644
--- a/modules/role/manifests/ci/master.pp
+++ b/modules/role/manifests/ci/master.pp
@@ -16,12 +16,19 @@
include ::standard
include ::profile::ci::backup
include ::profile::ci::firewall
+
include ::profile::ci::jenkins
+ include ::profile::ci::proxy_jenkins
+
include ::profile::ci::slave
include ::profile::ci::website
include ::profile::ci::docker
include ::profile::ci::pipeline
include ::profile::ci::shipyard
+
include ::profile::zuul::merger
+
include ::profile::zuul::server
+ include ::profile::ci::proxy_zuul
+
}
--
To view, visit https://gerrit.wikimedia.org/r/399311
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9d26bfbe295341742d90f2b779ca303663a7382
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits