Skip to content

Commit 4da2426

Browse files
committed
feat(contrib/ec2): always deploy into VPC; support all instance types
This commit rewrites our CloudFormation template for EC2. This includes the following changes: * Create a new VPC by default; existing VPC support is left as-is * Support all EC2 instance types * Support both PV- and HVM-virtualized AMIs This also eliminates the 'No default VPC for this user' error that was the result of not having a default VPC in the region.
1 parent f1e2b52 commit 4da2426

3 files changed

Lines changed: 248 additions & 157 deletions

File tree

contrib/ec2/README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,25 +47,37 @@ Edit [user-data](../coreos/user-data) and add a new discovery URL.
4747
You can get a new one by sending a request to http://discovery.etcd.io/new.
4848

4949
## Customize cloudformation.json
50-
By default, this script spins up m3.large instances. You can override this
51-
by adding a new entry to [cloudformation.json](cloudformation.json) like so:
50+
Any of the parameter defaults defined in deis.template.json can be overridden
51+
by setting the value in [cloudformation.json](cloudformation.json) like so:
5252

5353
```
5454
{
5555
"ParameterKey": "InstanceType",
5656
"ParameterValue": "m3.xlarge"
57+
},
58+
{
59+
"ParameterKey": "KeyPair",
60+
"ParameterValue": "jsmith"
61+
},
62+
{
63+
"ParameterKey": "EC2VirtualizationType",
64+
"ParameterValue": "PV"
65+
},
66+
{
67+
"ParameterKey": "AssociatePublicIP",
68+
"ParameterValue": "false"
5769
}
5870
```
5971

6072
The only entry in cloudformation.json required to launch your cluster is `KeyPair`,
6173
which is already filled out. The defaults will be applied for the other settings.
6274

63-
## Choose whether to launch into a VPC
64-
65-
The provision script supports launching into Amazon VPC. You'll need to have already created and
66-
configured your VPC with at least one subnet and an internet gateway for the nodes.
75+
## Launch into an existing VPC
76+
By default, the provided CloudFormation script will create a new VPC for Deis. However, the script
77+
supports provisioning into an existing VPC instead. You'll need to have a VPC configured with an
78+
internet gateway and a sane routing table (the default VPC in a region should be ready to go).
6779

68-
To launch your cluster into a VPC, export three additional environment variables: ```VPC_ID```,
80+
To launch your cluster into an existing VPC, export three additional environment variables: ```VPC_ID```,
6981
```VPC_SUBNETS```, ```VPC_ZONES```. ```VPC_ZONES``` must list the availability zones of the
7082
subnets in order.
7183

0 commit comments

Comments
 (0)