Skip to content

Commit 77e675e

Browse files
authored
Merge pull request #782 from mboersma/byo-ingress
feat(ingress): experimental native ingress
2 parents dc43777 + e20215b commit 77e675e

5 files changed

Lines changed: 122 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,12 @@ global:
5151
host_port: 5555
5252
# Prefix for the imagepull secret created when using private registry
5353
secret_prefix: "private-registry"
54+
# Experimental feature to use Kubernetes ingress instead of Workflow's deis-router.
55+
#
56+
# Valid values are:
57+
# - true: deis-router will not be deployed. Workflow will not be usable until a Kubernetes ingress controller is installed.
58+
# - false: deis-router will be deployed (default).
59+
experimental_native_ingress: false
5460

5561

5662
s3:
@@ -107,6 +113,10 @@ controller:
107113
# disabled - turns off open registration
108114
# admin_only - allows for registration by an admin only.
109115
registration_mode: "admin_only"
116+
# The publicly resolvable hostname to build your cluster with.
117+
#
118+
# This will be the hostname that is used to build endpoints such as "deis.$HOSTNAME"
119+
platform_domain: ""
110120

111121
database:
112122
# The username and password to be used by the on-cluster database.

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: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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 global.experimental_native_ingress=true,controller.platform_domain=deis.com
9+
```
10+
11+
Where `controller.platform_domain` is a **required** parameter that is traditionally not required for Workflow that is explained in the next section. In this example we are using `deis.com` for `$hostname`.
12+
13+
Helm will install a variety of Kubernetes resources in the `deis` namespace.
14+
Wait for the pods that Helm launched to be ready. Monitor their status by running:
15+
16+
```
17+
$ kubectl --namespace=deis get pods
18+
```
19+
20+
You should also notice that several Kubernetes ingresses has been installed on your cluster. You can view it by running:
21+
22+
```
23+
$ kubectl get ingress --namespace deis
24+
```
25+
26+
Depending on the order in which the Workflow components initialize, some pods may restart. This is common during the
27+
installation: if a component's dependencies are not yet available, that component will exit and Kubernetes will
28+
automatically restart it.
29+
30+
Here, it can be seen that the controller, builder and registry all took a few loops waiting for minio before they were able to start:
31+
32+
```
33+
$ kubectl --namespace=deis get pods
34+
NAME READY STATUS RESTARTS AGE
35+
deis-builder-hy3xv 1/1 Running 5 5m
36+
deis-controller-g3cu8 1/1 Running 5 5m
37+
deis-database-rad1o 1/1 Running 0 5m
38+
deis-logger-fluentd-1v8uk 1/1 Running 0 5m
39+
deis-logger-fluentd-esm60 1/1 Running 0 5m
40+
deis-logger-sm8b3 1/1 Running 0 5m
41+
deis-minio-4ww3t 1/1 Running 0 5m
42+
deis-registry-asozo 1/1 Running 1 5m
43+
deis-workflow-manager-68nu6 1/1 Running 0 5m
44+
```
45+
46+
## Install a Kubernetes Ingress Controller
47+
48+
Now that Workflow has been deployed with the `global.experimental_native_ingress` flag set to `true`, we will need a Kubernetes ingress controller in place to begin routing traffic.
49+
50+
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.
51+
52+
```
53+
$ helm install stable/traefik --name deis-ingress-001 --namespace kube-system
54+
```
55+
56+
## Configure DNS
57+
58+
The experimental ingress feature requires a user to set up a hostname, and assumes the `deis.$host` convention.
59+
60+
We need to point the `*.$host` record to the public IP address of your ingress controller. You can get the public IP using the following command. A wildcard entry is necessary here as apps will use the same rule after they are deployed.
61+
62+
```
63+
$ kubectl get svc deis-ingress-001 --namespace kube-system
64+
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
65+
deis-ingress-001 10.23.253.220 104.154.159.184 80:30231/TCP,443:32264/TCP 19m
66+
```
67+
68+
If we were using `deis.com` as a hostname we would need to create the following A DNS record.
69+
70+
| Name | Type | Value |
71+
| ----------------- |:-------------:| ---------------:|
72+
| deis.deis.com | A | 104.154.159.184 |
73+
74+
75+
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!
76+
77+
After installing Workflow, [register a user and deploy an application](../quickstart/deploy-an-app.md).
78+
79+
##### Feedback
80+
81+
While this feature is experimental we welcome feedback on the issue. We would like to learn more about use cases, and user experience. Please [open a new issue](https://github.com/deis/workflow/issues/new) for feedback.

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) to take advantage of native Kubernetes routing. Any compatible Kubernetes ingress controller can be used in place of Workflow's nginx-based deis-router. Follow [this guide](experimental-native-ingress.md) to enable experimental native ingress.
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: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,44 @@
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`.
44

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`.
5+
#### Option 1: Standard Installation
6+
7+
For a standard installation that includes deis-router, you can calculate the hostname value using its public IP address and a wildcard DNS record.
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 workflow requires a wildcard DNS record to dynamically map app names to the router.
19+
20+
#### Option 2: Experimental Native Ingress Installation
1121

12-
Use the controller url to register a user in the cluster.
22+
In this example, the user should already have DNS set up pointing to their known host. The `$hostname` value can be calculated by prepending `deis.` to the value set in `controller.platform_domain`.
23+
24+
**$hostname**: deis.com
25+
26+
## Register an Admin User
27+
28+
The first user to register against Deis Workflow will automatically be given administrative privileges.
29+
30+
Use the controller `$hostname` to register a user in the cluster.
1331

1432
```
15-
$ deis register http://deis.104.197.125.75.nip.io
33+
$ deis register http://$hostname
1634
username: admin
1735
password:
1836
password (confirm):
1937
email: jhansen@deis.com
2038
Registered admin
2139
Logged in as admin
2240
$ deis whoami
23-
You are admin at http://deis.104.197.125.75.nip.io
41+
You are admin at http://$hostname
2442
```
2543

2644
You have now registered your first user and you are ready to deploy an application.
@@ -50,7 +68,7 @@ Let's use the CLI to tell the platform to deploy an application and then use cur
5068
```
5169
$ deis pull deis/example-go -a proper-barbecue
5270
Creating build... done
53-
$ curl http://proper-barbecue.104.197.125.75.nip.io
71+
$ curl http://proper-barbecue.$hostname
5472
Powered by Deis
5573
```
5674

0 commit comments

Comments
 (0)