]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/planet/recipes/replication.rb
wordpress: Use DOS line ending. Disable WP auto updater
[chef.git] / cookbooks / planet / recipes / replication.rb
index 629186fe2ee905eb634a19d6f97c684e4e4968a6..a31f98288c3217f71152552f95be266f777a64c7 100644 (file)
@@ -22,6 +22,8 @@ require "yaml"
 include_recipe "accounts"
 include_recipe "apt"
 include_recipe "osmosis"
 include_recipe "accounts"
 include_recipe "apt"
 include_recipe "osmosis"
+include_recipe "ruby"
+include_recipe "tools"
 
 db_passwords = data_bag_item("db", "passwords")
 
 
 db_passwords = data_bag_item("db", "passwords")
 
@@ -29,8 +31,6 @@ db_passwords = data_bag_item("db", "passwords")
 
 package %w[
   postgresql-client
 
 package %w[
   postgresql-client
-  ruby
-  ruby-dev
   ruby-libxml
   make
   gcc
   ruby-libxml
   make
   gcc
@@ -39,7 +39,9 @@ package %w[
   osmdbt
 ]
 
   osmdbt
 ]
 
-gem_package "pg"
+gem_package "pg" do
+  gem_binary node[:ruby][:gem]
+end
 
 ## Build preload library to flush files
 
 
 ## Build preload library to flush files
 
@@ -315,6 +317,7 @@ systemd_service "replication-hourly" do
   description "Hourly replication"
   user "planet"
   exec_start "/usr/local/bin/osmosis -q --merge-replication-files workingDirectory=/var/lib/replication/hour"
   description "Hourly replication"
   user "planet"
   exec_start "/usr/local/bin/osmosis -q --merge-replication-files workingDirectory=/var/lib/replication/hour"
+  environment "LD_PRELOAD" => "/opt/flush/flush.so"
   private_tmp true
   private_devices true
   protect_system "full"
   private_tmp true
   private_devices true
   protect_system "full"
@@ -358,6 +361,7 @@ systemd_service "replication-daily" do
   description "Daily replication"
   user "planet"
   exec_start "/usr/local/bin/osmosis -q --merge-replication-files workingDirectory=/var/lib/replication/day"
   description "Daily replication"
   user "planet"
   exec_start "/usr/local/bin/osmosis -q --merge-replication-files workingDirectory=/var/lib/replication/day"
+  environment "LD_PRELOAD" => "/opt/flush/flush.so"
   private_tmp true
   private_devices true
   protect_system "full"
   private_tmp true
   private_devices true
   protect_system "full"