remote_file "#{Chef::Config[:file_cache_path]}/fastly-ip-list.json" do
source "https://api.fastly.com/public-ip-list"
compile_time true
+ ignore_failure true
end
tilecaches = search(:node, "roles:tilecache").sort_by { |n| n[:hostname] }
systemd_service "update-lowzoom@" do
description "Low zoom tile update service for %i layer"
+ conflicts "render-lowzoom.service"
user "tile"
exec_start "/bin/bash /usr/local/bin/update-lowzoom-%i"
+ runtime_directory "update-lowzoom-%i"
private_tmp true
private_devices true
private_network true
end
end
+package %w[
+ gdal-bin
+ python3-yaml
+ python3-psycopg2
+]
+
+if node[:tile][:database][:external_data_script]
+ execute node[:tile][:database][:external_data_script] do
+ command node[:tile][:database][:external_data_script]
+ cwd "/srv/tile.openstreetmap.org"
+ user "tile"
+ group "tile"
+ end
+
+ Array(node[:tile][:database][:external_data_tables]).each do |table|
+ postgresql_table table do
+ cluster node[:tile][:database][:cluster]
+ database "gis"
+ owner "tile"
+ permissions "tile" => :all, "www-data" => :select
+ end
+ end
+end
+
postgresql_munin "gis" do
cluster node[:tile][:database][:cluster]
database "gis"
systemd_service "render-lowzoom" do
description "Render low zoom tiles"
+ condition_path_exists_glob "!/run/update-lowzoom-*"
user "tile"
exec_start "/usr/local/bin/render-lowzoom"
private_tmp true
munin_plugin "replication_delay"
-prometheus_collector "modtile" do
- action :delete
-end
-
-prometheus_collector "renderd" do
- action :delete
-end
-
prometheus_exporter "modtile" do
port 9494
end