X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/5c2f951094034496e684f32aced35f1b089b59bf..2853b414b3706db2890068f45a91b170058168cd:/cookbooks/tile/recipes/default.rb diff --git a/cookbooks/tile/recipes/default.rb b/cookbooks/tile/recipes/default.rb index 9d1be8020..d1a394b2f 100644 --- a/cookbooks/tile/recipes/default.rb +++ b/cookbooks/tile/recipes/default.rb @@ -29,6 +29,7 @@ include_recipe "ruby" include_recipe "tools" blocks = data_bag_item("tile", "blocks") +admins = data_bag_item("apache", "admins") web_passwords = data_bag_item("web", "passwords") apache_module "alias" @@ -59,6 +60,14 @@ end fastlyips = JSON.parse(IO.read("#{Chef::Config[:file_cache_path]}/fastly-ip-list.json")) +remote_file "#{Chef::Config[:file_cache_path]}/statuscake-locations.json" do + source "https://app.statuscake.com/Workfloor/Locations.php?format=json" + compile_time true + ignore_failure true +end + +statuscakelocations = JSON.parse(IO.read("#{Chef::Config[:file_cache_path]}/statuscake-locations.json")) + apache_site "default" do action :disable end @@ -69,7 +78,9 @@ end apache_site "tile.openstreetmap.org" do template "apache.erb" - variables :fastly => fastlyips["addresses"] + variables :fastly => fastlyips["addresses"] + fastlyips["ipv6_addresses"], + :statuscake => statuscakelocations.flat_map { |_, v| [v["ip"], v["ipv6"]] }, + :admins => admins["hosts"] end template "/etc/logrotate.d/apache2" do @@ -114,10 +125,6 @@ systemd_service "renderd" do restart "on-failure" end -systemd_service "renderd" do - action :delete -end - service "renderd" do action [:enable, :start] subscribes :restart, "systemd_service[renderd]" @@ -205,10 +212,6 @@ service "export-cleanup.timer" do action [:enable, :start] end -file "/etc/cron.hourly/export" do - action :delete -end - directory "/srv/tile.openstreetmap.org/data" do owner "tile" group "tile"