Created
January 2, 2017 23:08
-
-
Save jkras/06733834e88be74330a4e9cf6d67af03 to your computer and use it in GitHub Desktop.
New Relic Infrastructure Server Config file for AWS Elastic Beanstalk
This file contains hidden or 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
files: | |
"/home/ec2-user/new_relic_servers_setup.sh": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
#!/usr/bin/env bash | |
printf "license_key: $NEW_RELIC_LICENSE_KEY" | sudo tee /etc/newrelic-infra.yml | |
printf "[newrelic-infra]\nname=New Relic Infrastructure\nbaseurl=http://download.newrelic.com/infrastructure_agent/linux/yum/el/6/x86_64\nenable=1\ngpgcheck=0" | sudo tee /etc/yum.repos.d/newrelic-infra.repo | |
yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra' | |
sudo yum install newrelic-infra -y | |
container_commands: | |
set_up: | |
command: /home/ec2-user/new_relic_servers_setup.sh |
Legend!
What about for Amazon Linux 2? Can you suggest the changes? Because I believe that environment values cannot be retrieved from .ebextensions folder/stage anymore.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Drop this into your .ebextensions folder, and make sure to set NEW_RELIC_LICENSE_KEY in your elastic beanstalk environment variables.