X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/68e068818d559ef35bdf2a138a93596337828ef9..d67a952e76082641d21e5d42203e37ffd9276858:/cookbooks/tile/recipes/default.rb diff --git a/cookbooks/tile/recipes/default.rb b/cookbooks/tile/recipes/default.rb index d1a394b2f..6765252a7 100644 --- a/cookbooks/tile/recipes/default.rb +++ b/cookbooks/tile/recipes/default.rb @@ -96,16 +96,10 @@ directory "/srv/tile.openstreetmap.org" do mode "755" end +# Old directory for IP rate limiting, now on the CDN 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" + action :delete + recursive true end tile_directories = node[:tile][:styles].collect do |_, style| @@ -450,7 +444,7 @@ postgresql_extension "hstore" do only_if { node[:tile][:database][:hstore] } end -%w[geography_columns planet_osm_nodes planet_osm_rels planet_osm_ways raster_columns raster_overviews spatial_ref_sys].each do |table| +%w[geography_columns planet_osm_nodes planet_osm_rels planet_osm_ways raster_columns raster_overviews].each do |table| postgresql_table table do cluster node[:tile][:database][:cluster] database "gis" @@ -459,7 +453,7 @@ end end end -%w[geometry_columns planet_osm_line planet_osm_point planet_osm_polygon planet_osm_roads].each do |table| +%w[geometry_columns planet_osm_line planet_osm_point planet_osm_polygon planet_osm_roads spatial_ref_sys].each do |table| postgresql_table table do cluster node[:tile][:database][:cluster] database "gis" @@ -524,18 +518,6 @@ package %w[ 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" @@ -546,29 +528,16 @@ remote_directory "/usr/local/bin" do files_mode "755" end -template "/usr/local/bin/tile-ratelimit" do - source "tile-ratelimit.erb" - owner "root" - group "root" - mode "755" +file "/usr/local/bin/tile-ratelimit" do + action :delete 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" +service "tile-ratelimit" do + action [:stop, :disable] end -service "tile-ratelimit" do - action [:enable, :start] - subscribes :restart, "file[/usr/local/bin/tile-ratelimit]" - subscribes :restart, "systemd_service[tile-ratelimit]" +systemd_service "tile-ratelimit" do + action :delete end template "/usr/local/bin/expire-tiles" do @@ -645,11 +614,9 @@ service "replicate" do subscribes :restart, "systemd_service[replicate]" end -template "/etc/logrotate.d/replicate" do - source "replicate.logrotate.erb" - owner "root" - group "root" - mode "644" +# FIXME: cleanup old replicate logrotate +file "/etc/logrotate.d/replicate" do + action :delete end template "/usr/local/bin/render-lowzoom" do