Dzahn has submitted this change and it was merged. 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(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/modules/dumps/manifests/zim.pp b/modules/dumps/manifests/zim.pp index 4df7089..786ec57 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: merged Gerrit-Change-Id: Iecc2871e9499eeb2b98fdb11eb660818a2630782 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: ArielGlenn <ar...@wikimedia.org> Gerrit-Reviewer: Dzahn <dz...@wikimedia.org> Gerrit-Reviewer: GWicke <gwi...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits