2017 © Pedro Peláez
 

library aws-eb-newrelic-deploynotify

Send AWS Elastic Beanstalk deployment notifications to New Relic.

image

apancutt/aws-eb-newrelic-deploynotify

Send AWS Elastic Beanstalk deployment notifications to New Relic.

  • Wednesday, September 23, 2015
  • by apancutt
  • Repository
  • 1 Watchers
  • 6 Stars
  • 17,545 Installations
  • Shell
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

AWS Elastic Beanstalk Deployment Notifications for New Relic

This script can be executed as part of the container commands directive supported by Elastic Beanstalk extensions to send a deployment notification to New Relic via the HTTP API service., (*1)

Installation

  1. Download the bash script from this project into your application., (*2)

    cd /path/to/your/app
    mkdir bin
    wget -P bin "https://raw.github.com/apancutt/aws-eb-newrelic-deploynotify/master/aws-eb-newrelic-deploynotify.sh"
    chmod +x bin/aws-eb-newrelic-deploynotify.sh
  2. Create an .ebextensions directory in your application root:, (*3)

    mkdir .ebextensions
  3. Create a new file (or append to an existing one) for the container_commands configuration:, (*4)

    echo "00_aws-eb-newrelic-deploynotify:" >> .ebextensions/03_container_commands.config
    echo "  command: \"bin/aws-eb-newrelic-deploynotify.sh -a <APP NAME> -k <API KEY>\"" >> .ebextensions/03_container_commands.config
    echo "  leader_only: true" >> .ebextensions/03_container_commands.config

    Note: If you already have a file for container commands, simply append the following lines:, (*5)

    00_aws-eb-newrelic-deploynotify:
      command: "bin/aws-eb-newrelic-deploynotify.sh -a <APP NAME> -k <API KEY>"
      leader_only: true

    Don't forget to replace the arguments with the correct values., (*6)

  4. Deploy to Elastic Beanstalk and check New Relic for a deployment notification (Applications > Your App > Events > Deployments). If a notification doesn't appear, check your environment logs in Elastic Beanstalk for any errors., (*7)

Usage

The installation steps above describe the minimal effort required to get this script working, but you may wish to make use of these extra options., (*8)

  • -a The name your the application in Elastic Beanstalk.
  • -d The name of the deployer (default: AWS Elastic Beanstalk).
  • -e Error if the HTTP request fails. Note that this will abort the deployment.
  • -h Displays this help message.
  • -k Your New Relic API key.
  • -q Quiet mode.
  • -v Display version information.

Caveats

  • This script has only been tested with PHP applications. Please help improve this script by submitting pull requests for compatibility with alternative environments.
  • The detection of the current application version is based on an undocumented feature of Elastic Beanstalk's deployment process which is subject to change without notice. The accuracy of the current version is not guaranteed.

The Versions

23/09 2015

dev-master

9999999-dev

Send AWS Elastic Beanstalk deployment notifications to New Relic.

  Sources   Download

MIT

16/01 2014

v1.0

1.0.0.0

Send AWS Elastic Beanstalk deployment notifications to New Relic.

  Sources   Download

MIT