github.com/inflatablewoman/deis@v1.0.1-0.20141111034523-a4511c46a6ce/contrib/ec2/update-ec2-cluster.sh (about) 1 #!/usr/bin/env bash 2 # 3 # Usage: ./provision-ec2-cluster.sh 4 # 5 6 set -e 7 8 THIS_DIR=$(cd $(dirname $0); pwd) # absolute path 9 CONTRIB_DIR=$(dirname $THIS_DIR) 10 11 source $CONTRIB_DIR/utils.sh 12 13 # check for EC2 API tools in $PATH 14 if ! which aws > /dev/null; then 15 echo_red 'Please install the AWS command-line tool and ensure it is in your $PATH.' 16 exit 1 17 fi 18 19 # check that the CoreOS user-data file is valid 20 $CONTRIB_DIR/util/check-user-data.sh 21 22 # update the deis EC2 cloudformation 23 aws cloudformation update-stack \ 24 --template-body "$(./gen-json.py)" \ 25 --stack-name deis \ 26 --parameters "$(<cloudformation.json)" 27 28 echo_green "Your Deis cluster CloudFormation has been successfully updated."