Created
May 3, 2021 02:26
-
-
Save hyeoksuhan/c287bc191e5f1757818b9ea0aeeb1b94 to your computer and use it in GitHub Desktop.
Install New Relic Infrastructure agent on AWS Elastic Beanstalk Amazon Linux2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Author
hyeoksuhan
commented
May 3, 2021
- put this file in '.platform/hooks/prebuild/'
- 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