Yuvipanda has submitted this change and it was merged.

Change subject: Revert "tools: Do not use nginx proxy for toolschecker"
......................................................................


Revert "tools: Do not use nginx proxy for toolschecker"

Do use it, since we are still on trusty and the uwsgi version
is too old to support the --http option

This reverts commit 3c67f75a34f13570006e2b9bb9d9dd72c3772bff.

Change-Id: Ib2a4b44feca2c068dfa5f29f878c7f5274153ecd
---
M modules/toollabs/manifests/checker.pp
A modules/toollabs/templates/toolschecker.nginx.erb
M modules/toollabs/templates/toolschecker.upstart.erb
3 files changed, 20 insertions(+), 1 deletion(-)

Approvals:
  Yuvipanda: Verified; Looks good to me, approved



diff --git a/modules/toollabs/manifests/checker.pp 
b/modules/toollabs/manifests/checker.pp
index 7239b01..a9ac7dd 100644
--- a/modules/toollabs/manifests/checker.pp
+++ b/modules/toollabs/manifests/checker.pp
@@ -85,4 +85,10 @@
         ensure  => running,
         require => File['/run/toolschecker'],
     }
+
+
+    nginx::site { 'toolschecker-nginx':
+        require => Service['toolschecker'],
+        content => template('toollabs/toolschecker.nginx.erb'),
+    }
 }
diff --git a/modules/toollabs/templates/toolschecker.nginx.erb 
b/modules/toollabs/templates/toolschecker.nginx.erb
new file mode 100644
index 0000000..3f49c76
--- /dev/null
+++ b/modules/toollabs/templates/toolschecker.nginx.erb
@@ -0,0 +1,12 @@
+upstream toolschecker {
+    server unix:/run/toolschecker/toolschecker.sock;
+}
+
+server {
+    listen 80;
+
+    location / {
+        include uwsgi_params;
+        uwsgi_pass toolschecker;
+    }
+}
diff --git a/modules/toollabs/templates/toolschecker.upstart.erb 
b/modules/toollabs/templates/toolschecker.upstart.erb
index d103073..bdbf453 100644
--- a/modules/toollabs/templates/toolschecker.upstart.erb
+++ b/modules/toollabs/templates/toolschecker.upstart.erb
@@ -17,7 +17,8 @@
                     --harakiri-verbose \
                     
--wsgi-file=/usr/local/lib/python2.7/dist-packages/toolschecker.py \
                     --callable=app \
-                    --http-socket=0.0.0.0:80 \
+                    --socket=/run/toolschecker/toolschecker.sock \
+                    --chmod-socket=664 \
                     --die-on-term
 
 respawn

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib2a4b44feca2c068dfa5f29f878c7f5274153ecd
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda <[email protected]>
Gerrit-Reviewer: Yuvipanda <[email protected]>

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

Reply via email to