Install the AWS Command Line Interface:
$ pip install awscli
Downloading/unpacking awscli
Downloading awscli-1.3.6.tar.gz (173kB): 173kB downloaded
...Run aws configure to set your AWS credentials:
$ aws configure
AWS Access Key ID [None]: ***************
AWS Secret Access Key [None]: ************************
Default region name [None]: us-west-1
Default output format [None]:Generate and upload a new keypair to AWS, ensuring that the name of the keypair is set to "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.pubBy default, the script will provision 3 servers. You can override this by setting DEIS_NUM_INSTANCES:
$ export DEIS_NUM_INSTANCES=5Note that for scheduling to work properly, clusters must consist of at least 3 nodes and always have an odd number of members. For more information, see optimal etcd cluster size.
Deis clusters of less than 3 nodes are unsupported.
By default, the Makefile will provision 1 router. You can override this by setting DEIS_NUM_ROUTERS:
$ export DEIS_NUM_ROUTERS=2Edit user-data and add a new discovery URL. You can get a new one by sending a request to http://discovery.etcd.io/new.
By default, this script spins up m3.large instances. You can override this by adding a new entry to cloudformation.json like so:
{
"ParameterKey": "InstanceType",
"ParameterValue": "m3.xlarge"
}
The only entry in cloudformation.json required to launch your cluster is KeyPair,
which is already filled out. The defaults will be applied for the other settings.
Run the cloudformation provision script to spawn a new CoreOS cluster:
$ cd contrib/ec2
$ ./provision-ec2-cluster.sh
{
"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.Once the cluster is up, get the hostname of any of the machines from EC2, set
FLEETCTL_TUNNEL, and issue a make run from the project root:
$ ssh-add ~/.ssh/deis
$ export FLEETCTL_TUNNEL=ec2-12-345-678-90.us-west-1.compute.amazonaws.com
$ cd ../.. && make runThe script will deploy Deis and make sure the services start properly.
While you can reference the controller and hosted applications with public hostnames provided by EC2, it is recommended for ease-of-use that you configure your own DNS records using a domain you own. See Configuring DNS for details.
After that, register with Deis!
$ deis register http://deis.example.org
username: deis
password:
password (confirm):
email: info@opdemand.comIf you'd like to use this deployment to build Deis, you'll need to set DEIS_HOSTS to an array of your cluster hosts:
$ DEIS_HOSTS="1.2.3.4 2.3.4.5 3.4.5.6" make buildThis variable is used in the make build command.