Deis installs the Amazon AWS

Note: This article translated from Deis official documents, without any commercial purposes, reproduced please indicate the source.

In this tutorial, we will show you how to create a 3-node cluster on AWS.
Please read this article and get the source code and refer to the script in contrib / ec2 .

Install the AWS command line interface

In order to use the Amazon API, we need to install awscli :
$ pip install awscli
Downloading/unpacking awscli
Downloading awscli-1.5.0.tar.gz (248kB): 248kB downloaded
Successfully installed awscli

Configure aws-cli

Run aws configure set your AWS authentication information:
$ aws configure
AWS Access Key ID [None]: ***************
AWS Secret Access Key [None]: ************************
Default region name [None]: us-west-1
Default output format [None]:

Upload the key

Generate and upload a new key pair to AWS to ensure that the name of the key pair is deis.
$ ssh-keygen -q -t rsa -f ~/.ssh/deis -N '' -C deis
$ aws ec2 import-key-pair --key-name deis --public-key-material file://~/.ssh/

Select the number of instances

The script will open three servers by default. You can modify the value by setting DEIS_NUM_INSTANCES:

Note that in order to ensure that the schedule is working properly, the cluster must consist of at least three nodes, and the number of members is always odd. For more information, see ” Best Bundle Cluster Size “.
Do not support Deis clusters with fewer than three nodes.

Generate a new discovery URL

Discover URLs Keep the address and metadata of the node under a unique identity to connect the etcd instances together. Run the following command in the root directory of the repository to generate a contrib / coreos / user-data file with a new discovery URL:
$ make discovery-url

User-data contains the necessary scripts, so do not open the Deis cluster before the make discovery-url is run.

Customize cloudformation.json

Any parameter defined by deis.template.json can be overridden by the value set in cloudformation.json , for example:
"ParameterKey": "InstanceType",
"ParameterValue": "m3.xlarge"
"ParameterKey": "KeyPair",
"ParameterValue": "jsmith"
"ParameterKey": "EC2VirtualizationType",
"ParameterValue": "PV"
"ParameterKey": "AssociatePublicIP",
"ParameterValue": "false"

The only necessary entry in cloudformation.json to start the cluster is KeyPair, which has been filled out. Other settings will be specified by default.
If you update with, the InstanceType parameter will only affect the newly deployed instance ( # 1758 ).
Note: The smallest recommended instance is very large. When using a cluster, the CPU or out of memory will cause problems.

Start existing VPC

By default, the provided CloudFormation script will create a new VPC for Deis. However, this script also supports the opening to the existing VPC. You need a VPC with an Internet gateway configured and a robust routing table (an initial VPC in an area is ready).
In order to start the cluster in an existing VPC, you need to set up three additional environment variables:
VPC_ZONES must list the available areas of the subnet in order.
For example, suppose your VPC ID is vpc-a26218bf, by subnet subnet-04d7f942 (located in us-east-1b) and subnet-2b03ab7f (us-east-1c), you need to set:
export VPC_ID=vpc-a26218bf
export VPC_SUBNETS=subnet-04d7f942,subnet-2b03ab7f
export VPC_ZONES=us-east-1b,us-east-1c

Run the script

Run the cloudformation script to generate a new CoreOS cluster:
$ cd contrib/ec2
$ ./
"StackId": "arn:aws:cloudformation:us-west-1:413516094235:stack/deis/9699ec20-c257-11e3-99eb-50fa01cd4496"
Your Deis cluster has successfully deployed.
Please wait for all instances to come up as "running" before continuing.

Check the AWS EC2 web control panel and wait for all instances of “Status Checks” to pass. It will take a few minutes.

Configure DNS

Refer to ” Configuring DNS ” for more information on setting up Deis related DNS records correctly.

Install the Deis platform

Now that you have completed the cluster, please refer to ” Installing the Deis Platform ” to start the platform installation.

Heads up! This alert needs your attention, but it's not super important.