This folder contains example yaml files which can be used to start Eclipse Ditto with its backing Database - MongoDB - and a reverse proxy - nginx - in front of the HTTP and WebSocket API.
The nginx's configuration is located in the nginx.conf
file and contains a "Basic authentication"
for accessing the HTTP and WebSocket API. The users for this sample authentication are configured
in the nginx.httpasswd
file also located in this directory.
In order to add a new entry to this file, use the "openssl passwd" tool to create a hashed password:
openssl passwd -quiet
Password: <enter password>
Verifying - Password: <enter password>
Append the printed hash in the nginx.httpasswd
file placing the username who shall receive this
password in front like this:
ditto:A6BgmB8IEtPTs
minikube start
This is necessary for the pods to access the Kubernetes API and then build the akka cluster.
cd <DITTO_PATH>
kubectl apply -f deployment/kubernetes/pod-reader-role.yaml
kubectl create configmap nginx-conf --from-file=deployment/kubernetes/nginx/nginx.conf
kubectl create configmap nginx-cors --from-file=deployment/kubernetes/nginx/nginx-cors.conf
kubectl create configmap nginx-htpasswd --from-file=deployment/kubernetes/nginx/nginx.htpasswd
kubectl create configmap nginx-index --from-file=deployment/kubernetes/nginx/index.html
kubectl create configmap swagger-ui-api --from-file=$PWD/documentation/src/main/resources/openapi
kubectl apply -f deployment/kubernetes/mongodb/mongodb.yaml
kubectl apply -f deployment/kubernetes/ditto/ditto-cluster.yaml
# Start ditto services with an alternative version e.g. 0-SNAPSHOT
# cat kubernetes/ditto/ditto-cluster.yaml | sed s/latest/0-SNAPSHOT/ | kubectl apply -f -
kubectl apply -f deployment/kubernetes/swagger/swagger.yaml
kubectl apply -f deployment/kubernetes/nginx/nginx.yaml
minikube service ditto
minikube dashboard
Have Fun!