Dzahn has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/382214 )
Change subject: releases-jenkins: fix proxy setup, prefix setting ...................................................................... releases-jenkins: fix proxy setup, prefix setting Also add prefix and http_proxy variables to Hiera and as profile parameters as they are used in Apache template. Fix config, the slash character should not be part of the prefix variable. Bug: T164030 Change-Id: Ib41ca5763b6ce82a3e6661bf79bbb3cd02f642f7 --- M hieradata/role/common/releases.yaml M modules/profile/manifests/releases/mediawiki.pp M modules/releases/templates/apache-jenkins.conf.erb 3 files changed, 12 insertions(+), 8 deletions(-) Approvals: jenkins-bot: Verified Dzahn: Looks good to me, approved diff --git a/hieradata/role/common/releases.yaml b/hieradata/role/common/releases.yaml index e1438be..469f8f2 100644 --- a/hieradata/role/common/releases.yaml +++ b/hieradata/role/common/releases.yaml @@ -5,3 +5,5 @@ profile::releases::mediawiki::sitename: 'releases.wikimedia.org' profile::releases::mediawiki::sitename_jenkins: 'releases-jenkins.wikimedia.org' profile::releases::mediawiki::server_admin: 'n...@wikimedia.org' +profile::releases::mediawiki::prefix: '' +profile::releases::mediawiki::http_port: '8080' diff --git a/modules/profile/manifests/releases/mediawiki.pp b/modules/profile/manifests/releases/mediawiki.pp index a924cea..f68ce91 100644 --- a/modules/profile/manifests/releases/mediawiki.pp +++ b/modules/profile/manifests/releases/mediawiki.pp @@ -3,6 +3,8 @@ class profile::releases::mediawiki ( $sitename = hiera('profile::releases::mediawiki::sitename'), $sitename_jenkins = hiera('profile::releases::mediawiki::sitename_jenkins'), + $prefix = hiera('profile::releases::mediawiki::prefix'), + $http_port = hiera('profile::releases::mediawiki::http_port'), $server_admin = hiera('profile::releases::mediawiki::server_admin'), $active_server = hiera('releases_server'), $passive_server = hiera('releases_server_failover'), diff --git a/modules/releases/templates/apache-jenkins.conf.erb b/modules/releases/templates/apache-jenkins.conf.erb index c056599..1d73e51 100644 --- a/modules/releases/templates/apache-jenkins.conf.erb +++ b/modules/releases/templates/apache-jenkins.conf.erb @@ -16,8 +16,8 @@ ProxyRequests Off ProxyVia Off ProxyPreserveHost On - ProxyPass <%= @prefix -%> http://127.0.0.1:<%= @http_port -%><%= @prefix -%>/ retry=0 nocanon - ProxyPassReverse /ci http://localhost:<%= @http_port -%><%= @prefix -%> + ProxyPass /<%= @prefix -%> http://127.0.0.1:<%= @http_port -%><%= @prefix -%>/ retry=0 nocanon + ProxyPassReverse /<%= @prefix -%> http://localhost:<%= @http_port -%><%= @prefix -%> ErrorLog /var/log/apache2/<%= @sitename_jenkins %>.error.log @@ -53,15 +53,15 @@ # successfullyy created and fails beacuse it is server the cached 404). SetEnvIf Request_URI .*/api/json.* NO_CACHE Header set Cache-Control "no-cache,must-revalidate" env=NO_CACHE - + # Prevent access to certain URLs - T63964 - SetEnvIf Request_URI <%= @prefix -%>/computer/.*/builds DENY_BUILDS_ACCESS - SetEnvIf Request_URI <%= @prefix -%>/user/.*/builds DENY_BUILDS_ACCESS - SetEnvIf Request_URI <%= @prefix -%>/view/.*/builds DENY_BUILDS_ACCESS + SetEnvIf Request_URI ^<%= @prefix -%>/computer/.*/builds DENY_BUILDS_ACCESS + SetEnvIf Request_URI ^<%= @prefix -%>/user/.*/builds DENY_BUILDS_ACCESS + SetEnvIf Request_URI ^<%= @prefix -%>/view/.*/builds DENY_BUILDS_ACCESS # Blacklist RSS feeds entirely - SetEnvIf Request_URI <%= @prefix -%>/.*/rss(All|Failed|Latest) DENY_BUILDS_ACCESS + SetEnvIf Request_URI ^<%= @prefix -%>/.*/rss(All|Failed|Latest) DENY_BUILDS_ACCESS Order deny,allow deny from env=DENY_BUILDS_ACCESS - </Proxy> + </Proxy> </VirtualHost> -- To view, visit https://gerrit.wikimedia.org/r/382214 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib41ca5763b6ce82a3e6661bf79bbb3cd02f642f7 Gerrit-PatchSet: 4 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Dzahn <dz...@wikimedia.org> Gerrit-Reviewer: Chad <ch...@wikimedia.org> Gerrit-Reviewer: Dzahn <dz...@wikimedia.org> Gerrit-Reviewer: Paladox <thomasmulhall...@yahoo.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits