Skip to content

Commit

Permalink
Add basic ddog tagging (#98)
Browse files Browse the repository at this point in the history
* Add basic ddog tagging

* Adding tags to cloudfront
  • Loading branch information
devinmatte authored Jan 20, 2024
1 parent 1601fa8 commit d54b7c2
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
12 changes: 11 additions & 1 deletion devops/cloudformation.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
"Value": {
"Fn::Sub": "rre-${RREHostname}"
}
},
{
"Key": "service",
"Value": "regional-rail-explorer"
}
],
"BlockDeviceMappings": [
Expand Down Expand Up @@ -133,7 +137,13 @@
},
"SslSupportMethod": "sni-only"
}
}
},
"Tags": [
{
"Key": "service",
"Value": "regional-rail-explorer"
}
]
}
}
},
Expand Down
4 changes: 4 additions & 0 deletions devops/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ $PRODUCTION && CERT_ARN="$TM_RRE_RR_RKS_CERT_ARN" || CERT_ARN="$TM_LABS_WILDCARD

$PRODUCTION && STACK_NAME="rre" || STACK_NAME="rre-beta"

# Identify the version and commit of the current deploy
export GIT_SHA=`git rev-parse HEAD`
echo "Deploying version $GIT_SHA"

echo "Deploying Regional Rail Explorer to $HOSTNAME..."
echo "View stack log here: https://$AWS_REGION.console.aws.amazon.com/cloudformation/home?region=$AWS_REGION"

Expand Down
13 changes: 12 additions & 1 deletion devops/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,18 @@
args:
chdir: /home/ubuntu/regional-rail-explorer

- name: Make sure a service unit is running and enabled
become: yes
become_user: root
ansible.builtin.systemd_service:
state: started
name: regional-rail-explorer
enabled: true

- name: restart service
become: yes
become_user: root
shell: systemctl restart regional-rail-explorer
ansible.builtin.systemd_service:
state: restarted
daemon_reload: true
name: regional-rail-explorer
3 changes: 3 additions & 0 deletions devops/systemd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Type=simple
User=ubuntu
Group=ubuntu
WorkingDirectory=/home/ubuntu/regional-rail-explorer
Environment=DD_SERVICE="regional-rail-explorer"
Environment=DD_ENV="prod"
Environment=DD_GIT_REPOSITORY_URL="github.com/transitmatters/regional-rail-explorer"
ExecStart=npm start
Restart=on-failure
RestartSec=5s
Expand Down

0 comments on commit d54b7c2

Please sign in to comment.