Update apache and backups for json suffix removal
Zuul is about to remove .json suffixes from the REST endpoints. Update the puppet to deal with that. Change-Id: Ic1df0c01eec57f163ce332518ebc560e77b92bf3 Depends-On: https://review.openstack.org/537010
This commit is contained in:
parent
eb2a5f81b1
commit
7e99dca02d
|
@ -91,9 +91,9 @@ class zuul::web (
|
|||
# can query it easily should the need arise.
|
||||
# If the status.json is unavailable for download, no new files are created.
|
||||
if $zuul::proxy_ssl_cert_file_contents != '' {
|
||||
$status = "https://${zuul::vhost_name}/status.json"
|
||||
$status = "https://${zuul::vhost_name}/status"
|
||||
} else {
|
||||
$status = "http://${zuul::vhost_name}/status.json"
|
||||
$status = "http://${zuul::vhost_name}/status"
|
||||
}
|
||||
cron { 'zuul_scheduler_status_backup':
|
||||
user => 'root',
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
RewriteEngine on
|
||||
<% @block_referers.each do |referer| -%>
|
||||
RewriteCond %{HTTP_REFERER} =<%= referer %>
|
||||
RewriteRule ^/status - [F]
|
||||
RewriteCond %{HTTP_REFERER} =<%= referer %>
|
||||
RewriteRule ^/status.json - [F]
|
||||
<% end -%>
|
||||
|
||||
|
@ -41,10 +43,13 @@
|
|||
|
||||
<% if @zuulv3 %>
|
||||
RewriteRule ^/connection/(.*) <%= @zuul_web_url %>/connection/$1 [P]
|
||||
RewriteRule ^/status <%= @zuul_web_full_url %>/status [P]
|
||||
RewriteRule ^/status.json <%= @zuul_web_full_url %>/status.json [P]
|
||||
RewriteRule ^/status.html <%= @zuul_web_full_url %>/status.html [P]
|
||||
RewriteRule ^/jobs <%= @zuul_web_full_url %>/jobs [P]
|
||||
RewriteRule ^/jobs.json <%= @zuul_web_full_url %>/jobs.json [P]
|
||||
RewriteRule ^/jobs.html <%= @zuul_web_full_url %>/jobs.html [P]
|
||||
RewriteRule ^/builds <%= @zuul_web_full_url %>/builds [P]
|
||||
RewriteRule ^/builds.json <%= @zuul_web_full_url %>/builds.json [P]
|
||||
RewriteRule ^/builds.html <%= @zuul_web_full_url %>/builds.html [P]
|
||||
RewriteRule ^/console-stream <%= @zuul_web_full_url.sub('http://', 'ws://') %>/console-stream [P]
|
||||
|
@ -65,7 +70,12 @@
|
|||
<IfModule mod_cache.c>
|
||||
CacheDefaultExpire 5
|
||||
<IfModule mod_mem_cache.c>
|
||||
<% if @zuulv3 %>
|
||||
CacheEnable mem /status
|
||||
CacheEnable mem /status.json
|
||||
<% else %>
|
||||
CacheEnable mem /status.json
|
||||
<% end %>
|
||||
# 12MByte total cache size.
|
||||
MCacheSize 12288
|
||||
MCacheMaxObjectCount 10
|
||||
|
@ -75,7 +85,12 @@
|
|||
MCacheMaxStreamingBuffer 8388608
|
||||
</IfModule>
|
||||
<IfModule mod_cache_disk.c>
|
||||
<% if @zuulv3 %>
|
||||
CacheEnable disk /status
|
||||
CacheEnable disk /status.json
|
||||
<% else %>
|
||||
CacheEnable disk /status.json
|
||||
<% end %>
|
||||
CacheRoot /var/cache/apache2/mod_cache_disk
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
@ -113,6 +128,8 @@
|
|||
RewriteEngine on
|
||||
<% @block_referers.each do |referer| -%>
|
||||
RewriteCond %{HTTP_REFERER} =<%= referer %>
|
||||
RewriteRule ^/status - [F]
|
||||
RewriteCond %{HTTP_REFERER} =<%= referer %>
|
||||
RewriteRule ^/status.json - [F]
|
||||
<% end -%>
|
||||
<% unless @zuulv3 %>
|
||||
|
@ -122,10 +139,13 @@
|
|||
|
||||
<% if @zuulv3 %>
|
||||
RewriteRule ^/connection/(.*) <%= @zuul_web_url %>/connection/$1 [P]
|
||||
RewriteRule ^/status <%= @zuul_web_full_url %>/status [P]
|
||||
RewriteRule ^/status.json <%= @zuul_web_full_url %>/status.json [P]
|
||||
RewriteRule ^/status.html <%= @zuul_web_full_url %>/status.html [P]
|
||||
RewriteRule ^/jobs <%= @zuul_web_full_url %>/jobs [P]
|
||||
RewriteRule ^/jobs.json <%= @zuul_web_full_url %>/jobs.json [P]
|
||||
RewriteRule ^/jobs.html <%= @zuul_web_full_url %>/jobs.html [P]
|
||||
RewriteRule ^/builds <%= @zuul_web_full_url %>/builds [P]
|
||||
RewriteRule ^/builds.json <%= @zuul_web_full_url %>/builds.json [P]
|
||||
RewriteRule ^/builds.html <%= @zuul_web_full_url %>/builds.html [P]
|
||||
RewriteRule ^/console-stream <%= @zuul_web_full_url.sub('http://', 'ws://') %>/console-stream [P]
|
||||
|
@ -146,7 +166,12 @@
|
|||
<IfModule mod_cache.c>
|
||||
CacheDefaultExpire 5
|
||||
<IfModule mod_mem_cache.c>
|
||||
<% if @zuulv3 %>
|
||||
CacheEnable mem /status
|
||||
CacheEnable mem /status.json
|
||||
<% else %>
|
||||
CacheEnable mem /status.json
|
||||
<% end %>
|
||||
# 12MByte total cache size.
|
||||
MCacheSize 12288
|
||||
MCacheMaxObjectCount 10
|
||||
|
@ -156,7 +181,12 @@
|
|||
MCacheMaxStreamingBuffer 8388608
|
||||
</IfModule>
|
||||
<IfModule mod_cache_disk.c>
|
||||
<% if @zuulv3 %>
|
||||
CacheEnable disk /status
|
||||
CacheEnable disk /status.json
|
||||
<% else %>
|
||||
CacheEnable disk /status.json
|
||||
<% end %>
|
||||
CacheRoot /var/cache/apache2/mod_cache_disk
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
|
Loading…
Reference in New Issue