Created
April 20, 2016 21:44
-
-
Save JoryTony/64d6fa6e1f28fe2df93fca431c6179cf to your computer and use it in GitHub Desktop.
EB pre and post deployment for Datadog
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
| container_commands: | |
| 02mkdir_appdeploy_post: | |
| test: '[ ! -d /opt/elasticbeanstalk/hooks/appdeploy/post ]' | |
| command: | | |
| mkdir /opt/elasticbeanstalk/hooks/appdeploy/post | |
| 02mkdir_configdeploy_post: | |
| test: '[ ! -d /opt/elasticbeanstalk/hooks/configdeploy/post ]' | |
| command: | | |
| mkdir /opt/elasticbeanstalk/hooks/configdeploy/post | |
| 10appdeploy_pre_stop: | |
| command: | | |
| cp /etc/dd-agent/stop_datadog.sh /opt/elasticbeanstalk/hooks/appdeploy/pre/ | |
| 11appdeploy_post_start: | |
| command: | | |
| cp /etc/dd-agent/start_datadog.sh /opt/elasticbeanstalk/hooks/appdeploy/post/ | |
| 20preinit_stop: | |
| command: | | |
| cp /etc/dd-agent/stop_datadog.sh /opt/elasticbeanstalk/hooks/preinit | |
| 21postinit_start: | |
| command: | | |
| cp /etc/dd-agent/start_datadog.sh /opt/elasticbeanstalk/hooks/postinit | |
| 30configdeploy_pre_stop: | |
| command: | | |
| cp /etc/dd-agent/stop_datadog.sh /opt/elasticbeanstalk/hooks/configdeploy/pre/ | |
| 31configdeploy_post_start: | |
| command: | | |
| cp /etc/dd-agent/start_datadog.sh /opt/elasticbeanstalk/hooks/configdeploy/post/ | |
| files: | |
| "/etc/dd-agent/stop_datadog.sh": | |
| mode: "000750" | |
| owner: root | |
| group: root | |
| content: | | |
| #!/bin/bash | |
| if [ -e /etc/init.d/datadog-agent ]; then | |
| /etc/init.d/datadog-agent stop | |
| fi | |
| "/etc/dd-agent/start_datadog.sh": | |
| mode: "000750" | |
| owner: root | |
| group: root | |
| content: | | |
| #!/bin/bash | |
| if [ -e /etc/init.d/datadog-agent ]; then | |
| /etc/init.d/datadog-agent start | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment