Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

Commit

Permalink
add librato config
Browse files Browse the repository at this point in the history
dwradcliffe committed Nov 21, 2014
1 parent 83161f9 commit 4dd6ce5
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Berksfile.lock
Original file line number Diff line number Diff line change
@@ -209,7 +209,7 @@ GRAPH
rubygems-sensu (>= 0.0.0)
rubygems-ssh (>= 0.0.0)
rubygems-utility (>= 0.0.0)
rubygems-app (0.0.31)
rubygems-app (0.0.33)
apt (>= 0.0.0)
chef-vault (>= 0.0.0)
git (>= 0.0.0)
2 changes: 1 addition & 1 deletion cookbooks/rubygems-app/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name 'rubygems-app'

version '0.0.31'
version '0.0.33'

depends 'apt'
depends 'chef-vault'
8 changes: 7 additions & 1 deletion cookbooks/rubygems-app/recipes/unicorn.rb
Original file line number Diff line number Diff line change
@@ -13,13 +13,19 @@
redis_host = data_bag_item('hosts', 'redis')['environments'][node.chef_environment]
redis_ip = search('node', "name:#{redis_host}.#{node.chef_environment}.rubygems.org")[0]['ipaddress']

include_recipe 'chef-vault'
librato_creds = chef_vault_item('librato', 'credentials')

runit_service 'unicorn' do
owner 'deploy'
group 'deploy'
default_logger true
env(
'RAILS_ENV' => node.chef_environment,
'REDISTOGO_URL' => "redis://#{redis_ip}:6379/0"
'REDISTOGO_URL' => "redis://#{redis_ip}:6379/0",
'LIBRATO_USER' => librato_creds['email'],
'LIBRATO_TOKEN' => librato_creds['token'],
'LIBRATO_PREFIX' => "app.#{node.chef_environment}"
)
options(
owner: 'deploy',

0 comments on commit 4dd6ce5

Please sign in to comment.