X-Git-Url: https://git.openstreetmap.org./chef.git/blobdiff_plain/64fa4422a41b8e8095656c3776ed1368094cb54a..1b457344c7492da53791caddbb6f377e1e7eae34:/cookbooks/tile/recipes/default.rb diff --git a/cookbooks/tile/recipes/default.rb b/cookbooks/tile/recipes/default.rb index bb79e32bd..6cb1b9acb 100644 --- a/cookbooks/tile/recipes/default.rb +++ b/cookbooks/tile/recipes/default.rb @@ -77,8 +77,8 @@ template "/etc/renderd.conf" do owner "root" group "root" mode 0644 - notifies :reload, resources(:service => "apache2") - notifies :restart, resources(:service => "renderd") + notifies :reload, "service[apache2]" + notifies :restart, "service[renderd]" end remote_directory "/srv/tile.openstreetmap.org/html" do @@ -101,6 +101,16 @@ end package "python-cairo" package "python-mapnik" +package "ttf-dejavu" +package "fonts-droid" +package "ttf-unifont" +package "fonts-sipa-arundina" +package "fonts-sil-padauk" +package "fonts-khmeros" +package "ttf-indic-fonts-core" +package "ttf-tamil-fonts" +package "ttf-kannada-fonts" + directory "/srv/tile.openstreetmap.org/cgi-bin" do owner "tile" group "tile" @@ -186,7 +196,7 @@ node[:tile][:data].each do |name,data| command "ogr2ogr #{processed} #{original}" user "tile" group "tile" - subscribes :run, resources(:execute => file), :immediately + subscribes :run, "execute[#{file}]", :immediately end end @@ -194,8 +204,8 @@ node[:tile][:data].each do |name,data| action :nothing command "find #{directory} -type f -iname '*.shp' -print0 | xargs -0 --no-run-if-empty shapeindex --shape_files" user "tile" - user "tile" - subscribes :run, resources(:execute => file), :immediately + group "tile" + subscribes :run, "execute[#{file}]", :immediately end remote_file file do @@ -211,8 +221,8 @@ node[:tile][:data].each do |name,data| group "tile" mode 0644 backup false - notifies :run, resources(:execute => file), :immediately - notifies :restart, resources(:service => "renderd") + notifies :run, "execute[#{file}]", :immediately + notifies :restart, "service[renderd]" end end @@ -257,8 +267,14 @@ node[:tile][:styles].each do |name,details| end details[:tile_directories].each do |directory| + directory directory[:name] do + owner "www-data" + group "www-data" + mode 0755 + end + directory[:min_zoom].upto(directory[:max_zoom]) do |zoom| - directory "#{directory[:name]}/#{zoom}" do + directory "#{directory[:name]}/#{zoom}" do owner "www-data" group "www-data" mode 0755 @@ -368,11 +384,11 @@ postgresql_munin "gis" do database "gis" end -#file node[:tile][:node_file] do -# owner "tile" -# group "www-data" -# mode 0640 -#end +file node[:tile][:node_file] do + owner "tile" + group "www-data" + mode 0640 +end directory "/var/log/tile" do owner "tile" @@ -447,8 +463,8 @@ end service "replicate" do action [ :enable, :start ] supports :restart => true - subscribes :restart, resources(:template => "/usr/local/bin/replicate") - subscribes :restart, resources(:template => "/etc/init.d/replicate") + subscribes :restart, "template[/usr/local/bin/replicate]" + subscribes :restart, "template[/etc/init.d/replicate]" end template "/etc/logrotate.d/replicate" do @@ -480,6 +496,14 @@ template "/etc/rsyslog.d/20-renderd.conf" do notifies :restart, "service[rsyslog]" end +template "/etc/logrotate.d/renderd" do + source "renderd.logrotate.erb" + owner "root" + group "root" + mode 0644 +end + +package "liblockfile-simple-perl" package "libfilesys-df-perl" template "/usr/local/bin/cleanup-tiles" do