Created
May 6, 2016 04:36
-
-
Save ariporad/cf32382c44353a76699a0699e7ab96c2 to your computer and use it in GitHub Desktop.
Rover DevOps Challenge Solution
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
if [[ $# -eq 0 ]] ; then | |
echo 'Usage: $0 VERSION' | |
echo '' | |
echo 'Does a Zero-Downtime deploy of VERSION to worker, web-1 and web-2, including DB migrations.' | |
echo '' | |
exit 0 | |
fi | |
ssh root@worker "./materialize $1 && ./db-migrate $1 && ./restart-worker" | |
ssh root@web-1 "./lb-remove && ./materialize $1 && ./db-migrate $1 && ./restart-web && ./lb-join" | |
ssh root@web-2 "./lb-remove && ./materialize $1 && ./db-migrate $1 && ./restart-web && ./lb-join" | |
echo "Done" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment