ArielGlenn has uploaded a new change for review. https://gerrit.wikimedia.org/r/204257
Change subject: html dumps will be served from host where they are produced, via proxy ...................................................................... html dumps will be served from host where they are produced, via proxy add the proxy piece to dumps server; add the nginx server piece to zim class Change-Id: Iecc2871e9499eeb2b98fdb11eb660818a2630782 --- M modules/dumps/manifests/zim.pp M modules/dumps/templates/nginx.dumps.conf.erb 2 files changed, 40 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/57/204257/1 diff --git a/modules/dumps/manifests/zim.pp b/modules/dumps/manifests/zim.pp index 4df7089..3c3a463 100644 --- a/modules/dumps/manifests/zim.pp +++ b/modules/dumps/manifests/zim.pp @@ -9,4 +9,33 @@ ensure => present, } + # nginx serving these via http only, with another host + # proxying all requests. can't use the standard dumps nginx + # manifest. all of the code below is for this setup, which + # is temporary. + + file { '/srv/www': + ensure => directory, + mode => '0755', + owner => 'root', + group => 'www-data', + } + + file { '/srv/www/htmldumps': + ensure => directory, + mode => '0755', + owner => 'root', + group => 'www-data', + } + + # don't know if we want bw limits etc so let's slap 'extras' + # on there + class { '::nginx': + variant => 'extras', + } + + nginx::site { 'zim': + source => 'puppet:///modules/dumps/nginx.zim.conf' + notify => Service['nginx'], + } } diff --git a/modules/dumps/templates/nginx.dumps.conf.erb b/modules/dumps/templates/nginx.dumps.conf.erb index 9984a49..715f2bf 100644 --- a/modules/dumps/templates/nginx.dumps.conf.erb +++ b/modules/dumps/templates/nginx.dumps.conf.erb @@ -25,4 +25,15 @@ rewrite ^/other/(iOS|PlayBook|win8|android)(|/.*)$ $scheme://releases.wikimedia.org/mobile/$1$2 break; rewrite ^/(other/)?mediawiki(|/.*)$ $scheme://releases.wikimedia.org/mediawiki$2 break; + + # for now we proxy for html (openzim style) dumps + location /htmldumps { + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_pass http://francium.eqiad.wmnet; + limit_rate 8192k; + limit_rate_after 1m; + limit_conn addr 5; + } } -- To view, visit https://gerrit.wikimedia.org/r/204257 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iecc2871e9499eeb2b98fdb11eb660818a2630782 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn <ar...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits