Commit 42c20a2a by Feanil Patel

Merge pull request #1376 from edx/feanil/monitor_update

Feanil/monitor update
parents 1a5ba5fa d5004bcb
...@@ -56,7 +56,7 @@ while [ . ]; do ...@@ -56,7 +56,7 @@ while [ . ]; do
# Re check thi IDs and IPs periodically # Re check thi IDs and IPs periodically
# This is useful in case the primary nat changes by some # This is useful in case the primary nat changes by some
# other means than this script. # other means than this script.
if [ $COUNTER -eq 0 ] if [ $COUNTER -eq 0 ]; then
# NAT instance variables # NAT instance variables
PRIMARY_NAT_ID=`aws ec2 describe-route-tables --filters Name=tag:aws:cloudformation:stack-name,Values=$VPC_NAME Name=tag:aws:cloudformation:logical-id,Values=PrivateRouteTable | jq '.RouteTables[].Routes[].InstanceId|strings' -r` PRIMARY_NAT_ID=`aws ec2 describe-route-tables --filters Name=tag:aws:cloudformation:stack-name,Values=$VPC_NAME Name=tag:aws:cloudformation:logical-id,Values=PrivateRouteTable | jq '.RouteTables[].Routes[].InstanceId|strings' -r`
BACKUP_NAT_ID=`aws ec2 describe-instances --filters Name=tag:aws:cloudformation:stack-name,Values=$VPC_NAME Name=tag:aws:cloudformation:logical-id,Values=NATDevice,BackupNATDevice | jq '.Reservations[].Instances[].InstanceId' -r | grep -v $PRIMARY_NAT_ID` BACKUP_NAT_ID=`aws ec2 describe-instances --filters Name=tag:aws:cloudformation:stack-name,Values=$VPC_NAME Name=tag:aws:cloudformation:logical-id,Values=NATDevice,BackupNATDevice | jq '.Reservations[].Instances[].InstanceId' -r | grep -v $PRIMARY_NAT_ID`
......
...@@ -139,3 +139,5 @@ ...@@ -139,3 +139,5 @@
with_items: jenkins_admin_gem_pkgs with_items: jenkins_admin_gem_pkgs
- include: nat_monitor.yml - include: nat_monitor.yml
tags:
- nat-monitor
...@@ -8,4 +8,4 @@ start on runlevel [2345] ...@@ -8,4 +8,4 @@ start on runlevel [2345]
stop on runlevel [!2345] stop on runlevel [!2345]
setuid {{ supervisor_service_user }} setuid {{ supervisor_service_user }}
exec {{ supervisor_venv_dir }}/bin/supervisord --nodaemon --configuration {{ supervisor_cfg }} exec {{ supervisor_venv_dir }}/bin/supervisord -n --configuration {{ supervisor_cfg }}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment