]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nominatim/recipes/default.rb
User 13.04 chef client for 14.04
[chef.git] / cookbooks / nominatim / recipes / default.rb
index e7cd50088d714db084a05ba7d53c2174416f6211..44806430032eec74ad8ce650d3565ea7780ac092 100644 (file)
@@ -17,7 +17,7 @@
 # limitations under the License.
 #
 
-include_recipe "apache"
+include_recipe "apache::ssl"
 include_recipe "postgresql"
 include_recipe "git"
 
@@ -54,7 +54,7 @@ node[:nominatim][:fpm_pools].each do |name,data|
     group "root"
     mode 0644
     variables data.merge(:name => name)
-    notifies :reload, resources(:service => "php5-fpm")
+    notifies :reload, "service[php5-fpm]"
   end
 end
 
@@ -93,6 +93,14 @@ directory "/var/log/nominatim" do
   mode 0755
 end
 
+template "/etc/logrotate.d/nominatim" do
+  source "logrotate.nominatim.erb"
+  owner "root"
+  group "root"
+  mode 0644
+end
+
+
 package "osmosis"
 package "gcc"
 package "proj-bin"
@@ -224,3 +232,38 @@ template "/etc/init.d/nominatim-update" do
   variables :source_directory => source_directory
 end
 
+munin_plugin_conf "nominatim" do
+  template "munin.erb"
+end
+
+munin_plugin "nominatim_importlag" do
+  target "#{source_directory}/munin/nominatim_importlag"
+end
+
+munin_plugin "nominatim_query_speed" do
+  target "#{source_directory}/munin/nominatim_query_speed"
+end
+
+munin_plugin "nominatim_requests" do
+  target "#{source_directory}/munin/nominatim_requests"
+end
+
+munin_plugin "nominatim_throttled_ips" do
+  target "#{source_directory}/munin/nominatim_throttled_ips"
+end
+
+template "/usr/local/bin/backup-nominatim" do
+  source "backup-nominatim.erb"
+  owner "root"
+  group "root"
+  mode 0755
+end
+
+cron "nominatim_backup" do
+  hour "3"
+  minute "00"
+  day "1"
+  command "/usr/local/bin/backup-nominatim"
+  user "nominatim"
+  mailto email_errors
+end