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 .
- Docker container interconnection method - Part II
- CoreOS cluster three machines at the same time the case of death, how to restart Deis?
- [Deis document] management Deis configuration DNS
- [Deis documentation] using Deis using Dockerfiles
- 【Deis document】 custom Deis custom store-monitor
- Use HeheCloud to integrate SaaS services
Install the AWS command line interface
In order to use the Amazon API, we need to install awscli :
$ pip install awscli
Downloading awscli-1.5.0.tar.gz (248kB): 248kB downloaded
Successfully installed awscli
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/deis.pub
Select the number of instances
The script will open three servers by default. You can modify the value by setting DEIS_NUM_INSTANCES:
$ export DEIS_NUM_INSTANCES=5
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.
Any parameter defined by deis.template.json can be overridden by the value set in cloudformation.json , for example:
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 update-ec2-cluster.sh, 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:
Run the script
Run the cloudformation script to generate a new CoreOS cluster:
$ cd contrib/ec2
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.
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.