(with local Postgres DB for FusionAuth)
git clone https://github.com/BenjaminBruenau/RuettelReport
We recommend to start the local Cluster with a good chunk of memory, as otherwise running both SparkApplications and Kafka will result in Pods being killed (OOMKilled).
minikube start --cpus 5 --memory 8g
To use images from a private Artifact Registry (like our development and production Repositiories there) it is necessary to mount the K8s Pods with the required Google Cloud Credentials.
minikube addons enable gcp-auth
helm install spark spark-operator/spark-operator --namespace spark-operator --create-namespace -f spark-operator-values.yaml
helm install mongodb bitnami/mongodb -f mongodb-values.yaml -n shared --create-namespace
helm install kong kong/ingress -n kong --create-namespace
helm install pg-minikube --set auth.postgresPassword=admin bitnami/postgresql
helm install my-fusion fusionauth/fusionauth -f local-fa-values.yaml
helm install promstack prometheus-community/kube-prometheus-stack --namespace monitoring --version 52.1.0 -f values-monitoring.yaml
helm upgrade kong kong/ingress -n kong --set gateway.serviceMonitor.enabled=true --set gateway.serviceMonitor.labels.release=promstack
kubectl apply -f kong-prometheus-plugin.yaml
!The ruettel-chart-local-values.yaml
needs to be adjusted before!
- Port Forward FusionAuth
- Access its UI in the browser
- Go to
Settings
->Key Manager
- View the
premium
andfree
key and copy both their public key entries - Replace the values for
kong.premiumConsumerSecret
andkong.freeConsumerSecret
(inruettel-chart-local-values.yaml
) with their corresponding public key value - Proceed with the Application Chart Installation
helm install ruettel-chart ./ruettel-chart -f ruettel-chart-local-values.yaml --set image.tag=<your desired release version / latest>
kubectl -n monitoring port-forward services/prometheus-operated 9090 & kubectl -n monitoring port-forward services/promstack-grafana 3000:80 &
kubectl get secret --namespace monitoring promstack-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
export SVC_NAME=$(kubectl get svc --namespace default -l "app.kubernetes.io/name=fusionauth,app.kubernetes.io/instance=my-fusion" -o jsonpath="{.items[0].metadata.name}")
kubectl port-forward svc/$SVC_NAME 9011:9011
kubectl port-forward svc/mongodb-headless 27017:27017
kubectl describe sparkapplication spark-analysis -n premium
Get Logs of specific SparkApplication Job:
kubectl logs spark-analysis-driver -n premium