Skip to content

Commit 2692d66

Browse files
krisnovamboersma
authored andcommitted
feat(ingress): Experimental Native Ingress
Adding documentation changes for Kubernetes ingress support. Non breaking change, as users must opt-in to the feature.
1 parent dc43777 commit 2692d66

5 files changed

Lines changed: 125 additions & 8 deletions

File tree

charts/workflow/values.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,16 @@ global:
5151
host_port: 5555
5252
# Prefix for the imagepull secret created when using private registry
5353
secret_prefix: "private-registry"
54+
# The public resolvable hostname to build your cluster with.
55+
#
56+
# This will be the hostname that is used to build endpoints such as "deis.$HOSTNAME"
57+
hostname: ""
58+
# Experimental feature to toggle using kubernetes ingress instead of the Deis router.
59+
#
60+
# Valid values are:
61+
# - true: The Deis router will NOT be deployed. Inherently workflow will not be usable until a Kubernetes ingress controller is installed.
62+
# - false: The default mode, and the default behavior of Deis workflow.
63+
experimental_native_ingress: false
5464

5565

5666
s3:

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ pages:
3737
- Configuring Postgres: installing-workflow/configuring-postgres.md
3838
- Configuring the Registry: installing-workflow/configuring-registry.md
3939
- Chart Provenance: installing-workflow/chart-provenance.md
40+
- Experimental Native Ingress: installing-workflow/experimental-native-ingress.md
4041
- Users:
4142
- Command Line Interface: users/cli.md
4243
- Users and Registration: users/registration.md
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Experimental Native Ingress
2+
3+
## Install Deis Workflow (With experimental native ingress support)
4+
5+
Now that Helm is installed and the repository has been added, install Workflow with a native ingress by running:
6+
7+
```
8+
$ helm install deis/workflow --namespace deis --set experimental_native_ingress=true,global.hostname="deis.com"
9+
```
10+
11+
Where `global.hostname` is a **required** parameter that is traditionally not required for Workflow. In this example we are using `deis.com` for `$hostname`.
12+
13+
14+
15+
Helm will install a variety of Kubernetes resources in the `deis` namespace.
16+
Wait for the pods that Helm launched to be ready. Monitor their status by running:
17+
18+
```
19+
$ kubectl --namespace=deis get pods
20+
```
21+
22+
You should also notice that a Kubernetes ingress has been installed on your cluster. You can view it by running:
23+
24+
```
25+
$ kubectl get ingress --namespace deis
26+
```
27+
28+
29+
Depending on the order in which the Workflow components initialize, some pods may restart. This is common during the
30+
installation: if a component's dependencies are not yet available, that component will exit and Kubernetes will
31+
automatically restart it.
32+
33+
Here, it can be seen that the controller, builder and registry all took a few loops before they were able to start:
34+
35+
```
36+
$ kubectl --namespace=deis get pods
37+
NAME READY STATUS RESTARTS AGE
38+
deis-builder-hy3xv 1/1 Running 5 5m
39+
deis-controller-g3cu8 1/1 Running 5 5m
40+
deis-database-rad1o 1/1 Running 0 5m
41+
deis-logger-fluentd-1v8uk 1/1 Running 0 5m
42+
deis-logger-fluentd-esm60 1/1 Running 0 5m
43+
deis-logger-sm8b3 1/1 Running 0 5m
44+
deis-minio-4ww3t 1/1 Running 0 5m
45+
deis-registry-asozo 1/1 Running 1 5m
46+
deis-workflow-manager-68nu6 1/1 Running 0 5m
47+
```
48+
49+
## Install a Kubernetes Ingress Controller
50+
51+
Now that Workflow has been deployed with the `global.exerpimental_native_ingress` flag set to `true`, we will need a Kubernetes ingress controller in place to begin routing traffic.
52+
53+
Here is an example of how to use [traefik](https://traefik.io/) as an ingress controller for Workflow. Of course, you are welcome to use any controller you wish.
54+
55+
```
56+
$ helm install stable/traefik --name deis-ingress-001 --namespace kube-system
57+
```
58+
59+
## Configure DNS
60+
61+
The experimental ingress feature requires a user to set up a hostname, and assumes the `deis.$host` convention.
62+
63+
We need to point the `deis.$host` record to the public IP address of your ingress controller. You can get the public IP using the following command.
64+
65+
```
66+
$ kubectl get svc deis-ingress-001 --namespace kube-system
67+
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
68+
deis-ingress-001 10.23.253.220 104.154.159.184 80:30231/TCP,443:32264/TCP 19m
69+
```
70+
71+
If we were using `deis.com` as a hostname we would need to create the following A DNS record.
72+
73+
| Name | Type | Value |
74+
| ----------------- |:-------------:| ---------------:|
75+
| deis.deis.com | A | 104.154.159.184 |
76+
77+
78+
Once all of the pods are in the `READY` state, and `deis.$host` resolves to the external IP found above Workflow is up an running!
79+
80+
After installing Workflow, [register a user and deploy an application](../quickstart/deploy-an-app.md).

src/installing-workflow/index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ More rigorous installations would benefit from using outside sources for the fol
3333
* [Redis](../managing-workflow/platform-logging.md#configuring-off-cluster-redis) - Such as AWS Elasticache
3434
* [InfluxDB](../managing-workflow/platform-monitoring.md#configuring-off-cluster-influxdb) and [Grafana](../managing-workflow/platform-monitoring.md#off-cluster-grafana)
3535

36+
#### (Experimental) Kubernetes Native Ingress
37+
38+
Workflow now offers [experimental native ingress](experimental-native-ingress.md) that will allow users to take advantage of native Kubernetes ingress with their cluster. Users will be able to use and define any compatible Kubernetes ingress controller. Feel free to start following along with the [experimental native ingress](experimental-native-ingress.md) guide now.
39+
3640
## Add the Deis Chart Repository
3741

3842
The Deis Chart Repository contains everything needed to install Deis Workflow onto a Kubernetes cluster, with a single `helm install deis/workflow --namespace deis` command.

src/quickstart/deploy-an-app.md

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,46 @@
1-
## Register an Admin User
1+
## Determine your host and hostname values
22

3-
The first user to register against Deis Workflow will automatically be given administrative privileges.
3+
For the rest of this example we will refer to a special variables called `$hostname`. Please choose one of the two methods for building your `$hostname`.
4+
5+
#### Option 1: Standard Installation
46

5-
If you installed Deis on GKE or AWS, Deis automatically creates a load balancer for the cluster. To get the IP of this load balancer, run `kubectl --namespace=deis describe svc deis-router`.
7+
For a standard installation you can build the hostname using public IP address and a wildcard DNS solution. Instead of setting up DNS records, this example will use `nip.io`.
8+
9+
If your router IP is `1.1.1.1`, its `$hostname` will be `1.1.1.1.nip.io`. You can find your IP address by running:
10+
11+
```
12+
kubectl --namespace=deis describe svc deis-router
13+
```
614

715
If you do not have an load balancer IP, the router automatically forwards traffic from a kubernetes node to the router. In this case, use the IP of a kubernetes node and the node
816
port that routes to port 80 on the controller.
917

10-
Deis requires a wildcard DNS record to dynamically map app names to the router. Instead of setting up DNS records, this example will use `nip.io`. If your router IP is `1.1.1.1`, its url will be `1.1.1.1.nip.io`. The URL of the controller component will be `deis.1.1.1.1.nip.io`.
18+
Deis requires a wildcard DNS record to dynamically map app names to the router.
19+
20+
**$hostname**: 1.1.1.1.nip.io
21+
22+
#### Option 2: Experimental Native Ingress Installation
23+
24+
In this example, the user should already have DNS set up pointing to their known host. The `$hostname` value can be build by appending `deis.` to the value set in `global.exerpimental_native_ingress`.
1125

12-
Use the controller url to register a user in the cluster.
26+
**$hostname**: deis.com
27+
28+
## Register an Admin User
29+
30+
The first user to register against Deis Workflow will automatically be given administrative privileges.
31+
32+
Use the controller `$hostname` to register a user in the cluster.
1333

1434
```
15-
$ deis register http://deis.104.197.125.75.nip.io
35+
$ deis register http://$hostname
1636
username: admin
1737
password:
1838
password (confirm):
1939
email: jhansen@deis.com
2040
Registered admin
2141
Logged in as admin
2242
$ deis whoami
23-
You are admin at http://deis.104.197.125.75.nip.io
43+
You are admin at http://$hostname
2444
```
2545

2646
You have now registered your first user and you are ready to deploy an application.
@@ -50,10 +70,12 @@ Let's use the CLI to tell the platform to deploy an application and then use cur
5070
```
5171
$ deis pull deis/example-go -a proper-barbecue
5272
Creating build... done
53-
$ curl http://proper-barbecue.104.197.125.75.nip.io
73+
$ curl http://proper-barbecue.$hostname
5474
Powered by Deis
5575
```
5676

77+
78+
5779
!!! note
5880
If you see a 404 error, make sure you specified your application name with `-a <appname>`!
5981

0 commit comments

Comments
 (0)