Skip to content

Commit 6d2a53d

Browse files
committed
Merge pull request #116 from technosophos/master
docs(installing-deis): add domain configuration
2 parents 4283692 + 0de45a1 commit 6d2a53d

2 files changed

Lines changed: 77 additions & 0 deletions

File tree

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

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,83 @@ $ kubectl get pods --namespace=deis
3535

3636
Once you see all of the pods ready, your Deis platform is running on a cluster!
3737

38+
## Mapping a Default Domain
39+
40+
Deis will route traffic from Kubernetes nodes to Deis components, but to
41+
do so it needs a domain. By default, Deis is configured to use the
42+
domain `example.com`. For basic Deis testing, simply add an entry to
43+
your host machine's `/etc/hosts` file.
44+
45+
You can find the IP address of a node using `kubectl`:
46+
47+
```
48+
$ kubectl get nodes
49+
NAME LABELS STATUS AGE
50+
10.245.1.3 kubernetes.io/hostname=10.245.1.3 Ready 19h
51+
```
52+
53+
You may have numerous entries. All entries should be able to route to
54+
Deis, though.
55+
56+
In your `/etc/hosts` file, add an entry like this:
57+
58+
```
59+
10.245.1.3 example.com deis.example.com
60+
```
61+
62+
This route will get you started, though you may find that you have to
63+
manually maintain this file.
64+
65+
### Using a DNS Service
66+
67+
Rather than hard-coding a hostfile entry, you may prefer to [configure a DNS][]
68+
record. `xip.io` is a particularly easy way to do this.
69+
70+
Edit `$(helm home)/workspace/charts/deis/manifests/deis-router-rc.yaml`
71+
and change the `domain` annotation to point to your DNS entry:
72+
73+
```yaml
74+
apiVersion: v1
75+
kind: ReplicationController
76+
metadata:
77+
name: deis-router
78+
namespace: deis
79+
labels:
80+
heritage: deis
81+
annotations:
82+
deis.io/routerConfig: |
83+
{
84+
"domain": "10.245.1.3.xip.io",
85+
"useProxyProtocol": false
86+
}
87+
spec:
88+
replicas: 1
89+
selector:
90+
app: deis-router
91+
#...
92+
```
93+
94+
Once you have changed and saved the file, run `kubectl apply`:
95+
96+
```
97+
$ kubectl --namespace=deis apply -f $(helm home)/workspace/charts/deis/manifests/deis-router-rc.yaml
98+
```
99+
100+
After a moment or two, you should be able to test with a brief curl
101+
command:
102+
103+
```
104+
curl http://deis.10.245.1.3.xip.io/v2/
105+
{"detail":"Authentication credentials were not provided."}
106+
```
107+
108+
This message indicates that the message has been routed all the way to
109+
the Deis controller.
110+
38111
Now that you've finished provisioning a cluster, start [Using Deis][] to deploy your first
39112
application on Deis.
40113

41114
[install deisctl]: installing-deisctl.md
42115
[helm]: http://helm.sh
43116
[using deis]: ../using-deis/deploying-an-application.md
117+
[configure dns]: ../managing-deis/configuring-dns.md

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
For Deis clusters, DNS records must be created. The Deis cluster runs multiple routers infront of the Deis controller and apps you deploy, so a [load balancer][] is recommended.
44

5+
You can find the IP addresses of your Kubernetes cluster nodes by
6+
running `kubectl get nodes`.
7+
58
## Necessary DNS records
69

710
Deis requires a wildcard DNS record. Assuming `myapps.com` is the top-level domain

0 commit comments

Comments
 (0)