include_recipe "accounts"
include_recipe "apt"
include_recipe "osmosis"
+include_recipe "ruby"
+include_recipe "tools"
db_passwords = data_bag_item("db", "passwords")
package %w[
postgresql-client
- ruby
- ruby-dev
ruby-libxml
make
gcc
osmdbt
]
-gem_package "pg"
+gem_package "pg" do
+ gem_binary node[:ruby][:gem]
+end
## Build preload library to flush files
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"
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"