Skip to content

Commit 56f3c7f

Browse files
committed
docs(contrib/ec2): fix up stack name customization
1 parent 5d6a1c0 commit 56f3c7f

3 files changed

Lines changed: 20 additions & 12 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: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
#!/usr/bin/env bash
22
#
3-
# Usage: ./provision-ec2-cluster.sh [id]
4-
# The [id] defaults to 'deis'
5-
3+
# Usage: ./update-ec2-cluster.sh [name]
4+
# The [name] is the CloudFormation stack name, and defaults to 'deis'
65

76
if [ -z "$1" ]
87
then
9-
ELB_NAME=deis
8+
NAME=deis
109
else
11-
ELB_NAME=$1
10+
NAME=$1
1211
fi
1312

1413
set -e
@@ -30,7 +29,7 @@ $CONTRIB_DIR/util/check-user-data.sh
3029
# update the deis EC2 cloudformation
3130
aws cloudformation update-stack \
3231
--template-body "$(./gen-json.py)" \
33-
--stack-name $ELB_NAME \
32+
--stack-name $NAME \
3433
--parameters "$(<cloudformation.json)"
3534

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

docs/installing_deis/aws.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,6 @@ Run the cloudformation provision script to spawn a new CoreOS cluster:
151151

152152
.. code-block:: console
153153
154-
# Usage: ./provision-ec2-cluster.sh [id]
155-
# Where id is internal reference id to the ELB, defaults to 'deis'
156-
157154
$ cd contrib/ec2
158155
$ ./provision-ec2-cluster.sh
159156
{
@@ -162,6 +159,11 @@ Run the cloudformation provision script to spawn a new CoreOS cluster:
162159
Your Deis cluster has successfully deployed.
163160
Please wait for all instances to come up as "running" before continuing.
164161
162+
.. note::
163+
164+
The default name of the CloudFormation stack will be ``deis``. You can specify a different name
165+
with ``./provision-ec2-cluster.sh <name>``.
166+
165167
Check the AWS EC2 web control panel and wait until "Status Checks" for all instances have passed.
166168
This will take several minutes.
167169

0 commit comments

Comments
 (0)