Tuan-Anh Tran

Step by step how to install Deis on AWS

Posted on December 14, 2015  •  3 minutes  • 452 words

Deis (pronounced DAY-iss) is an open source PaaS that makes it easy to deploy and manage applications on your own servers. Deis builds upon Docker and CoreOS to provide a lightweight PaaS with a Heroku-inspired workflow.

I struggled installing Deis and it took me several times to get it right. Deis’s documentation is correct but not very straight forward so I decided to write this to help others that struggle like me. This steps works for me as of version 1.12.2

Preparation

$ cd ~/bin
$ curl -sSL http://deis.io/deisctl/install.sh | sh -s <latest-version-here>
$ # on CoreOS, add "sudo" to install to /opt/bin/deisctl
$ curl -sSL http://deis.io/deisctl/install.sh | sudo sh -s <latest-version-here>
$ pip install awscli
$ pip install pyyaml
$ aws configure
AWS Access Key ID [None]: ***************
AWS Secret Access Key [None]: ************************
Default region name [None]: us-west-1
Default output format [None]:
$ 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
$ eval `ssh-agent -s`
$ ssh-add ~/.ssh/deis
$ export DEIS_NUM_INSTANCES=5

Provision the cluster

$ make discovery-url
$ cd contrib/aws
$ ./provision-aws-cluster.sh
Creating CloudFormation stack deis
{
    "StackId": "arn:aws:cloudformation:us-east-1:69326027886:stack/deis/1e9916b0-d7ea-11e4-a0be-50d2020578e0"
}
Waiting for instances to be created...
Waiting for instances to be created... CREATE_IN_PROGRESS
Waiting for instances to pass initial health checks...
Waiting for instances to pass initial health checks...
Waiting for instances to pass initial health checks...
Instances are available:
i-5c3c91aa  203.0.113.91    m3.large        us-east-1a      running
i-403c91b6  203.0.113.20    m3.large        us-east-1a      running
i-e36fc6ee  203.0.113.31    m3.large        us-east-1b      running
Using ELB deis-DeisWebE-17PGCR3KPJC54 at deis-DeisWebE-17PGCR3KPJC54-1499385382.us-east-1.elb.amazonaws.com
Your Deis cluster has been successfully deployed to AWS CloudFormation and is started.
Please continue to follow the instructions in the documentation.

Install platform

$ export DEISCTL_TUNNEL=<ip-address-of-any-of-the-cluster-node>
$ deisctl config platform set sshPrivateKey=~/.ssh/deis
$ deisctl config platform set domain=deis.example.com # create a CNAME point this to the load balancer
$ deisctl install platform
$ deisctl start platform

After this, you should have a proper configured Deis cluster. Just install the client, register an account and you should be ready to deploy your very first application on Deis.

Follow me

Here's where I hang out in social media