Skip to content

Commit 5cfe5d4

Browse files
author
Matthew Fisher
committed
Merge pull request #215 from bacongobbler/docs-quickstart-cleanup
ref(docs): clean up quickstart documentation
2 parents c6977ba + 1304c05 commit 5cfe5d4

4 files changed

Lines changed: 62 additions & 156 deletions

File tree

docs/src/installing-deis/installing-the-deis-platform.md

Lines changed: 0 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,6 @@ $ helm repo add deis https://github.com/deis/charts
3737
$ helm fetch deis/deis
3838
```
3939

40-
## Set up the Deis Router
41-
42-
Now that you have the Deis chart, you'll need to make a minor edit to the
43-
`deis-router-rc.yaml` Kubernetes manifest file to prepare the router to accept
44-
incoming traffic on a domain of your choice. Follow the following steps to make
45-
the edit:
46-
47-
1. Open the `$(helm home)/workspace/charts/deis/manifests/deis-router-rc.yaml`
48-
file in your favorite editor. Note that `$(helm home)` executes the command to get
49-
the directory that helm uses to store its config and all its charts. See
50-
http://helm.readthedocs.org/en/latest/workspace/ for details.
51-
2. Replace `example.com` under `metadata.annotations.deis.io/routerConfig` with
52-
the domain of your choice. This will be called the _platform domain_. You may choose
53-
any domain, but the `Routing Traffic` section below details how to configure DNS or your
54-
host to use that domain properly, so you may want to read that section before proceeding.
55-
5640
## Launch Your Deis Cluster
5741

5842
Now that you have it prepared, launch the Deis cluster with:
@@ -71,137 +55,6 @@ $ kubectl get pods --namespace=deis
7155

7256
Once you see all of the pods in the `READY` state, your Deis platform is running on a cluster!
7357

74-
## A Note on Routing Traffic
75-
76-
As mentioned above, the Deis router component is responsible for accepting traffic
77-
from outside the Kubernetes cluster and directing appropriately. It uses the
78-
incoming request's HTTP `Host` header to direct traffic to Deis components and
79-
to applications deployed via Deis.
80-
81-
### Getting Traffic to the Cluster
82-
83-
You already configured the router with a platform domain in the above setup instructions.
84-
This section details how to configure DNS and/or your local `/etc/hosts` file so that
85-
traffic bound for `*.your-platform.domain` will make it to your Kubernetes cluster
86-
and the Deis router.
87-
88-
#### Using an Automatically Provisioned Load Balancer
89-
90-
If your Kubernetes cluster and the underlying infrastructure
91-
support it, the Deis router's service (which is of `type:
92-
LoadBalancer`) will automatically provision an "external"
93-
(external to the Kubernetes cluster) load balancer. On AWS,
94-
for instance, this takes the form of an ELB, while on Google
95-
Container Engine, it takes the form of a routing rule.
96-
97-
If it is supported, you will be able to find the DNS name or
98-
IP(s) of the external load balancer like so:
99-
100-
```
101-
$ kubectl describe service deis-router --namespace=deis
102-
```
103-
104-
Examine the `LoadBalancer Ingress` field to find the DNS
105-
name or IP(s). The former can be added to DNS as a CNAME,
106-
while the latter can be added as an A record.
107-
108-
#### Creating Your Own Load Balancer
109-
110-
On Kubernetes clusters and underlying infrastructure that
111-
do not support the automated provisioning of an external
112-
load balancer for the Deis router, you may provision your
113-
own and add _all_ minion nodes of the Kubernetes cluster to
114-
the pool.
115-
116-
The load balancer must pass incoming traffic on the
117-
following ports to the _same_ ports on the Kubernetes
118-
worker nodes:
119-
120-
* 80
121-
* 443
122-
* 2222
123-
* 9090
124-
125-
The Deis router component listens to those ports on any
126-
host it runs on. Since not _all_ nodes are likely to
127-
be running the router, a health check should be used to
128-
determine which node(s) can serve requests. The router's
129-
healthcheck should use the HTTP protocol, port `9090`, and
130-
the request path `/healthz`.
131-
132-
Load balancer idle timeouts should be set to at least `1200`
133-
seconds so connections do not close prematurely during longer
134-
running requests such as application deployments.
135-
136-
#### Without a Load Balancer
137-
138-
On some platforms (Vagrant, for instance) a load balancer is
139-
not an easy or practical thing to provision. In these cases,
140-
one can directly identify the public IP of a Kubernetes node
141-
that is hosting a router pod and use that information to
142-
configure DNS or the local `/etc/hosts` file.
143-
144-
You can find the IP address of a node using `kubectl`:
145-
146-
```
147-
$ kubectl get pods --namespace=deis | grep deis-router
148-
deis-router-ih25q 1/1 Running 0 2h
149-
```
150-
151-
Using the pod name determined through the above, one can
152-
use `kubectl` to determine what node the pod is running on:
153-
154-
```
155-
$ kubectl describe pod deis-router-ih25q --namespace=deis
156-
```
157-
158-
The `Node` field of the response should provide an IP:
159-
160-
```
161-
Node: 10.245.1.3/
162-
```
163-
164-
If the IP is public, this can be used to configure DNS or the
165-
local `/etc/hosts` file.
166-
167-
In your `/etc/hosts` file, add an entry like this:
168-
169-
```
170-
10.245.1.3 example.com deis.example.com
171-
```
172-
173-
This route will get you started, though you may find that you have to
174-
manually maintain this file.
175-
176-
#### Using a DNS Service
177-
178-
With any of the avenues described above, some hassle may be spared by
179-
leveraging a service such as `xip.io`, which will not require any
180-
editing of DNS records or local `/etc/hosts` files.
181-
182-
Simply determine the correct IP to route your traffic to (as described
183-
above), then configure the router's platform domain to be `<ip>.xip.io`
184-
185-
### Testing
186-
187-
To test that traffic reaches its intended destination, a request can be
188-
sent to the Deis controller like so:
189-
190-
```
191-
curl http://deis.<platform domain>/v2/
192-
```
193-
194-
Since such requests require authentication, a response such as
195-
the following is an indicator of success:
196-
197-
```
198-
{"detail":"Authentication credentials were not provided."}
199-
```
200-
201-
## Next Steps
202-
203-
Now that you've finished provisioning a cluster, start [Using Deis][] to deploy your first
204-
application on Deis.
20558

20659
[install deisctl]: installing-deisctl.md
20760
[helm]: http://helm.sh

docs/src/installing-deis/quickstart.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,20 @@ Choose one of the following providers and deploy a new kubernetes cluster:
1414
- [Google Container Engine](https://cloud.google.com/container-engine/docs/before-you-begin)
1515
- [Vagrant](http://kubernetes.io/v1.1/docs/getting-started-guides/vagrant.html)
1616

17-
## Configure DNS
18-
19-
See [Configuring DNS][] for more information on properly setting up your DNS records with Deis.
20-
2117
## Install Deis Platform
2218

2319
Now that you've finished provisioning a cluster, please [Install the Deis Platform][install deis].
2420

21+
## Configure DNS
22+
23+
See [Configuring DNS][] for more information on properly setting up your DNS records with Deis.
24+
2525
## Register a User
2626

2727
Once your cluster has been provisioned and the Deis Platform has been installed, you can
2828
[install the client][client] and [register your first user][register]!
2929

30+
3031
[client]: ../using-deis/installing-the-client.md
3132
[configuring object storage]: configuring-object-storage.md
3233
[configuring dns]: ../managing-deis/configuring-dns.md

docs/src/managing-deis/configuring-dns.md

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,67 @@ Apps can then be accessed by browsers at `appname.myapps.com`, and the controlle
1818

1919
These records are necessary for all deployments of Deis other than Vagrant clusters.
2020

21-
## Using xip.io
21+
## DNS without a Load Balancer
2222

23-
For local Vagrant clusters or for dev clusters, you can use [xip][] to reference the IP of your load balancer. For example:
23+
On some platforms (Vagrant, for instance), a load balancer is not an easy or practical thing to
24+
provision. In these cases, one can directly identify the public IP of a Kubernetes node that is
25+
hosting a router pod and use that information to configure DNS or the local `/etc/hosts` file.
2426

25-
$ deis register http://deis.10.21.12.2.xip.io
27+
You can find the IP address of a node using `kubectl`:
2628

27-
You would then create the cluster with `10.21.12.2.xip.io` as the cluster domain.
29+
```
30+
$ kubectl get pods --namespace=deis | grep deis-router
31+
deis-router-ih25q 1/1 Running 0 2h
32+
```
33+
34+
Using the pod name determined through the above, one can
35+
use `kubectl` to determine what node the pod is running on:
36+
37+
```
38+
$ kubectl describe pod deis-router-ih25q --namespace=deis
39+
```
40+
41+
The `Node` field of the response should provide an IP:
42+
43+
```
44+
Node: 10.245.1.3/
45+
```
46+
47+
If the IP is public, this can be used to configure DNS or the
48+
local `/etc/hosts` file.
49+
50+
An easy way to configure wildcard DNS is to use [xip.io][] to reference the IP of the node running
51+
your router. For example:
52+
53+
$ deis register http://deis.10.245.1.3.xip.io
2854

2955
Note that xip does not seem to work for AWS ELBs - you will have to use an actual DNS record.
3056

57+
Alternatively, in your `/etc/hosts` file, add an entry like this:
58+
59+
```
60+
10.245.1.3 example.com deis.example.com
61+
```
62+
63+
This will get you started, though you may find that you have to manually maintain this file as you
64+
create and deploy more applications to the cluster.
65+
66+
## Testing
67+
68+
To test that traffic reaches its intended destination, a request can be
69+
sent to the Deis controller like so:
70+
71+
```
72+
curl http://deis.example.com/v2/
73+
```
74+
75+
Since such requests require authentication, a response such as
76+
the following is an indicator of success:
77+
78+
```
79+
{"detail":"Authentication credentials were not provided."}
80+
```
81+
3182
[AWS recommends]: https://docs.aws.amazon.com/ElasticLoadBalancing/latest/DeveloperGuide/using-domain-names-with-elb.html
3283
[load balancer]: configuring-load-balancers.md
3384
[Route 53]: http://aws.amazon.com/route53/

docs/src/managing-deis/configuring-load-balancers.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ Deis includes multiple routers scheduled to the cluster as part of the router me
55
These ports need to be open on the load balancers:
66

77
* 80 (for application traffic and for API calls to the controller)
8+
* 443 (for secure traffic to the controller and applications, if applicable)
89
* 2222 (for traffic to the builder)
910

1011
If you want to configure SSL termination on your load balancer, see [Platform SSL](platform-ssl.md).
1112

12-
A health check should be configured on the load balancer to send an HTTP request to /health-check at port 80 on all nodes in the Deis cluster. The health check endpoint returns an HTTP 200. This enables the load balancer to serve traffic to whichever hosts happen to be running the deis-router component at any moment.
13+
A health check should be configured on the load balancer to send an HTTP request to /healthz at port 9090 on all nodes in the Deis cluster. The health check endpoint returns an HTTP 200. This enables the load balancer to serve traffic to whichever hosts happen to be running the router component at any moment.

0 commit comments

Comments
 (0)