From 2447911751797f6d1d47e9c3f4a2e709e2326aba Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 7 May 2016 15:03:20 +0100 Subject: [PATCH] Make web frontends use backends in the same location --- cookbooks/web/templates/default/apache.frontend.erb | 10 ++++------ roles/bytemark.rb | 3 +++ roles/ic.rb | 3 +++ 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/cookbooks/web/templates/default/apache.frontend.erb b/cookbooks/web/templates/default/apache.frontend.erb index b4714c137..71d840c34 100644 --- a/cookbooks/web/templates/default/apache.frontend.erb +++ b/cookbooks/web/templates/default/apache.frontend.erb @@ -209,14 +209,12 @@ # ProxySet lbmethod=bybusyness +<% node[:web][:backends].each do |backend| -%> <% if port == 443 -%> - BalancerMember https://rails1 disablereuse=on - BalancerMember https://rails2 disablereuse=on - BalancerMember https://rails3 disablereuse=on + BalancerMember https://<%= backend %> disablereuse=on <% else -%> - BalancerMember http://rails1 - BalancerMember http://rails2 - BalancerMember http://rails3 + BalancerMember http://<%= backend %> +<% end -%> <% end -%> <% if port == 80 -%> diff --git a/roles/bytemark.rb b/roles/bytemark.rb index 7019492e4..d7a5f104e 100644 --- a/roles/bytemark.rb +++ b/roles/bytemark.rb @@ -25,6 +25,9 @@ default_attributes( } } } + }, + :web => { + :backends => %w(rails4 rails5) } ) diff --git a/roles/ic.rb b/roles/ic.rb index af78c9f23..16ff9ca48 100644 --- a/roles/ic.rb +++ b/roles/ic.rb @@ -28,6 +28,9 @@ default_attributes( } } } + }, + :web => { + :backends => %w(rails1 rails2 rails3) } ) -- 2.39.5