You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
14
10
15
-
# Upgrading Deis
11
+
# Deploying Deis
16
12
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).
18
14
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.
23
16
24
17
## 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.
26
21
* 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).
28
22
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.
32
24
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
37
26
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.
44
28
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:
47
30
48
-
Deis clusters of less than 3 nodes are unsupported for anything other than local development.
...or manually edit [contrib/coreos/user-data](contrib/coreos/user-data) and add a unique discovery URL generated from `https://discovery.etcd.io/new`.
49
36
50
37
## Boot CoreOS
51
38
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:
53
40
54
41
```console
42
+
$ export DEIS_NUM_INSTANCES=3
55
43
$ vagrant up
56
44
```
57
45
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
+
59
48
```console
60
49
$ ssh-add ~/.vagrant.d/insecure_private_key
61
50
```
62
51
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.
64
55
65
56
```console
66
-
$ export FLEETCTL_TUNNEL=172.17.8.100
57
+
$ curl -sSL http://deis.io/deisctl/install.sh | sudo sh
67
58
```
68
59
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.
73
61
74
62
```console
75
-
$ make build
63
+
$ export DEISCTL_TUNNEL=172.17.8.100
76
64
```
77
65
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!
81
67
82
68
```console
83
-
$ make run
69
+
$ deisctl install platform
84
70
```
85
71
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/).
87
75
88
76
## Testing the cluster
77
+
89
78
Integration tests and corresponding documentation can be found under the `test/` folder.
90
79
91
80
## Install the Deis Client
81
+
92
82
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).
93
83
94
84
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:
@@ -117,12 +107,12 @@ Use `deis keys:add` to add your SSH public key for `git push` access.
117
107
Initialize a `dev` cluster with a list of CoreOS hosts and your CoreOS private key.
118
108
119
109
```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
121
111
```
122
112
123
113
The parameters to `deis clusters:create` are:
124
114
* 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`
126
116
* 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`)
127
117
* 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`)
128
118
@@ -192,17 +182,20 @@ Use `deis run` to execute one-off commands and explore the deployed container.
192
182
193
183
Common issues that users have run into when provisioning Deis are detailed below.
194
184
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'
196
186
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`.
197
187
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.
200
190
201
191
#### 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.
203
193
204
194
#### 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:
206
199
207
200
```console
208
201
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.
214
207
May 12 18:29:47 deis-3 systemd[1]: Unit deis-controller.service entered failed state.
215
208
```
216
209
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>`.
218
211
219
212
### Any other issues
220
213
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