Skip to content

Latest commit

 

History

History
125 lines (96 loc) · 4.22 KB

README.md

File metadata and controls

125 lines (96 loc) · 4.22 KB

Provision a Deis Cluster on Rackspace

We'll mostly be following the CoreOS on Rackspace guide. You'll need to have a sane python environment with pip already installed (sudo easy_install pip).

Install supernova and its dependencies:

$ sudo pip install keyring
$ sudo pip install rackspace-novaclient
$ sudo pip install supernova

Configure supernova

Edit ~/.supernova to match the following:

[production]
OS_AUTH_URL = https://identity.api.rackspacecloud.com/v2.0/
OS_USERNAME = {rackspace_username}
OS_PASSWORD = {rackspace_api_key}
OS_TENANT_NAME = {rackspace_account_id}
OS_REGION_NAME = DFW (or ORD or another region)
OS_AUTH_SYSTEM = rackspace

Your account ID is displayed in the upper right-hand corner of the cloud control panel UI, and your API key can be found on the Account Settings page.

Set up your keys

Choose an existing keypair or generate a new one, if desired. Tell supernova about the key pair and give it an identifiable name:

$ supernova production keypair-add --pub-key ~/.ssh/deis.pub deis-key

Customize user-data

Create a user-data file with a new discovery URL this way:

$ make discovery-url

Or copy contrib/coreos/user-data.example to contrib/coreos/user-data and follow the directions in the etcd: section to add a unique discovery URL.

Choose number of instances

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

$ DEIS_NUM_INSTANCES=5 ./provision-rackspace-cluster.sh deis-key

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.

Run the provision script

Run the Rackspace provision script to spawn a new CoreOS cluster. You'll need to provide the name of the key pair you just added. Optionally, you can also specify a flavor name.

$ cd contrib/rackspace
$ ./provision-rackspace-cluster.sh
Usage: provision-rackspace-cluster.sh <key pair name> [flavor]
$ ./provision-rackspace-cluster.sh deis-key

Configure Deis

Set the default domain used to anchor your applications:

$ deisctl config platform set domain=mycluster.local

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

If you want to allow deis run for one-off admin commands, you must provide an SSH private key that allows Deis to gather container logs on CoreOS hosts:

$ deisctl config platform set sshPrivateKey=<path-to-private-key>

Initialize the cluster

Once the cluster is up, get the hostname of any of the machines from Rackspace, set DEISCTL_TUNNEL and install the platform:

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

The installer will deploy Deis and make sure the services start properly.

Choose number of routers

By default, deisctl will provision 1 router. You can override this by scaling up:

$ deisctl scale router=2

Configure DNS

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

Configure Load Balancer

You'll need to create two load balancers on Rackspace to handle your cluster.

Load Balancer 1
Port 80
Protocol HTTP
Health Monitoring -
  Monitor Type HTTP
  HTTP Path /health-check

Load Balancer 2
Virtual IP Shared VIP on Another Load Balancer (select Load Balancer 1)
Port 2222
Protocol TCP

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.