mode "755"
end
-directory "/srv/tile.openstreetmap.org/conf" do
- owner "tile"
- group "tile"
- mode "755"
-end
-
-file "/srv/tile.openstreetmap.org/conf/ip.map" do
- owner "tile"
- group "adm"
- mode "644"
-end
-
tile_directories = node[:tile][:styles].collect do |_, style|
style[:tile_directories].collect { |directory| directory[:name] }
end.flatten.sort.uniq
python3-pyproj
]
-gem_package "apachelogregex" do
- gem_binary node[:ruby][:gem]
-end
-
-gem_package "file-tail" do
- gem_binary node[:ruby][:gem]
-end
-
-gem_package "lru_redux" do
- gem_binary node[:ruby][:gem]
-end
-
remote_directory "/usr/local/bin" do
source "bin"
owner "root"
files_mode "755"
end
-template "/usr/local/bin/tile-ratelimit" do
- source "tile-ratelimit.erb"
- owner "root"
- group "root"
- mode "755"
-end
-
-systemd_service "tile-ratelimit" do
- description "Monitor tile requests and enforce rate limits"
- after "apache2.service"
- user "tile"
- group "adm"
- exec_start "/usr/local/bin/tile-ratelimit"
- nice 10
- sandbox true
- read_write_paths "/srv/tile.openstreetmap.org/conf"
- restart "on-failure"
-end
-
-service "tile-ratelimit" do
- action [:enable, :start]
- subscribes :restart, "file[/usr/local/bin/tile-ratelimit]"
- subscribes :restart, "systemd_service[tile-ratelimit]"
-end
-
template "/usr/local/bin/expire-tiles" do
source "expire-tiles.erb"
owner "root"
subscribes :restart, "systemd_service[replicate]"
end
-# FIXME: cleanup old replicate logrotate
-file "/etc/logrotate.d/replicate" do
- action :delete
-end
-
template "/usr/local/bin/render-lowzoom" do
source "render-lowzoom.erb"
owner "root"