diff --git a/wicked/Chart.yaml b/wicked/Chart.yaml index f8925cb1..8de72a86 100644 --- a/wicked/Chart.yaml +++ b/wicked/Chart.yaml @@ -1,4 +1,4 @@ apiVersion: v1 description: wicked.haufe.io Helm Chart name: wicked -version: 0.11.6 +version: 0.11.7 diff --git a/wicked/README.md b/wicked/README.md new file mode 100644 index 00000000..a0ac1755 --- /dev/null +++ b/wicked/README.md @@ -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`. diff --git a/wicked/templates/NOTES.txt b/wicked/templates/NOTES.txt index 391d4496..099f5e2e 100644 --- a/wicked/templates/NOTES.txt +++ b/wicked/templates/NOTES.txt @@ -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`. diff --git a/wicked/templates/portal-api-deployment.yaml b/wicked/templates/portal-api-deployment.yaml index 44d24512..ea37482d 100644 --- a/wicked/templates/portal-api-deployment.yaml +++ b/wicked/templates/portal-api-deployment.yaml @@ -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 diff --git a/wicked/templates/portal-chatbot-deployment.yaml b/wicked/templates/portal-chatbot-deployment.yaml index 3578b5e1..49b7d912 100644 --- a/wicked/templates/portal-chatbot-deployment.yaml +++ b/wicked/templates/portal-chatbot-deployment.yaml @@ -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 diff --git a/wicked/templates/portal-deployment.yaml b/wicked/templates/portal-deployment.yaml index d11a6731..86d1faf7 100644 --- a/wicked/templates/portal-deployment.yaml +++ b/wicked/templates/portal-deployment.yaml @@ -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 diff --git a/wicked/templates/portal-kong-adapter-deployment.yaml b/wicked/templates/portal-kong-adapter-deployment.yaml index 3d173a98..e68d8e7e 100644 --- a/wicked/templates/portal-kong-adapter-deployment.yaml +++ b/wicked/templates/portal-kong-adapter-deployment.yaml @@ -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 diff --git a/wicked/templates/portal-mailer-deployment.yaml b/wicked/templates/portal-mailer-deployment.yaml index 10a8d4d5..11a637ad 100644 --- a/wicked/templates/portal-mailer-deployment.yaml +++ b/wicked/templates/portal-mailer-deployment.yaml @@ -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 diff --git a/wicked/values.yaml b/wicked/values.yaml index 6d394a72..96516c12 100644 --- a/wicked/values.yaml +++ b/wicked/values.yaml @@ -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