LoginSignup
0
0

More than 5 years have passed since last update.

Newrelicへdeploymentsの通知を行うon Engine Yard Cloud

Posted at

Newrelicのdeploymentsに、Engine Yard Cloudの標準のdeployを使って通知する場合、rakeタスクを使うこともできるが、コマンドラインから以下のように行うこともできる。

deploy_after_restart.rb
on_app_master do
  require 'json'
  keys = JSON.parse(File.read("#{config.shared_path}/config/ey_services_config_deploy.json"))
  license_key = keys['New Relic']['license_key']
  app_name =  keys['base']['app_environment_name']
  run "#{config.current_path}/ey_bundler_binstubs/newrelic deployment --appname=\"#{app_name}\" --environment=#{config.framework_env} --user=\"#{config.deployed_by}\" --revision=#{config.active_revision} --license-key=#{license_key}"
end

app_nameとlicense_keyをアドオンの設定が載っているjson(yamlもある)から取ってくる。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0