-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding script to auto restart task #6072
adding script to auto restart task #6072
Conversation
@@ -0,0 +1,23 @@ | |||
#!/bin/bash | |||
|
|||
current_availability_zone=$(ec2metadata --availability-zone | awk -F'-' '{print $3}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be more general if you pull of just a
instead of 1a
, because the 1
is part of the region
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
modified the command as suggested above ec2metadata --availability-zone | awk -F'-' '{print $3}' | cut -c2-
It uses cut to remove the character from the output -c, --characters=LIST select only these characters. In our case it pulling of just a from 1a.
I just noticed, this should say Staging not production
in the description. This should not affect production. My approval is assuming that this will only affect staging |
Danny, you are correct; I set the environment to staging |
…art_of_ec2_servers
…b.com/pvisweswar/commcare-cloud into SAAS-14342/autorestart_of_ec2_servers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went through the dry-run of the command on staging. It looked good. Approved to apply the changes on staging.
Ticket : https://dimagi-dev.atlassian.net/browse/SAAS-14342
Environments Affected : Staging