-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4009 from opengovsg/release-5.61.0
build: merge release 5.61.0 into master
- Loading branch information
Showing
162 changed files
with
19,902 additions
and
9,854 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# .ebextensions/99datadog-amazon-linux-2.config | ||
option_settings: | ||
- namespace: aws:elasticbeanstalk:application:environment | ||
option_name: DD_API_KEY | ||
value: "<YOUR_DD_API_KEY>" # To set in AWS EB console only | ||
- namespace: aws:elasticbeanstalk:application:environment | ||
option_name: DD_AGENT_VERSION | ||
value: "7.31.0" | ||
- namespace: aws:elasticbeanstalk:application:environment | ||
option_name: DD_ENV | ||
value: "staging" # staging | production | ||
files: | ||
"/configure_datadog_yaml.sh": | ||
mode: "000700" | ||
owner: root | ||
group: root | ||
content: | | ||
#!/bin/bash | ||
|
||
sed -e "s/api_key:.*/api_key: ${DD_API_KEY}/" \ | ||
-e "s/# dogstatsd_non_local_traffic: false/dogstatsd_non_local_traffic: true/" \ | ||
-e "s/# hostname_file:/hostname_file:/" \ | ||
/etc/datadog-agent/datadog.yaml.example > /etc/datadog-agent/datadog.yaml | ||
|
||
# Use the following command if you're in the EU. Replace datadoghq.eu with another region if in a different region. | ||
# sed -i 's/datadoghq.com/datadoghq.eu/' /etc/datadog-agent/datadog.yaml | ||
|
||
echo "tags:" >> /etc/datadog-agent/datadog.yaml | ||
echo " - service:formsg" >> /etc/datadog-agent/datadog.yaml | ||
echo " - env:${DD_ENV}" >> /etc/datadog-agent/datadog.yaml | ||
"/datadog/datadog.repo": | ||
mode: "000644" | ||
owner: root | ||
group: root | ||
content: | | ||
[datadog] | ||
name = Datadog, Inc. | ||
baseurl = https://yum.datadoghq.com/stable/7/x86_64/ | ||
enabled=1 | ||
gpgcheck=1 | ||
repo_gpgcheck=1 | ||
gpgkey=https://keys.datadoghq.com/DATADOG_RPM_KEY_CURRENT.public | ||
https://keys.datadoghq.com/DATADOG_RPM_KEY_FD4BF915.public | ||
https://keys.datadoghq.com/DATADOG_RPM_KEY_E09422B3.public | ||
|
||
"/start_datadog.sh": | ||
mode: "000700" | ||
owner: root | ||
group: root | ||
content: | | ||
#!/bin/bash | ||
STATUS=$(sudo systemctl status datadog-agent) | ||
if [[ "$STATUS" == *"active (running)"* ]] | ||
then | ||
echo "Agent already running" | ||
else | ||
echo "Agent starting..." | ||
sudo systemctl start datadog-agent | ||
fi | ||
|
||
"/stop_datadog.sh": | ||
mode: "000700" | ||
owner: root | ||
group: root | ||
content: | | ||
#!/bin/bash | ||
STATUS=$(sudo systemctl status datadog-agent) | ||
if [[ "$STATUS" == *"active (running)"* ]] | ||
then | ||
echo "Agent stopping..." | ||
sudo systemctl stop datadog-agent | ||
else | ||
echo "Agent already stopped" | ||
fi | ||
|
||
|
||
container_commands: | ||
02stop_datadog: | ||
command: "/stop_datadog.sh" | ||
04install_datadog: | ||
test: '[ -f /datadog/datadog.repo ]' | ||
command: 'cp /datadog/datadog.repo /etc/yum.repos.d/datadog.repo; yum -y makecache; yum -y install datadog-agent${DD_AGENT_VERSION:+-$DD_AGENT_VERSION-1}' | ||
05setup_datadog: | ||
test: '[ -x /configure_datadog_yaml.sh ]' | ||
command: "/configure_datadog_yaml.sh" | ||
06start_datadog: | ||
command: "/start_datadog.sh" |
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
Oops, something went wrong.