go build rapps-keycloak-mgr.go
go build rapps-istio-mgr.go
go build rapps-rapp-provider.go go build rapps-rapp-invoker.go
Once the go programs have been compile you then need to build a docker image for each of them.
docker build -f Dockerfile_rim . -t /rapps-istio-mgr docker build -f Dockerfile_rkm . -t /rapps-keycloak-mgr docker build -f Dockerfile_rhi . -t /rapps-helm-installer docker build -f Dockerfile_rri . -t /rapps-rapp-invoker docker build -f Dockerfile_rrp . -t /rapps-rapp-provider
Image references in the yaml files/helm charts should be changed to match your own tagged images.
You will need to package your rapp charts and copy them to the /var/chartmuseum/charts directory before starting.
cd charts/ helm package rapp-provider scp -i $(minikube ssh-key) rapp-provider-0.1.0.tgz docker@$(minikube ip):/var/chartmuseum/charts
helm package rapp-invoker scp -i $(minikube ssh-key) rapp-invoker-0.1.0.tgz docker@$(minikube ip):/var/chartmuseum/charts
Start keycloak and postgres in the default namespace with istio injection:
istioctl kube-inject -f postgres.yaml | kubectl apply -f - istioctl kube-inject -f keycloak.yaml | kubectl apply -f -
To start the management pods run:
start_pods.sh
Run: kubectl get pods to ensure all managements pods are up and running NAME READY STATUS RESTARTS AGE chartmuseum-deployment-7b8cd4c9d4-tpmhl 1/1 Running 0 8s keycloak-bc6f78f88-zmxlt 2/2 Running 0 2m20s postgres-6fb4cc8db6-bbhg9 2/2 Running 0 2m34s rapps-helm-installer-deployment-67476694-sxb2d 1/1 Running 0 6s rapps-istio-mgr-deployment-67c67647b6-scmqc 1/1 Running 0 7s rapps-keycloak-mgr-deployment-7464f87575-trvmx 1/1 Running 0 7s
Get the node port for the helm installer that corresponds to port 80
kubectl get svc rapps-helm-installer NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE rapps-helm-installer NodePort 10.96.58.211 80:31570/TCP 8m9s
Once these pods are up and running run: curl http://:/install?chart= to install your rapp
e.g. curl http://192.168.49.2:31570/install?chart=rapp-provider Successfully installed release: rapp-provider
This will setup keycloak realm + client, istio policies and deploy your chart.
You should install both the provider and the invoker to see the pods communicating.
Check the invoker logs to see the test message:
kubectl logs rapp-invoker-758468d7d4-njmdn -n istio-nonrtric Received response for rapp-provider get request - Hello World!
If you want to test using the rp_test.sh file, the client_secret field needs be changed to match the secret for you keycloak client. You can find this in the keycloak-mgr log.
To uninstall run: curl http://:/uninstall?chart= e.g. curl http://192.168.49.2:31570/uninstall?chart=rapp-invoker Successfully uninstalled release: rapp-invoker
To stop the management pods run: stop_pods.sh
Remove postgres and keycloak with the following commands: kubectl delete -f keycloak.yaml kubectl delete -f postgres.yaml