Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/382098 )

Change subject: releases: remove proxy_jenkins class, simplify
......................................................................

releases: remove proxy_jenkins class, simplify

Now the proxy_jenkins class has been reduced to a single
file definition (/etc/apache2/conf.d/ doesn't exist anymore
in the first place) and the comments.

Move the comments to the template where http and port
variables are used.

Add the parameters to the main releases class instead (currently
they won't be available in template used by apache::site so setup
doesn't work yet).

Simplify code by not having that separate class for no reason anymore.

Bug; T164030

Change-Id: Ie924774a62e728cbce2f491faec8b7ebe949ec82
---
M modules/profile/manifests/releases/mediawiki.pp
M modules/releases/manifests/init.pp
D modules/releases/manifests/proxy_jenkins.pp
M modules/releases/templates/apache-jenkins.conf.erb
4 files changed, 16 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/98/382098/1

diff --git a/modules/profile/manifests/releases/mediawiki.pp 
b/modules/profile/manifests/releases/mediawiki.pp
index d5ae29c..9315841 100644
--- a/modules/profile/manifests/releases/mediawiki.pp
+++ b/modules/profile/manifests/releases/mediawiki.pp
@@ -11,21 +11,17 @@
         umask      => '0002',
     }
 
-    class { '::releases::proxy_jenkins':
-        http_port => '8080',
-        prefix    => '/',
-    }
-
     class { '::releases':
         sitename         => 'releases.wikimedia.org',
         sitename_jenkins => 'releases-jenkins.wikimedia.org',
+        http_port => '8080',
+        prefix    => '/',
     }
 
     monitoring::service { 'http':
         description   => 'HTTP',
         check_command => 'check_http',
     }
-
 
     ferm::service { 'releases_http':
         proto => 'tcp',
diff --git a/modules/releases/manifests/init.pp 
b/modules/releases/manifests/init.pp
index 59e1200..77d29fe 100644
--- a/modules/releases/manifests/init.pp
+++ b/modules/releases/manifests/init.pp
@@ -16,7 +16,9 @@
 #
 # - the apache site config
 # - the /srv/org/wikimedia/ subdir docroot
-#
+# - a Jenkins instance for automated MW releases
+# - another separate apache site for jenkins UI
+# 
 # Because this service is intended to live behind a
 # caching cluster which would handle ssl/tls, it does not
 # install certs or configure apache for ssl/tls
@@ -25,6 +27,8 @@
         $sitename = undef,
         $sitename_jenkins = undef,
         $server_admin = 'n...@wikimedia.org',
+        $prefix = '/',
+        $http_port = '8080',
 ) {
 
     ensure_resource('file', '/srv/org', {'ensure' => 'directory' })
diff --git a/modules/releases/manifests/proxy_jenkins.pp 
b/modules/releases/manifests/proxy_jenkins.pp
deleted file mode 100644
index b78f123..0000000
--- a/modules/releases/manifests/proxy_jenkins.pp
+++ /dev/null
@@ -1,23 +0,0 @@
-# == Class releases::proxy_jenkins
-#
-# A http proxy in front of Jenkins
-#
-# [*http_port*]
-# HTTP port for a Jenkins instance webservice. Example: 8080
-#
-# [*prefix*]
-# The HTTP path used to reach the Jenkins instance. Must have a leading slash.
-# Example: /ci
-class releases::proxy_jenkins (
-    $http_port,
-    $prefix,
-) {
-
-  # run jenkins behind Apache and have pretty URLs / proxy port 80
-  # https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache
-
-  file {
-    '/etc/apache2/conf.d/jenkins_proxy':
-      ensure => absent,
-  }
-}
diff --git a/modules/releases/templates/apache-jenkins.conf.erb 
b/modules/releases/templates/apache-jenkins.conf.erb
index a4f6857..c056599 100644
--- a/modules/releases/templates/apache-jenkins.conf.erb
+++ b/modules/releases/templates/apache-jenkins.conf.erb
@@ -1,3 +1,12 @@
+# run jenkins behind Apache and have pretty URLs / proxy port 80
+# https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache
+#
+# [*http_port*]
+# HTTP port for a Jenkins instance webservice. Example: 8080
+#
+# [*prefix*]
+# The HTTP path used to reach the Jenkins instance. Must have a leading slash.
+# Example: /ci
 <VirtualHost *:80>
     ServerName <%= @sitename_jenkins %>
     ServerAdmin <%= @server_admin %>

-- 
To view, visit https://gerrit.wikimedia.org/r/382098
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie924774a62e728cbce2f491faec8b7ebe949ec82
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <dz...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to