Skip to content

Commit a3dc69e

Browse files
author
Matthew Fisher
committed
Merge pull request #2251 from bacongobbler/do-docs
feat(docs): add DigitalOcean provisioning guide; refactor installing_deis
2 parents 943c131 + ad1c1cd commit a3dc69e

20 files changed

Lines changed: 415 additions & 196 deletions

deisctl/README.md

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,8 @@
44

55
## Installation
66

7-
### Latest deisctl
8-
9-
To install the latest `deisctl` on Linux or Mac OS X, run this command:
10-
11-
```console
12-
$ curl -sSL http://deis.io/deisctl/install.sh | sh
13-
```
14-
15-
The installer puts `deisctl` in your current directory and downloads current Deis unit files
16-
to *$HOME/.deis/units* one time. You should move `deisctl` somewhere in your $PATH.
17-
18-
To change installation options, save the installer directly from one of these links:
19-
20-
[![Download for Linux](http://img.shields.io/badge/download-Linux-brightgreen.svg?style=flat)](https://s3-us-west-2.amazonaws.com/opdemand/deisctl-0.15.0-dev-linux-amd64.run)
21-
[![Download for Mac OS X](http://img.shields.io/badge/download-Mac%20OS%20X-brightgreen.svg?style=flat)](https://s3-us-west-2.amazonaws.com/opdemand/deisctl-0.15.0-dev-darwin-amd64.run)
22-
23-
Then run the downloaded file as a shell script. Append `--help` to see what options
24-
are available.
25-
26-
### Builds for a specific Deis release
27-
28-
Note that this script will always give you the most freshly-built deisctl off master. If you are
29-
using a specific Deis release (not latest), you'll want to use the deisctl built for your release.
30-
31-
Builds are hosted on an S3 bucket at this URL format: `https://s3-us-west-2.amazonaws.com/opdemand/deisctl-<VERSION>-<darwin|linux>-amd64.run`
32-
33-
The deisctl release for Deis version 0.15.0 can be downloaded here: [Mac OS X](https://s3-us-west-2.amazonaws.com/opdemand/deisctl-0.15.0-darwin-amd64.run) | [Linux](https://s3-us-west-2.amazonaws.com/opdemand/deisctl-0.15.0-linux-amd64.run)
34-
35-
### Building from source
36-
37-
If you want to install from source, ensure you have [https://github.com/tools/godep](godep) installed, clone the repository and run
38-
39-
```console
40-
$ godep get .
41-
```
42-
43-
Then, export the `DEISCTL_UNITS` environment variable so deisctl can find the units:
44-
45-
```console
46-
$ export DEISCTL_UNITS="$PATH_TO_DEISCTL/units"
47-
```
48-
49-
This is also useful for specifying custom behavior on Deis units, such as using
50-
fleet metadata to lock the builder to a more powerful node, or keep application
51-
nodes free of control plane elements.
7+
Please refer to the installation docs at
8+
http://docs.deis.io/en/latest/managing_deis/install_deisctl/.
529

5310
## Remote Configuration
5411

docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ server: dirhtml
7070
test: clean
7171
@if [ ! -d venv ]; then virtualenv venv; fi
7272
venv/bin/pip install -q -r docs_requirements.txt
73-
venv/bin/$(SPHINXBUILD) -b dirhtml -N -W $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
73+
venv/bin/$(SPHINXBUILD) -b dirhtml -N $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
7474
grep -q \<h1\>Welcome _build/dirhtml/index.html || exit 1
7575
@echo
7676
@echo "Test finished. The HTML pages are in $(BUILDDIR)/dirhtml."

docs/index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33

44
Welcome
55
=======
6+
67
Deis (pronounced DAY-iss) is an open source PaaS that makes it easy to deploy and manage applications
78
on your own servers. Deis builds upon Docker and CoreOS to provide a lightweight PaaS with a
89
Heroku-inspired workflow.
910

10-
To get started with Deis, first read :ref:`Understanding Deis <understanding_deis>`.
11+
To get started with Deis, first read :ref:`Understanding Deis <understanding_deis>` then use
12+
:ref:`installing_deis` to start provisioning your cluster.
1113

1214
The full documentation tree can be seen :ref:`here <toctree>`.
1315

docs/installing_deis/aws.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
:title: Installing Deis on AWS
2+
:description: How to provision a multi-node Deis cluster on Amazon AWS
3+
4+
.. _deis_on_aws:
5+
6+
Amazon AWS
7+
==========
8+
9+
The `contrib/ec2` section of the Deis project includes shell scripts,
10+
documentation, and a customized CloudFormation template to make it easy
11+
to provision a multi-node Deis cluster on `Amazon AWS`_.
12+
13+
Please see `contrib/ec2`_ for details on using Deis on Amazon AWS.
14+
15+
16+
.. _`Amazon EC2`: https://github.com/deis/deis/tree/master/contrib/ec2#readme
17+
.. _`contrib/ec2`: https://github.com/deis/deis/tree/master/contrib/ec2

docs/installing_deis/baremetal.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
:title: Installing Deis on Bare Metal
2+
:description: How to provision a multi-node Deis cluster on Bare Metal
3+
4+
.. _deis_on_bare_metal:
5+
6+
Bare Metal
7+
----------
8+
9+
The `contrib/bare-metal` section of the Deis project includes documentation to help with
10+
provisioning a multi-node cluster on your own hardware.
11+
12+
Please see `contrib/bare-metal`_ for details on using Deis on bare metal.
13+
14+
.. _`contrib/bare-metal`: https://github.com/deis/deis/tree/master/contrib/bare-metal
Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
:title: Installing Deis on DigitalOcean
2+
:description: How to provision a multi-node Deis cluster on DigitalOcean
3+
4+
.. _deis_on_digitalocean:
5+
6+
DigitalOcean
7+
============
8+
9+
In this tutorial, we will show you how to set up your own 3-node cluster on DigitalOcean. This
10+
guide is also available in DigitalOcean's `Community site`_, so check out their guide as well!
11+
12+
Prerequisites
13+
-------------
14+
15+
To complete this guide, you must have the following:
16+
17+
- An SSH key for running operator's commands against the cluster using ``deisctl``
18+
- An SSH key for authorizing yourself against Deis' builder
19+
- A domain to point to the cluster
20+
- The ability to provision at least 3 DigitalOcean Droplets that are 2GB or greater
21+
22+
In order to provision the cluster, we will need to install a couple of administrative tools.
23+
`docl`_ is a convenience tool to help provision DigitalOcean Droplets. We will also require the
24+
`Deis Control Utility`_, which will assist us with installing, configuring and managing the Deis
25+
platform.
26+
27+
Generate a New Discovery URL
28+
----------------------------
29+
30+
To get started with provisioning the Droplets, we will need to generate a new Discovery URL.
31+
Discovery URLs help connect `etcd`_ instances together by storing a list of peer addresses and
32+
metadata under a unique address. You can generate a new discovery URL for use in your platform by
33+
running the following from the root of the repository:
34+
35+
.. code-block:: console
36+
37+
$ make discovery-url
38+
39+
This will write a new discovery URL to the user-data file. This file is used by DigitalOcean's v2
40+
metadata API to create and customize each machine in our cluster to our liking. Some convenience
41+
scripts are supplied in this user-data file, so it is mandatory for provisioning Deis.
42+
43+
Create CoreOS Droplets
44+
----------------------
45+
46+
Now that we have the user-data file, we can provision some Droplets. We've made this process simple
47+
by supplying a script that does all the heavy lifting for you. If you want to provision manually,
48+
however, start by uploading the SSH key you wish to use to log into each of these servers. After
49+
that, create at least three Droplets with the following specifications:
50+
51+
- At least 2GB -- more is recommended
52+
- All Droplets deployed in the same region
53+
- Region must have private networking enabled
54+
- Region must have User Data enabled. Supply the user-data file here
55+
- Select CoreOS Alpha channel
56+
- Select your SSH key from the list
57+
58+
If private networking is not available in your region, swap out ``$private_ipv4`` with
59+
``$public_ipv4`` in the user-data file.
60+
61+
If you want to use the script:
62+
63+
.. code-block:: console
64+
65+
$ gem install docl
66+
$ docl authorize
67+
$ docl upload_key deis ~/.ssh/deis.pub
68+
$ # retrieve your SSH key's ID
69+
$ docl keys
70+
deis (id: 12345)
71+
$ # retrieve the region name
72+
$ docl regions --metadata --private-networking
73+
Amsterdam 2 (ams2)
74+
Amsterdam 3 (ams3)
75+
London 1 (lon1)
76+
New York 3 (nyc3)
77+
Singapore 1 (sgp1)
78+
$ ./contrib/digitalocean/provision-do-cluster nyc3 12345 4GB
79+
80+
Which will provision 3 CoreOS nodes for use.
81+
82+
Configure DNS
83+
-------------
84+
85+
.. note::
86+
87+
If you're using your own third-party DNS registrar, please refer to their documentation on this
88+
setup, along with the :ref:`dns_records` required.
89+
90+
.. note::
91+
92+
If you don't have an available domain for testing, you can refer to the :ref:`xip_io`
93+
documentation on setting up a wildcard DNS for Deis.
94+
95+
Deis requires a wildcard DNS record to function properly. If the top-level domain (TLD) that you
96+
are using is ``example.com``, your applications will exist at the ``*.example.com`` level. For example, an
97+
application called ``app`` would be accessible via ``app.example.com``.
98+
99+
One way to configure this on DigitalOcean is to setup round-robin DNS via the `DNS control panel`_.
100+
To do this, add the following records to your domain:
101+
102+
- A wildcard CNAME record at your top-level domain, i.e. a CNAME record with * as the name, and @
103+
as the canonical hostname
104+
- For each CoreOS machine created, an A-record that points to the TLD, i.e. an A-record named @,
105+
with the droplet's public IP address
106+
107+
The zone file will now have the following entries in it: (your IP addresses will be different)
108+
109+
.. code-block:: console
110+
111+
* CNAME @
112+
@ IN A 104.131.93.162
113+
@ IN A 104.131.47.125
114+
@ IN A 104.131.113.138
115+
116+
For convenience, you can also set up DNS records for each node:
117+
118+
.. code-block:: console
119+
120+
deis-1 IN A 104.131.93.162
121+
deis-2 IN A 104.131.47.125
122+
deis-3 IN A 104.131.113.138
123+
124+
If you need help using the DNS control panel, check out `this tutorial`_ on DigitalOcean's
125+
community site.
126+
127+
Install Deis Control Utility
128+
----------------------------
129+
130+
Now that we have the CoreOS cluster set up, we will install the Deis Control Utility. This client
131+
will help us configure and install the platform on top of our CoreOS cluster. Please see
132+
:ref:`install_deisctl` for instructions.
133+
134+
Install Deis Platform
135+
---------------------
136+
137+
From the computer you installed the Deis tools on, we will provision the Deis platform. Ensure your
138+
SSH agent is running (and select the private key that corresponds to the SSH keys added to your
139+
CoreOS droplets):
140+
141+
.. code-block:: console
142+
143+
$ eval `ssh-agent -s`
144+
$ ssh-add ~/.ssh/deis
145+
146+
Find the public IP address of one of your CoreOS droplets, and export it to the DEISCTL_TUNNEL
147+
environment variable (substitute your own IP address):
148+
149+
.. code-block:: console
150+
151+
$ export DEISCTL_TUNNEL=104.131.93.162
152+
153+
If you set up the "convenience" DNS records, you can just refer to them via
154+
155+
.. code-block:: console
156+
157+
$ export DEISCTL_TUNNEL="deis-1.example.com"
158+
159+
This is the IP address where deisctl will attempt to communicate with the cluster. You can test
160+
that it is working properly by running deisctl list. If you see a single line of output, the
161+
control utility is communicating with the CoreOS machines.
162+
163+
Before provisioning the platform, we'll need to add the SSH key to deis so it can connect to remote
164+
hosts during ``deis run``:
165+
166+
.. code-block:: console
167+
168+
$ deisctl config platform set sshPrivateKey=~/.ssh/deis
169+
170+
We'll also need to tell the controller which domain name we are deploying applications under:
171+
172+
.. code-block:: console
173+
174+
$ deisctl config platform set domain=example.com
175+
176+
Once finished, run this command to provision the Deis platform:
177+
178+
.. code-block:: console
179+
180+
$ deisctl install platform
181+
182+
You will see output like the following, which indicates that the units required to run Deis have
183+
been loaded on the CoreOS cluster:
184+
185+
.. code-block:: console
186+
187+
● ▴ ■
188+
■ ● ▴ Installing Deis...
189+
▴ ■ ●
190+
191+
Scheduling data containers...
192+
...
193+
Deis installed.
194+
Please run `deisctl start platform` to boot up Deis.
195+
196+
Run this command to start the Deis platform:
197+
198+
.. code-block:: console
199+
200+
$ deisctl start platform
201+
202+
Once you see "Deis started.", your Deis platform is running on a cluster! You may verify that all
203+
of the Deis units are loaded and active by running the following command:
204+
205+
.. code-block:: console
206+
207+
$ deisctl list
208+
209+
All of the units should be active.
210+
211+
Now that you've finished provisioning a cluster, please refer to :ref:`using_deis` to get
212+
started using the platform.
213+
214+
215+
.. _`Community site`: https://www.digitalocean.com/community/tutorials/how-to-set-up-a-deis-cluster-on-digitalocean
216+
.. _`docl`: https://github.com/nathansamson/docl#readme
217+
.. _`Deis Control Utility`: https://github.com/deis/deis/tree/master/deisctl#readme
218+
.. _`DNS control panel`: https://cloud.digitalocean.com/domains
219+
.. _`etcd`: https://github.com/coreos/etcd
220+
.. _`this tutorial`: https://www.digitalocean.com/community/tutorials/how-to-set-up-a-host-name-with-digitalocean

docs/installing_deis/gce.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
:title: Installing Deis on Google Compute Engine
2+
:description: How to provision a multi-node Deis cluster on Google Compute Engine
3+
4+
.. _deis_on_gce:
5+
6+
Google Compute Engine
7+
---------------------
8+
9+
The `contrib/gce`_ folder of the Deis project includes a Python script and
10+
documentation to help get up and running with a multi-node Deis cluster on
11+
`Google Compute Engine`_.
12+
13+
Please see the `Google Compute Engine`_ documentation for more details on
14+
using Deis with Google Compute Engine.
15+
16+
17+
.. _`Google Compute Engine`: https://github.com/deis/deis/tree/master/contrib/gce#readme
18+
.. _`contrib/gce`: https://github.com/deis/deis/tree/master/contrib/gce

docs/installing_deis/index.rst

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,32 @@
22
:description: Step-by-step guide for operations engineers setting up a private PaaS using Deis.
33

44
.. _installing_deis:
5+
.. _provision-controller:
56

67
Installing Deis
78
================
89

10+
The `controller` is the brains of a Deis platform. Provisioning a Deis
11+
controller is a matter of creating one or more :ref:`concepts_coreos`
12+
machines and installing a few necessary *systemd* units to manage
13+
Docker containers.
14+
15+
Anywhere you can run CoreOS, you can run Deis, including most cloud
16+
providers, virtual machines, and bare metal. See the
17+
`CoreOS documentation`_ for more information on how to get set up
18+
with CoreOS.
19+
920
:Release: |version|
1021
:Date: |today|
1122

1223
.. toctree::
1324

25+
digitalocean
26+
aws
27+
vagrant
28+
gce
29+
rackspace
30+
baremetal
31+
1432

15-
provision-controller
16-
register-admin-user
17-
configure-load-balancers
18-
configure-dns
19-
ssl-endpoints
20-
upgrading-deis
33+
.. _`CoreOS Documentation`: https://coreos.com/docs/

0 commit comments

Comments
 (0)