This tutorial describes how to run the causal-services
helm chart locally on kubernetes.
You will need Docker and Helm installed, and also a Kubernetes cluster up and running.
For local development, one good alternative for a local kubernetes cluster is minikube. Which is the one used in this tutorial.
Once you have Docker and Helm installed, install minikube by following the steps in here.
> minikube start
The NGINX ingress controller is used by the causal-services
' helm chart to expose both the backend and frontend URLs. Minikube has an addon that will take care of installing it for you:
> minikube addons enable ingress
For more information see minikube's documentation.
This step only needs to be done once, the ingress controller installation will persist.
We will need to build the docker images for the frontend and backend services, those images should be available to the Docker daemon inside the Minikube instance. To configure your local bash to point to Minikube's docker environment run:
> eval $(minikube docker-env)
> yarn install
> yarn build
If you want to force the service to rebuild, run:
yarn force_build
.
This will create the build directory at javascript/webapp
.
> ./scripts/build-frontend-images.sh
This will build the following frontend service image:
app-shell
.
> ./scripts/build-backend-images.sh
This will build the following backend service images:
exposure
,events
anddiscover
.
> ./scripts/install-charts.sh
When running with no parameters the install script will deploy the chart using the default configuration, which includes no authentication and uses https://localhost
.
> ./scripts/list-resources.sh
You should see the services up and running according to their namespace.
To be able to access the services through the ingress controller, run the following command in a separate terminal:
> minikube tunnel
For more information see minikube's documentation.
The application should now be available at: https://localhost.