Skip to content

Commit 9267de1

Browse files
author
Gabriel Monroy
committed
docs(readme): update root readme with new deisctl instructions
1 parent 8d08d43 commit 9267de1

1 file changed

Lines changed: 45 additions & 52 deletions

File tree

README.md

Lines changed: 45 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -6,89 +6,79 @@ Deis (pronounced DAY-iss) is an open source PaaS that makes it easy to deploy an
66

77
![Deis Graphic](https://s3-us-west-2.amazonaws.com/deis-images/deis-graphic.png)
88

9-
# Deploying Deis
10-
11-
Deis is a set of Docker containers that can be deployed anywhere including public cloud, private cloud, bare metal or your workstation. Decide where you'd like to deploy Deis, then follow the deployment-specific documentation for [Rackspace](contrib/rackspace/README.md), [EC2](contrib/ec2/README.md), [DigitalOcean](contrib/digitalocean/README.md), [Google Compute Engine](contrib/gce/README.md) or [bare-metal](contrib/bare-metal/README.md) provisioning. Documentation for other platforms is forthcoming. Want to see a particular platform supported? Open an [issue](https://github.com/deis/deis/issues/new) and we'll investigate.
12-
13-
Trying out Deis? Continue following these instructions for a local cluster setup. This is also a great Deis testing/development environment.
9+
Deis is pre-release software. The current release is [v0.11.0](https://github.com/deis/deis/tree/v0.11.0). Until there is a stable release, we recommend you check out the latest ["master" branch](https://github.com/deis/deis) code and refer to the [latest documentation](http://docs.deis.io/en/latest/). Upgrading from a previous Deis release? See [Upgrading Deis](http://docs.deis.io/en/latest/installing_deis/upgrading-deis/) for additional information.
1410

15-
# Upgrading Deis
11+
# Deploying Deis
1612

17-
Upgrading from a previous Deis release? See [Upgrading Deis](http://docs.deis.io/en/latest/installing_deis/upgrading-deis/) for additional information.
13+
Deis is a set of Docker containers that can be deployed anywhere including public cloud, private cloud, bare metal or your workstation. Decide where you'd like to deploy Deis, then follow the deployment-specific documentation for [Rackspace](contrib/rackspace/README.md), [EC2](contrib/ec2/README.md), [DigitalOcean](contrib/digitalocean/README.md), [Google Compute Engine](contrib/gce/README.md) or [bare-metal](contrib/bare-metal/README.md) provisioning. Documentation for other platforms is forthcoming. Want to see a particular platform supported? Please open an [issue](https://github.com/deis/deis/issues/new).
1814

19-
Deis is pre-release software. The current release is [v0.11.0](https://github.com/deis/deis/tree/v0.11.0).
20-
Until there is a stable release, we recommend you check out the latest
21-
["master" branch](https://github.com/deis/deis) code and refer
22-
to the [latest documentation](http://docs.deis.io/en/latest/).
15+
Trying out Deis? Continue following these instructions for a local installation using Vagrant.
2316

2417
## Install prerequisites
25-
On your workstation:
18+
19+
* Due to its nature as a distributed system, we strongly recommend using Deis with a minimum of 3 nodes even for local development and testing
20+
* The Deis containers will consume approxtimately 5 GB of RAM across the cluster. Please be sure you have sufficient free memory before proceeding.
2621
* Install [Vagrant v1.6+](http://www.vagrantup.com/downloads.html) and [VirtualBox](https://www.virtualbox.org/wiki/Downloads)
27-
* Install the fleetctl client: Install v0.8.1 from the [fleet GitHub page](https://github.com/coreos/fleet/releases/tag/v0.8.1).
2822

29-
A single-node cluster launched with Vagrant will consume about 5 GB of RAM on
30-
the host machine. Please be sure you have sufficient free memory before
31-
proceeding.
23+
Note for Ubuntu users: the VirtualBox package in Ubuntu (as of the last known release for 14.04) has some issues when running in RAM-constrained environments. Please install the lastest version of VirtualBox from Oracle's website.
3224

33-
Note for Ubuntu users: the VirtualBox package in Ubuntu (as of the last known
34-
release for 14.04) has some issues when running in RAM-constrained
35-
environments. Please install the lastest version of VirtualBox from Oracle's
36-
website.
25+
## Configure Discovery
3726

38-
## Additional setup for a multi-node cluster
39-
If you'd like to spin up more than one VM to test an entire cluster, there are a few additional prerequisites:
40-
* Edit [contrib/coreos/user-data](contrib/coreos/user-data) and add a unique discovery URL generated from `https://discovery.etcd.io/new`
41-
* Set `DEIS_NUM_INSTANCES` to the desired size of your cluster (typically 3 or 5): ```$ export DEIS_NUM_INSTANCES=3```
42-
* If you'd like to spin up more than one router, set `DEIS_NUM_ROUTERS`: ```$ export DEIS_NUM_ROUTERS=2```
43-
* Instead of `local.deisapp.com`, use either `local3.deisapp.com` or `local5.deisapp.com` as your cluster domain
27+
Each time you spin up a new CoreOS cluster, you **must** provide a new [discovery service URL](https://coreos.com/docs/cluster-management/setup/cluster-discovery/) in the [CoreOS user-data](https://coreos.com/docs/cluster-management/setup/cloudinit-cloud-config/) file. This URL allows hosts to find each other and perform initial leader election.
4428

45-
Note that for scheduling to work properly, clusters must consist of at least 3 nodes and always have an odd number of members.
46-
For more information, see [optimal etcd cluster size](https://github.com/coreos/etcd/blob/master/Documentation/optimal-cluster-size.md).
29+
Automatically generate a fresh discovery URL with:
4730

48-
Deis clusters of less than 3 nodes are unsupported for anything other than local development.
31+
```console
32+
$ sed -i -e "s,# discovery: https://discovery.etcd.io/12345693838asdfasfadf13939923,discovery: $(curl -q -w '\n' https://discovery.etcd.io/new)," contrib/coreos/user-data
33+
```
34+
35+
...or manually edit [contrib/coreos/user-data](contrib/coreos/user-data) and add a unique discovery URL generated from `https://discovery.etcd.io/new`.
4936

5037
## Boot CoreOS
5138

52-
First, start the CoreOS cluster on VirtualBox. From a command prompt, `cd` to the root of the Deis project code and type:
39+
Start the CoreOS cluster on VirtualBox. From a command prompt, `cd` to the root of the Deis project code and type:
5340

5441
```console
42+
$ export DEIS_NUM_INSTANCES=3
5543
$ vagrant up
5644
```
5745

58-
This instructs Vagrant to spin up each VM. To be able to connect to the VMs, you must add your Vagrant-generated SSH key to the ssh-agent (fleetctl tunnel requires the agent to have this key):
46+
This instructs Vagrant to spin up 3 VMs. To be able to connect to the VMs, you must add your Vagrant-generated SSH key to the ssh-agent (`deisctl` requires the agent to have this key):
47+
5948
```console
6049
$ ssh-add ~/.vagrant.d/insecure_private_key
6150
```
6251

63-
Export `FLEETCTL_TUNNEL` so you can connect to the VM using the `fleetctl` client on your workstation.
52+
## Provision Deis
53+
54+
Install the [deisctl utility](https://github.com/deis/deisctl#installation) used to provision and operate Deis.
6455

6556
```console
66-
$ export FLEETCTL_TUNNEL=172.17.8.100
57+
$ curl -sSL http://deis.io/deisctl/install.sh | sudo sh
6758
```
6859

69-
## Optional: Build Deis
70-
71-
If you'd like to build Deis from source instead of using the pre-built public Dockerfiles, use `make build` to build each component from its Dockerfile. Grab some coffee while it builds the images on each VM (it can take a while).
72-
If you're not testing code changes for Deis, it's faster just to skip to the next step.
60+
Export `DEISCTL_TUNNEL` so you can connect to one of the VMs using the `deisctl` client on your workstation.
7361

7462
```console
75-
$ make build
63+
$ export DEISCTL_TUNNEL=172.17.8.100
7664
```
7765

78-
## Run Deis
79-
80-
Use `make run` to start all Deis components. This can take some time - the registry service will pull and prepare a large Docker image. Grab some more coffee!
66+
Use `deisctl install platform` to start all Deis components across the cluster. This can take some time - the registry service will pull and prepare a large Docker image, the builder service will download the Heroku cedar stack. Grab some more coffee!
8167

8268
```console
83-
$ make run
69+
$ deisctl install platform
8470
```
8571

86-
Your Vagrant VM is accessible at `local.deisapp.com` (or `local3.deisapp.com`/`local5.deisapp.com`). For clusters on other platforms (EC2, Rackspace, DigitalOcean, bare metal, etc.), see our guide to [Configuring DNS](http://docs.deis.io/en/latest/installing_deis/configure-dns/).
72+
Your Deis installation should now be accessible at `deis.local3.deisapp.com`.
73+
74+
For clusters on other platforms (EC2, Rackspace, DigitalOcean, bare metal, etc.), see our guide to [Configuring DNS](http://docs.deis.io/en/latest/installing_deis/configure-dns/).
8775

8876
## Testing the cluster
77+
8978
Integration tests and corresponding documentation can be found under the `test/` folder.
9079

9180
## Install the Deis Client
81+
9282
If you're using the latest Deis release, use `pip install --upgrade deis` to install the latest [Deis Client](https://pypi.python.org/pypi/deis/) or download [pre-compiled binaries](https://github.com/deis/deis/tree/master/client#get-started).
9383

9484
If you're working off master, precompiled binaries are likely out of date. You should either symlink the python file directly or build a local copy of the client:
@@ -106,7 +96,7 @@ $ cd client && python setup.py install
10696
Use the Deis Client to register a new user.
10797

10898
```console
109-
$ deis register http://deis.local.deisapp.com
99+
$ deis register http://deis.local3.deisapp.com
110100
$ deis keys:add
111101
```
112102

@@ -117,12 +107,12 @@ Use `deis keys:add` to add your SSH public key for `git push` access.
117107
Initialize a `dev` cluster with a list of CoreOS hosts and your CoreOS private key.
118108

119109
```console
120-
$ deis clusters:create dev local.deisapp.com --hosts=172.17.8.100 --auth=~/.vagrant.d/insecure_private_key
110+
$ deis clusters:create dev local3.deisapp.com --hosts=172.17.8.100 --auth=~/.vagrant.d/insecure_private_key
121111
```
122112

123113
The parameters to `deis clusters:create` are:
124114
* cluster name (`dev`) - the name used by Deis to reference the cluster
125-
* cluster hostname (`local.deisapp.com`) - the hostname under which apps are created, like `balancing-giraffe.local.deisapp.com`
115+
* cluster hostname (`local.3deisapp.com`) - the hostname under which apps are created, like `balancing-giraffe.local3.deisapp.com`
126116
* cluster members (`--hosts`) - a comma-separated list of cluster members -- not necessarily all members, but at least one (for cloud providers, this is a list of the IPs like `--hosts=10.21.12.1,10.21.12.2,10.21.12.3`)
127117
* auth SSH key (`--auth`) - the SSH private key used to provision servers -- cannot have a password (for cloud providers, this key is likely `~/.ssh/deis`)
128118

@@ -192,17 +182,20 @@ Use `deis run` to execute one-off commands and explore the deployed container.
192182

193183
Common issues that users have run into when provisioning Deis are detailed below.
194184

195-
#### When running a `make` action - 'Failed initializing SSH client: ssh: handshake failed: ssh: unable to authenticate'
185+
#### When running a `deisctl` command - 'Failed initializing SSH client: ssh: handshake failed: ssh: unable to authenticate'
196186
Did you remember to add your SSH key to the ssh-agent? `ssh-add -L` should list the key you used to provision the servers. If it's not there, `ssh-add -K /path/to/your/key`.
197187

198-
#### When running a `make` action - 'All the given peers are not reachable (Tried to connect to each peer twice and failed)'
199-
The most common cause of this issue is that a [new discovery URL](https://discovery.etcd.io/new) wasn't generated and updated in [contrib/coreos/user-data](contrib/coreos/user-data) before the cluster was launched. Each Deis cluster must have a unique discovery URL, else there will be entries for old hosts that etcd will try and fail to connect to. Destroy and relaunch the cluster, ensuring to use a fresh discovery URL.
188+
#### When running a `deisctl` command - 'All the given peers are not reachable (Tried to connect to each peer twice and failed)'
189+
The most common cause of this issue is that a [new discovery URL](https://discovery.etcd.io/new) wasn't generated and updated in [contrib/coreos/user-data](contrib/coreos/user-data) before the cluster was launched. Each Deis cluster must have a unique discovery URL, else there will be entries for old hosts that etcd will try and fail to connect to. Trying destroying and relaunching the cluster with a fresh discovery URL.
200190

201191
#### Scaling an app doesn't work, and/or the app shows 'Welcome to nginx!'
202-
This means the controller failed to submit jobs for the app to fleet. `fleetctl status deis-controller` will show detailed error information, but the most common cause of this is that the cluster was created with the wrong SSH key for the `--auth` parameter. The key supplied with the `--auth` parameter must be the same key that was used to provision the Deis servers. If you suspect this to be the issue, you'll need to `clusters:destroy` the cluster and recreate it, along with the app.
192+
This usually means the controller failed to submit jobs to the scheduler. `deisctl journal controller` will show detailed error information, but the most common cause of this is that the cluster was created with the wrong SSH key for the `--auth` parameter. The key supplied with the `--auth` parameter must be the same key that was used to provision the Deis servers. If you suspect this to be the issue, you'll need to `clusters:destroy` the cluster and recreate it, along with the app.
203193

204194
#### A Deis component fails to start
205-
Use `fleetctl status deis-<component>.service` to get the output of the service. The most common cause of services failing to start are sporadic issues with the Docker index. The telltale sign of this is:
195+
196+
Use `deisctl status <component>` to view the status of the component. You can also use `deisctl journal <component>` to tail logs for a component, or `deisctl list` to list all components.
197+
198+
The most common cause of services failing to start are sporadic issues with DockerHub. The telltale sign of this is:
206199

207200
```console
208201
May 12 18:24:37 deis-3 systemd[1]: Starting deis-controller...
@@ -214,7 +207,7 @@ May 12 18:29:47 deis-3 systemd[1]: Failed to start deis-controller.
214207
May 12 18:29:47 deis-3 systemd[1]: Unit deis-controller.service entered failed state.
215208
```
216209

217-
We are exploring workarounds and are working with the Docker team to improve their index. In the meantime, try starting the service again with `fleetctl start deis-<component>.service`.
210+
We are exploring workarounds and are working with the Docker team to improve DockerHub reliability. In the meantime, try starting the service again with `deisctl restart <component>`.
218211

219212
### Any other issues
220213
Running into something not detailed here? Please [open an issue](https://github.com/deis/deis/issues/new) or hop into #deis and we'll help!

0 commit comments

Comments
 (0)