From: Tom Hughes Date: Fri, 29 Aug 2014 14:46:31 +0000 (+0100) Subject: Remove 12.04 support in web cookbook X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/3acb5c42fb0b3963eafa4e542d11b2a48b99cefc Remove 12.04 support in web cookbook --- diff --git a/cookbooks/web/recipes/backend.rb b/cookbooks/web/recipes/backend.rb index 7dc229eeb..df22c123d 100644 --- a/cookbooks/web/recipes/backend.rb +++ b/cookbooks/web/recipes/backend.rb @@ -26,13 +26,8 @@ web_passwords = data_bag_item("web", "passwords") apache_module "remoteip" apache_module "rewrite" - -if node[:lsb][:release].to_f >= 14.04 - apache_module "proxy" - apache_module "proxy_fcgi" -else - apache_module "fastcgi-handler" -end +apache_module "proxy" +apache_module "proxy_fcgi" apache_site "default" do action [ :disable ] diff --git a/cookbooks/web/recipes/cgimap.rb b/cookbooks/web/recipes/cgimap.rb index 8553d6ff5..4a8ab12c1 100644 --- a/cookbooks/web/recipes/cgimap.rb +++ b/cookbooks/web/recipes/cgimap.rb @@ -40,12 +40,6 @@ cgimap_directory = "#{node[:web][:base_directory]}/cgimap" pid_directory = node[:web][:pid_directory] log_directory = node[:web][:log_directory] -if node[:lsb][:release].to_f >= 14.04 - libdir = "/usr/lib/x86_64-linux-gnu" -else - libdir = "/usr/lib" -end - execute "cgimap-build" do action :nothing command "make" @@ -56,7 +50,7 @@ end execute "cgimap-configure" do action :nothing - command "./configure --with-fcgi=/usr --with-boost-libdir=#{libdir}" + command "./configure --with-fcgi=/usr --with-boost-libdir=/usr/lib/x86_64-linux-gnu" cwd cgimap_directory user "rails" group "rails" diff --git a/cookbooks/web/recipes/frontend.rb b/cookbooks/web/recipes/frontend.rb index 7b32ed3d1..e1adc5d56 100644 --- a/cookbooks/web/recipes/frontend.rb +++ b/cookbooks/web/recipes/frontend.rb @@ -28,10 +28,8 @@ apache_module "expires" apache_module "headers" apache_module "proxy_http" apache_module "proxy_balancer" -if node[:lsb][:release].to_f >= 14.04 - apache_module "lbmethod_byrequests" - apache_module "lbmethod_bybusyness" -end +apache_module "lbmethod_byrequests" +apache_module "lbmethod_bybusyness" apache_module "rewrite" apache_site "default" do diff --git a/cookbooks/web/templates/default/apache.backend.erb b/cookbooks/web/templates/default/apache.backend.erb index fb23055fe..6128b322c 100644 --- a/cookbooks/web/templates/default/apache.backend.erb +++ b/cookbooks/web/templates/default/apache.backend.erb @@ -47,26 +47,14 @@ # # Pass supported calls to cgimap # -<% if node[:lsb][:release].to_f >= 14.04 -%> RewriteRule ^/api/0\.6/map$ fcgi://127.0.0.1:8000$0 [P] -<% else -%> - RewriteRule ^/api/0\.6/map$ - [H=fcgi:127.0.0.1:8000] -<% end -%> RewriteCond %{REQUEST_METHOD} ^(HEAD|GET)$ -<% if node[:lsb][:release].to_f >= 14.04 -%> RewriteRule ^/api/0\.6/(node|way|relation)/[0-9]+$ fcgi://127.0.0.1:8000$0 [P] RewriteRule ^/api/0\.6/(way|relation)/[0-9]+/full$ fcgi://127.0.0.1:8000$0 [P] RewriteRule ^/api/0\.6/(nodes|ways|relations)$ fcgi://127.0.0.1:8000$0 [P] -<% else -%> - RewriteRule ^/api/0\.6/(node|way|relation)/[0-9]+$ - [H=fcgi:127.0.0.1:8000] - RewriteRule ^/api/0\.6/(way|relation)/[0-9]+/full$ - [H=fcgi:127.0.0.1:8000] - RewriteRule ^/api/0\.6/(nodes|ways|relations)$ - [H=fcgi:127.0.0.1:8000] -<% end -%> <% end -%> -<% if node[:lsb][:release].to_f >= 14.04 -%> /rails/public> Require all granted -<% end -%> diff --git a/cookbooks/web/templates/default/apache.frontend.erb b/cookbooks/web/templates/default/apache.frontend.erb index d82b7e1da..bcb9af005 100644 --- a/cookbooks/web/templates/default/apache.frontend.erb +++ b/cookbooks/web/templates/default/apache.frontend.erb @@ -298,7 +298,6 @@ RedirectPermanent /events.ics http://calendar.openstreetmap.org.uk/events.ics RedirectPermanent / http://www.openstreetmap.org/ -<% if node[:lsb][:release].to_f >= 14.04 -%> /rails/public> Require all granted @@ -323,4 +322,3 @@ Require all granted -<% end -%>