Skip to content

Commit

Permalink
Some minor tweaking of the Helm charts, see #64
Browse files Browse the repository at this point in the history
  • Loading branch information
DonMartin76 committed Jul 18, 2017
1 parent debc24d commit ce5e192
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 7 deletions.
2 changes: 1 addition & 1 deletion wicked/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: v1
description: wicked.haufe.io Helm Chart
name: wicked
version: 0.11.6
version: 0.11.7
45 changes: 45 additions & 0 deletions wicked/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# wicked.haufe.io Helm Chart

**THIS IS STILL WORK IN PROGRESS**

This directory contains a [Kubernetes Helm](https://github.com/kubernetes/helm) chart for wicked.haufe.io. This will be the preferred way of deploying wicked in the future, so feel free to try it out on `minikube` or similar, and please give feedback.

Deploying wicked using a Helm chart is quite certainly the easiest way to get wicked up and running on Kubernetes, without a doubt. The default configuration will deploy a sample portal assuming an ingress at `https://portal.local` (for the API Portal) and `https://api.portal.local` (for the API Gateway).

Most things are already configurable, like which parts of wicked you want to deploy (mailer and chatbot are e.g. not deployed by default), whether you want persistence or not, and whether you want to deploy a separate Postgres instance for Kong, or perhaps use your own.

Please check [values.yaml](values.yaml) for an overview of how you can configure this chart.

## Deploying to `minikube`

### Prerequisites

This little "tutorial" assumes that you have `minikube` v0.14 or higher installed. Additionally you will need the `helm` binary on your machine and in your path. Further it's assumed that you have run `helm init` for your cluster so that the `tiller` component is already running on your cluster.

### Configure ingress

wicked usually needs an ingress controller, and thus `minikube` must enable its internal ingress controller, so make sure you have run the following command on your cluster:

```
$ minikube addons enable ingress
```

It is also assumed that you have some knowledge of Helm, and that you have run `helm init` to install the `tiller` component on your cluster.

### Deploy wicked

If that is set and done, you may now install wicked using the Helm chart. Clone this repository, and `cd` into it:

```
$ git clone https://github.com/Haufe-Lexware/wicked.haufe.io
...
$ cd wicked.haufe.io
$ helm install --set minikubeIP=$(minikube ip) wicked
...
```

Then run `minikube ip` once more, and edit your own `/etc/hosts` (or corresponding file on Windows) to add the names `portal.local` and `api.portal.local` to point to this IP address.

### Open the wicked portal

You should now be able to open the API portal at [https://portal.local](https://portal.local). You may log in using the default dummy admin user `admin@foo.com` with the password `wicked`.
13 changes: 12 additions & 1 deletion wicked/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
This has to be done. It is not yet.
This is still work in progress. You can use this chart to experimentally
deploy wicked to a Kubernetes cluster. It has not yet been tested for
production purposes, and is to be considered alpha or early beta. The work
on this will continue though, and if you feel like helping out with this,
any help is definitely welcome.

If you didn't change anything in the chart configuration, point the FQDNs
"portal.local" and "api.portal.local" to the IP address of the ingress
controller('s load balancer), depending on where you deploy to.

In case you are running on minikube, point the above FQDNs to the output
of `minikube ip`.
6 changes: 6 additions & 0 deletions wicked/templates/portal-api-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ spec:
configMapKeyRef:
name: {{ template "fullname" . }}-apim-config
key: HELM_NAME
- name: K8S_NAMESPACE
value: {{ default "default" .Values.namespace }}
{{ if .Values.minikubeIP }}
- name: MINIKUBE_IP
value: {{ .Values.minikubeIP }}
{{ end }}
- name: NODE_ENV
value: {{ default "default" .Values.envName }}
- name: GIT_REPO
Expand Down
2 changes: 1 addition & 1 deletion wicked/templates/portal-chatbot-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
name: {{ template "fullname" . }}-apim-config
key: DEBUG
- name: PORTAL_API_URL
value: "http://{{ template "fullname" . }}-api:3001/"
value: "http://{{ template "fullname" . }}-api.{{ default "default" .Values.namespace }}.svc.cluster.local:3001/"
ports:
- containerPort: 3004
protocol: TCP
Expand Down
2 changes: 1 addition & 1 deletion wicked/templates/portal-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
name: {{ template "fullname" . }}-apim-config
key: DEBUG
- name: PORTAL_API_URL
value: "http://{{ template "fullname" . }}-api:3001/"
value: "http://{{ template "fullname" . }}-api.{{ default "default" .Values.namespace }}.svc.cluster.local:3001/"
ports:
- containerPort: 3000
protocol: TCP
Expand Down
2 changes: 1 addition & 1 deletion wicked/templates/portal-kong-adapter-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
name: {{ template "fullname" . }}-apim-config
key: DEBUG
- name: PORTAL_API_URL
value: "http://{{ template "fullname" . }}-api:3001/"
value: "http://{{ template "fullname" . }}-api.{{ default "default" .Values.namespace }}.svc.cluster.local:3001/"
ports:
- containerPort: 3002
protocol: TCP
Expand Down
2 changes: 1 addition & 1 deletion wicked/templates/portal-mailer-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
name: {{ template "fullname" . }}-apim-config
key: DEBUG
- name: PORTAL_API_URL
value: "http://{{ template "fullname" . }}-api:3001/"
value: "http://{{ template "fullname" . }}-api.{{ default "default" .Values.namespace }}.svc.cluster.local:3001/"
ports:
- containerPort: 3003
protocol: TCP
Expand Down
6 changes: 5 additions & 1 deletion wicked/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ deployChatbot: false
# Specify true to deploy the mailer
deployMailer: false

# If you are trying out wicked on minikube, please supply
# the `minikube ip` address here:
minikubeIP: ""

image:
# Use the Alpine images (works as of 0.11.6, experimental)
alpine: true
# Use "haufelexware/wicked." for the official ones, otherwise use the prefix you
# need to pull your company's version of wicked.
repository: "haufelexware/wicked."
tag: "0.11.6"
tag: "0.11.7"
pullPolicy: IfNotPresent

# Add imagePullSecrets like this in an override.yaml to pass in with helm install
Expand Down

0 comments on commit ce5e192

Please sign in to comment.