Dzahn has submitted this change and it was merged.

Change subject: add puppet code for endowment.wm.org site
......................................................................


add puppet code for endowment.wm.org site

Add minimal puppet module and role to setup
endowment.wikimedia.org like we do for annual.wm.org.

Bug:T136735
Change-Id: Iebea9ee1c5d2d3b9b6657b5087dd447465163fe1
---
M manifests/site.pp
A modules/endowment/files/endowment.wikimedia.org
A modules/endowment/manifests/init.pp
A modules/role/manifests/microsites/endowment.pp
4 files changed, 61 insertions(+), 1 deletion(-)

Approvals:
  jenkins-bot: Verified
  Dzahn: Looks good to me, approved



diff --git a/manifests/site.pp b/manifests/site.pp
index af687ce5..7d0f3d3 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -214,7 +214,7 @@
 
 # virtual machine for static misc. services
 node 'bromine.eqiad.wmnet' {
-    role bugzilla::static, microsites::annualreport, microsites::transparency, 
microsites::releases
+    role bugzilla::static, microsites::annualreport, microsites::transparency, 
microsites::releases, microsites::endowment
     include standard
 }
 
diff --git a/modules/endowment/files/endowment.wikimedia.org 
b/modules/endowment/files/endowment.wikimedia.org
new file mode 100644
index 0000000..1fdb6a8
--- /dev/null
+++ b/modules/endowment/files/endowment.wikimedia.org
@@ -0,0 +1,24 @@
+# vim: filetype=apache
+# https://endowment.wikimedia.org (T136735)
+
+<VirtualHost *:80>
+    ServerAdmin [email protected]
+    ServerName endowment.wikimedia.org
+
+    DocumentRoot /srv/org/wikimedia/endowment
+
+    ErrorLog /var/log/apache2/error.log
+    LogLevel warn
+    CustomLog /var/log/apache2/access.log wmf
+
+    RewriteEngine On
+    RewriteCond %{HTTP:X-Forwarded-Proto} !https
+    RewriteRule ^/(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} 
[R=301,E=ProtoRedirect]
+    Header always merge Vary X-Forwarded-Proto
+    Header always set Strict-Transport-Security "max-age=31536000"
+
+    <Directory /srv/org/wikimedia/endowment>
+        Require all granted
+    </Directory>
+
+</VirtualHost>
diff --git a/modules/endowment/manifests/init.pp 
b/modules/endowment/manifests/init.pp
new file mode 100644
index 0000000..e1b07ec
--- /dev/null
+++ b/modules/endowment/manifests/init.pp
@@ -0,0 +1,20 @@
+# sets up https://endowment.wikimedia.org/ (T136735)
+class endowment {
+
+    include ::apache
+    include ::apache::mod::headers
+
+    apache::site { 'endowment.wikimedia.org':
+        source => 'puppet:///modules/endowment/endowment.wikimedia.org',
+    }
+
+    apache::site { 'endowment.wikimedia.org':
+        source => 'puppet:///modules/endowment/endowment.wikimedia.org',
+    }
+
+    git::clone { 'wikimedia/endowment':
+        ensure    => 'latest',
+        directory => '/srv/org/wikimedia/endowment',
+        branch    => 'master',
+    }
+}
diff --git a/modules/role/manifests/microsites/endowment.pp 
b/modules/role/manifests/microsites/endowment.pp
new file mode 100644
index 0000000..f48b84e
--- /dev/null
+++ b/modules/role/manifests/microsites/endowment.pp
@@ -0,0 +1,16 @@
+# https://endowment.wikimedia.org/
+# https://meta.wikimedia.org/wiki/Endowment
+class role::microsites::endowment {
+
+    system::role { 'role::microsites::endowment': description => 
'endowment.wikimedia.org' }
+
+    include ::endowment
+    include base::firewall
+
+    ferm::service { 'endowment_http':
+        proto => 'tcp',
+        port  => '80',
+    }
+
+}
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iebea9ee1c5d2d3b9b6657b5087dd447465163fe1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <[email protected]>
Gerrit-Reviewer: Dzahn <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to