Skip to content

Commit c6df4f1

Browse files
author
Gabriel Monroy
committed
Merge pull request #1302 from ddollar/ec2-cloudformation-update
fix(contrib/ec2): add script to update the CloudFormation
2 parents 2088dd1 + 2045366 commit c6df4f1

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

contrib/ec2/update-ec2-cluster.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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."

0 commit comments

Comments
 (0)