diff options
| author | mo khan <mo@mokhan.ca> | 2013-07-25 15:27:55 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2013-07-25 15:27:55 -0700 |
| commit | 180f5486575b535de3f56d0a124c95b2f2f4a621 (patch) | |
| tree | b7a4de9e53a4e00c493d2ece9e39a1e316499293 /config | |
| parent | 98c6ebe4d61080d2f85759efb668a535eb1fc8d0 (diff) | |
| parent | a743e5cecf0d70d8fcc8c26d6a28d54f512f61d5 (diff) | |
Merge pull request #12 from madebyuppercut/ty
add new servers to new relic
Diffstat (limited to 'config')
| -rw-r--r-- | config/deploy.rb | 1 | ||||
| -rw-r--r-- | config/recipes/newrelic.rb | 15 |
2 files changed, 16 insertions, 0 deletions
diff --git a/config/deploy.rb b/config/deploy.rb index c214f71..33876a1 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -10,6 +10,7 @@ load "config/recipes/postgresql" load "config/recipes/nodejs" load "config/recipes/rbenv" load "config/recipes/check" +load "config/recipes/newrelic" set :application, "parley" set :user, "deployer" diff --git a/config/recipes/newrelic.rb b/config/recipes/newrelic.rb new file mode 100644 index 0000000..b68f480 --- /dev/null +++ b/config/recipes/newrelic.rb @@ -0,0 +1,15 @@ +set_default(:newrelic_key) { "548C16BF" } +set_default(:newrelic_license) { "9972f0e736e6e3ccfbce0fac8c6eaa3da4849f6a" } + +namespace :newrelic do + desc "Add server to new relic" + task :install do + run "#{sudo} wget -O /etc/apt/sources.list.d/newrelic.list http://download.newrelic.com/debian/newrelic.list" + run "#{sudo} apt-key adv --keyserver hkp://subkeys.pgp.net --recv-keys #{newrelic_key}" + run "#{sudo} apt-get update" + run "#{sudo} apt-get install newrelic-sysmond" + run "#{sudo} nrsysmond-config --set license_key=#{newrelic_license}" + run "#{sudo} /etc/init.d/newrelic-sysmond start" + end + after "deploy:install", "newrelic:install" +end |
