]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tile/recipes/default.rb
mediawiki: increase wgHTTPTimeout yet again
[chef.git] / cookbooks / tile / recipes / default.rb
index b9ae28cf8d44256b67f5811f2355e7633ef5a0ef..70085058d71288c82acdc0dbb2384fe9f41dc406 100644 (file)
@@ -29,7 +29,6 @@ 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"
@@ -60,14 +59,6 @@ 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
@@ -78,9 +69,7 @@ end
 
 apache_site "tile.openstreetmap.org" do
   template "apache.erb"
-  variables :fastly => fastlyips["addresses"] + fastlyips["ipv6_addresses"],
-            :statuscake => statuscakelocations.flat_map { |_, v| [v["ip"], v["ipv6"]] },
-            :admins => admins["hosts"]
+  variables :fastly => fastlyips["addresses"]
 end
 
 template "/etc/logrotate.d/apache2" do
@@ -176,30 +165,6 @@ python_package "pyotp" do
   python_version "3"
 end
 
-unifont = if node[:lsb][:release].to_f < 22.04
-            "ttf-unifont"
-          else
-            "fonts-unifont"
-          end
-
-package %W[
-  fonts-noto-cjk
-  fonts-noto-hinted
-  fonts-noto-unhinted
-  fonts-hanazono
-  #{unifont}
-]
-
-["NotoSansArabicUI-Regular.ttf", "NotoSansArabicUI-Bold.ttf"].each do |font|
-  remote_file "/usr/share/fonts/truetype/noto/#{font}" do
-    action :create_if_missing
-    source "https://github.com/googlei18n/noto-fonts/raw/master/hinted/#{font}"
-    owner "root"
-    group "root"
-    mode "644"
-  end
-end
-
 directory "/srv/tile.openstreetmap.org/cgi-bin" do
   owner "tile"
   group "tile"
@@ -397,6 +362,17 @@ node[:tile][:styles].each do |name, details|
     group "tile"
   end
 
+  if details[:fonts_script]
+    execute details[:fonts_script] do
+      action :nothing
+      command details[:fonts_script]
+      cwd style_directory
+      user "tile"
+      group "tile"
+      subscribes :run, "git[#{style_directory}]"
+    end
+  end
+
   execute "#{style_directory}/project.mml" do
     action :nothing
     command "carto -a 3.0.0 project.mml > project.xml"
@@ -676,7 +652,7 @@ end
 
 systemd_timer "render-lowzoom" do
   description "Render low zoom tiles"
-  on_calendar "Sun *-*~07/1 01:00:00"
+  on_calendar "Fri *-*-* 23:00:00 UTC"
 end
 
 service "render-lowzoom.timer" do