From: Tom Hughes Date: Sun, 8 May 2016 17:59:21 +0000 (+0100) Subject: Make web servers at Bytemark use grisu as the fileserver X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/e09a952838cef25511249a39ad8fbd203c29b9a2 Make web servers at Bytemark use grisu as the fileserver --- diff --git a/cookbooks/web/metadata.rb b/cookbooks/web/metadata.rb index 68d85c079..5058ffb2a 100644 --- a/cookbooks/web/metadata.rb +++ b/cookbooks/web/metadata.rb @@ -11,3 +11,4 @@ depends "git" depends "memcached" depends "nodejs" depends "tools" +depends "nfs" diff --git a/cookbooks/web/recipes/base.rb b/cookbooks/web/recipes/base.rb index 2258b3f84..374c970b4 100644 --- a/cookbooks/web/recipes/base.rb +++ b/cookbooks/web/recipes/base.rb @@ -17,6 +17,13 @@ # limitations under the License. # +node.set[:nfs]["/store/rails"] = { + :host => node[:web][:fileserver], + :path => "/store/rails" +} + +include_recipe "nfs" + directory node[:web][:base_directory] do group "rails" mode 02775 diff --git a/roles/bytemark.rb b/roles/bytemark.rb index 6bcffb79a..ff4e45ace 100644 --- a/roles/bytemark.rb +++ b/roles/bytemark.rb @@ -27,7 +27,8 @@ default_attributes( } }, :web => { - :backends => %w(rails4 rails5) + :backends => %w(rails4 rails5), + :fileserver => "grisu" } ) diff --git a/roles/ic.rb b/roles/ic.rb index 16ff9ca48..e33c34895 100644 --- a/roles/ic.rb +++ b/roles/ic.rb @@ -30,7 +30,8 @@ default_attributes( } }, :web => { - :backends => %w(rails1 rails2 rails3) + :backends => %w(rails1 rails2 rails3), + :fileserver => "ironbelly" } ) diff --git a/roles/web.rb b/roles/web.rb index 69b6a45d2..26e173494 100644 --- a/roles/web.rb +++ b/roles/web.rb @@ -10,9 +10,6 @@ default_attributes( } } }, - :nfs => { - "/store/rails" => { :host => "ironbelly", :path => "/store/rails" } - }, :passenger => { :pool_idle_time => 0 }, @@ -22,7 +19,3 @@ default_attributes( :readonly_database_host => "db-slave" } ) - -run_list( - "recipe[nfs]" -)