Skip to content

Commit 7491f2a

Browse files
committed
Merge pull request #2558 from carmstrong/pr-2525
feat(contrib/ec2): enable customization of stack name
2 parents 7139ad5 + 56f3c7f commit 7491f2a

3 files changed

Lines changed: 25 additions & 6 deletions

File tree

contrib/ec2/provision-ec2-cluster.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
#!/usr/bin/env bash
22
#
3-
# Usage: ./provision-ec2-cluster.sh
4-
#
3+
# Usage: ./provision-ec2-cluster.sh [name]
4+
# The [name] is the CloudFormation stack name, and defaults to 'deis'
5+
6+
if [ -z "$1" ]
7+
then
8+
NAME=deis
9+
else
10+
NAME=$1
11+
fi
512

613
set -e
714

@@ -34,7 +41,7 @@ $CONTRIB_DIR/util/check-user-data.sh
3441
# create an EC2 cloudformation stack based on CoreOS's default template
3542
aws cloudformation create-stack \
3643
--template-body "$(./gen-json.py)" \
37-
--stack-name deis \
44+
--stack-name $NAME \
3845
--parameters "$(<cloudformation.json)"
3946

4047
echo_green "Your Deis cluster has successfully deployed to AWS CloudFormation."

contrib/ec2/update-ec2-cluster.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
#!/usr/bin/env bash
22
#
3-
# Usage: ./provision-ec2-cluster.sh
4-
#
3+
# Usage: ./update-ec2-cluster.sh [name]
4+
# The [name] is the CloudFormation stack name, and defaults to 'deis'
5+
6+
if [ -z "$1" ]
7+
then
8+
NAME=deis
9+
else
10+
NAME=$1
11+
fi
512

613
set -e
714

@@ -22,7 +29,7 @@ $CONTRIB_DIR/util/check-user-data.sh
2229
# update the deis EC2 cloudformation
2330
aws cloudformation update-stack \
2431
--template-body "$(./gen-json.py)" \
25-
--stack-name deis \
32+
--stack-name $NAME \
2633
--parameters "$(<cloudformation.json)"
2734

2835
echo_green "Your Deis cluster CloudFormation has been successfully updated."

docs/installing_deis/aws.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ Run the cloudformation provision script to spawn a new CoreOS cluster:
149149
Your Deis cluster has successfully deployed.
150150
Please wait for all instances to come up as "running" before continuing.
151151
152+
.. note::
153+
154+
The default name of the CloudFormation stack will be ``deis``. You can specify a different name
155+
with ``./provision-ec2-cluster.sh <name>``.
156+
152157
Check the AWS EC2 web control panel and wait until "Status Checks" for all instances have passed.
153158
This will take several minutes.
154159

0 commit comments

Comments
 (0)