Skip to content

Latest commit

 

History

History
87 lines (66 loc) · 3.17 KB

README.md

File metadata and controls

87 lines (66 loc) · 3.17 KB

Provision a Deis Cluster on DigitalOcean

Customize cloud-config.yml

Edit user-data and add a discovery URL. This URL will be used by all nodes in this Deis cluster. You can get a new discovery URL by sending a request to http://discovery.etcd.io/new.

Install docl and authorize:

The docl gem consumes the DigitalOcean API.

$ gem install docl

Before you can authorize you need to create a Personal Access Token. Make sure you create a read & write token. Copy paste the token (make sure you also save it somewhere encrypted) before you continue to the next step.

$ docl authorize

Upload keys

Choose an SSH keypair to use for Deis and import it to DigitalOcean:

$ docl upload_key deis ~/.ssh/deis.pub

This will print the ID of the uploaded key. Copy and paste the ID, you will need it in a later step.

In case you forget the ID of the public key you can retrieve it later with the following command:

$ docl keys

Choose number of instances

By default, the script will provision 3 servers. You can override this by setting DEIS_NUM_INSTANCES:

$ export DEIS_NUM_INSTANCES=5

Note 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.

Deploy cluster

Run the provision script:

$ ./provision-do-cluster.sh <REGION_ID> <SSH_ID> <SIZE>

Not all regions allow private networks. Choose one which does (at the time of this writing, NY 2 & 3, Amsterdam 2 & 3, Singapore 1 or London 1) - check the web UI for the current private network support.

You can enumerate all of the supported regions with:

$ docl regions --private_networking --metadata

Deis controller nodes will need at least 2 GB to even start all the services. Add the memory requirements of deployed applications and choose an adequate droplet size. The default is 8 GB. Specify the size with NGB, where N is 2, 4, 8, 16, 32 or 64.

This will print the IP addresses of the initialized machines.

Initialize the cluster

set DEISCTL_TUNNEL to one of the IPs of the virtual machines (these are printed on the console in a previous step). You can also login to the web interface of DigitalOcean to see the Public IP addresses.

$ export DEISCTL_TUNNEL=23.253.219.94
$ deisctl install platform && deisctl start platform

Deisctl will deploy Deis and make sure the services are started properly. Grab a coffee.

Configure DNS

You'll need to configure DNS records so you can access applications hosted on Deis. See Configuring DNS for details.

Use Deis!

After that, register with Deis!

$ deis register http://deis.example.org
username: deis
password:
password (confirm):
email: [email protected]

Hack on Deis

See Hacking on Deis.