Skip to content

Instantly share code, notes, and snippets.

@hyeoksuhan
Created May 3, 2021 02:26
Show Gist options
  • Save hyeoksuhan/c287bc191e5f1757818b9ea0aeeb1b94 to your computer and use it in GitHub Desktop.
Save hyeoksuhan/c287bc191e5f1757818b9ea0aeeb1b94 to your computer and use it in GitHub Desktop.
Install New Relic Infrastructure agent on AWS Elastic Beanstalk Amazon Linux2
#!/bin/bash
set -e
# NEW_RELIC_LICENSE_KEY has set as one of Elastic Beanstalk Environment properties
NR_LICENSE_KEY=`/opt/elasticbeanstalk/bin/get-config environment -k NEW_RELIC_LICENSE_KEY`
sudo curl -o /etc/yum.repos.d/newrelic-infra.repo https://download.newrelic.com/infrastructure_agent/linux/yum/el/7/x86_64/newrelic-infra.repo
sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra'
sudo yum install newrelic-infra -y
@hyeoksuhan
Copy link
Author

  1. put this file in '.platform/hooks/prebuild/'
  2. this file must be executable (eg. chmod 755)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment