Last active
March 1, 2016 22:10
-
-
Save johnh/a7dedfae54f61f8295ea to your computer and use it in GitHub Desktop.
LogEntries Elastic Beanstalk configuration using an environment variable
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
files: | |
"/home/ec2-user/setup.sh": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
#!/bin/bash | |
echo "\$template LogentriesFormat,\"${PS_LOGENTRIES_TOKEN} %HOSTNAME% %syslogtag%%msg%\n\"" > /etc/rsyslog.d/logger.conf | |
echo '*.* @@data.logentries.com:80;LogentriesFormat' >> /etc/rsyslog.d/logger.conf | |
service rsyslog restart | |
container_commands: | |
set_up: | |
command: /home/ec2-user/setup.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An improvement on the documentation from LogEntries here that escapes the quotes and allows the use of environment variables, for those that do not want to keep keys in their source code.
The ONLY way, it seems, to use environment variables in an .ebextension is to have it create a script and then run it from a container_command.