Dzahn has submitted this change and it was merged.

Change subject: contint: proxy the colocated Gerrit instance
......................................................................


contint: proxy the colocated Gerrit instance

Listening on port 8082 and on the host integration.wmflabs.org.

Change-Id: Ib9f31a330c193b807bfb119469b1bdd3155249e9
---
A modules/contint/files/apache/proxy_gerrit
A modules/contint/manifests/proxy_gerrit.pp
M modules/contint/manifests/website/labs.pp
3 files changed, 36 insertions(+), 0 deletions(-)

Approvals:
  Hashar: Verified; Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Dzahn: Looks good to me, approved



diff --git a/modules/contint/files/apache/proxy_gerrit 
b/modules/contint/files/apache/proxy_gerrit
new file mode 100644
index 0000000..7005b29
--- /dev/null
+++ b/modules/contint/files/apache/proxy_gerrit
@@ -0,0 +1,17 @@
+#####################################################################
+### THIS FILE IS MANAGED BY PUPPET
+### puppet:///modules/contint/apache/proxy_gerrit
+#####################################################################
+# vim: filetype=apache
+
+ProxyPass            /gerrit/ http://localhost:8082/ nocanon
+ProxyRequests        Off
+ProxyVia             Off
+ProxyPreserveHost    On
+
+AllowEncodedSlashes  On
+
+<Proxy http://localhost:8082/*>
+    Order deny,allow
+    Allow from all
+</Proxy>
diff --git a/modules/contint/manifests/proxy_gerrit.pp 
b/modules/contint/manifests/proxy_gerrit.pp
new file mode 100644
index 0000000..a60d5c3
--- /dev/null
+++ b/modules/contint/manifests/proxy_gerrit.pp
@@ -0,0 +1,16 @@
+# A http proxy in front of Gerrit page
+# Only meant to be used on labs
+class contint::proxy_gerrit {
+
+    if $::realm != 'labs' {
+        fail( "contint::proxy_gerrit must only be used on labs")
+    }
+
+    file { '/etc/apache2/gerrit_proxy':
+        owner  => 'root',
+        group  => 'root',
+        mode   => '0444',
+        source => 'puppet:///modules/contint/apache/proxy_gerrit',
+    }
+}
+
diff --git a/modules/contint/manifests/website/labs.pp 
b/modules/contint/manifests/website/labs.pp
index 7131e02..7695851 100644
--- a/modules/contint/manifests/website/labs.pp
+++ b/modules/contint/manifests/website/labs.pp
@@ -1,5 +1,8 @@
 class contint::website::labs {
 
+    # The contint dev instance also has Gerrit
+    include contint::proxy_gerrit
+
     apache::site { 'integrationlabs':
         content => template('contint/apache/integration.wmflabs.org.erb'),
     }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib9f31a330c193b807bfb119469b1bdd3155249e9
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: ArielGlenn <[email protected]>
Gerrit-Reviewer: Dzahn <[email protected]>
Gerrit-Reviewer: Faidon Liambotis <[email protected]>
Gerrit-Reviewer: Filippo Giunchedi <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Mark Bergsma <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to