Permalink
Browse files

I think I got it this time

  • Loading branch information...
1 parent 8f72f0e commit 5bdc460d9f79c1346d53b5d2996bb99e5014740e @jacobo jacobo committed Apr 19, 2012
Showing with 10 additions and 29 deletions.
  1. +8 −23 deploy/cookbooks/le/recipes/configure.rb
  2. +2 −6 deploy/solo.rb
@@ -2,35 +2,20 @@
# Cookbook Name:: le
# Recipe:: configure
#
-
-puts node.inspect
-
-le_key = nil
-
-node[:engineyard][:environment][:apps].each do |app|
- puts app.inspect
- app[:components].each do |component|
- puts component.inspect
- if component[:key] == "addons"
- component[:collection].each do |elem|
- puts elem.inspect
- if elem[:name] == "Logentries"
- le_key = component[:config][:vars]["LE_API_KEY"]
- end
- end
- end
- end
-end
-
-puts "le_key: #{le_key}"
+base_dir = File.dirname(__FILE__)
+ey_services_config = YAML::load_file("#{base_dir}/../../../../config/ey_services_config_deploy.yml")
execute "le register --user-key" do
- command "le register --user-key #{le_key}"
+ command "le register --user-key #{ey_services_config["logentries"]["LE_API_KEY"]}"
action :run
end
-follow_paths = []
+follow_paths = [
+ "/var/log/syslog",
+ "/var/log/auth.log"
+]
(node[:applications] || []).each do |app_name, app_info|
+ follow_paths << "/var/log/nginx/#{app_name}.access.log"
follow_paths << "/data/#{app_name}/shared/log/#{node['environment']['framework_env']}.log"
end
View
@@ -1,6 +1,5 @@
puts "running solo..."
-node = Yajl::Parser.new.parse(File.read("/etc/chef/dna.json"))
-puts "node: " + node.inspect
+node = JSON.parse(File.read("/etc/chef/dna.json"))
base_dir = File.dirname(__FILE__)
@@ -9,7 +8,4 @@
file_store_path base_dir
file_cache_path base_dir
cookbook_path cookbooks_path
-role_path "#{base_dir}/roles"
-node_name node["engineyard"]["this"]
-
-puts "node: " + node.inspect
+node_name node["engineyard"]["this"]

0 comments on commit 5bdc460

Please sign in to comment.