X-Git-Url: https://git.openstreetmap.org/chef.git/blobdiff_plain/18e12b0e123fc3e5f344682f884feabc12da0f5a..c9bfd42b3dc9e0792ede30b1fd5a869f25e1b235:/cookbooks/web/recipes/backend.rb diff --git a/cookbooks/web/recipes/backend.rb b/cookbooks/web/recipes/backend.rb index 0bc88cea7..0918a9123 100644 --- a/cookbooks/web/recipes/backend.rb +++ b/cookbooks/web/recipes/backend.rb @@ -36,7 +36,24 @@ end apache_site "www.openstreetmap.org" do template "apache.backend.erb" - variables :secret_key_base => web_passwords["secret_key_base"] + variables :status => node[:web][:status], + :secret_key_base => web_passwords["secret_key_base"] end node.normal[:memcached][:ip_address] = node.internal_ipaddress + +service "rails-jobs@storage" do + action [:enable, :start] + supports :restart => true + subscribes :restart, "rails_port[www.openstreetmap.org]" + subscribes :restart, "systemd_service[rails-jobs]" +end + +if node[:web][:primary_cluster] + service "rails-jobs@traces" do + action [:enable, :start] + supports :restart => true + subscribes :restart, "rails_port[www.openstreetmap.org]" + subscribes :restart, "systemd_service[rails-jobs]" + end +end