#
include_recipe "accounts"
-include_recipe "munin"
include_recipe "apache"
+include_recipe "munin"
+include_recipe "ruby"
username = "overpass"
basedir = data_bag_item("accounts", username)["home"]
## Install overpass from source
-srcdir = "#{basedir}/src/osm-3s_v#{node[:overpass][:version]}"
+srcdir = "#{basedir}/src/osm-3s_v#{node[:overpass][:full_version]}"
package %w[
build-essential
## Setup Apache
-gem_package "rotp"
+gem_package "rotp" do
+ gem_binary node[:ruby][:gem]
+end
directory "#{basedir}/apache" do
owner "root"
action [:enable]
end
+template "/etc/logrotate.d/overpass" do
+ source "logrotate.erb"
+ owner "root"
+ group "root"
+ mode "644"
+ variables :logdir => logdir
+end
+
# Munin scripts
%w[db_lag request_count].each do |name|