spring-petclinic-cloud
by ddieruf
Spring pet clinic for Kubernetes on Platform9
About this chart
Spring Pet Clinic for Kubernetes Helm Chart
- Installs the Spring pet clinic demo app
Get Repo Info
helm repo add Platform9-Community https://platform9-community.github.io/helm-charts
helm repo update
See helm repo for command documentation.
Installing the Chart
To install the chart with the release name spring-petclinic-cloud to namespace spring-petclinic:
(be patient while everything comes up)
helm install spring-petclinic-cloud Platform9-Community/spring-petclinic-cloud --namespace spring-petclinic --create-namespace
Uninstalling the Chart
To uninstall/delete the spring-petclinic-cloud deployment from namespace spring-petclinic:
helm uninstall spring-petclinic-cloud --namespace spring-petclinic
#remove the namespace
kubectl delete namespace spring-petclinic
The command removes all the Kubernetes components associated with the chart and deletes the release.
About the chart
The Spring pet clinic application is a well known example showing off the power of Spring. Over the years it's been refectored into microservices and then refactored for Kubernetes. That is what this chart deploys. To get deep with the application have a look at our fork.
Access services
To access any of the below services you'll need to get the cluster's pubic IP. Here are a few suggestions:
kubectl get svc -n spring-petclinic api-gateway
kubectl get node -o wide
Pet clinic UI
The UI is served by the api gateway, which has a NodePort service attached. To access the application visit http://<IP>:30808.
[. You will need to open these ports to the nodes.
Optional add-ons
Observability
If you would like to include observability set the include-observability: true flag in the chart values.
The chart deploys Grafana with all it's default settings. It has an accompanying NodePort service, which can be accessed at http://<IP>:30300. Use the default creds of admin:admin. There is a single dashboard loaded that has Prometheus as a data source. Once logged in to Grafana go to Dashboards > Manage > Spring Petclinic Metrics.
[ AGE
zipkin-collector NodePort 10.X.X.X <none> 9411:31928/TCP 165m
Then combine the cluster IP with the exposed port #. In the above case it would be http://<IP>:31928.
Deploy spring-petclinic-cloud with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has spring-petclinic-cloud on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartspring-petclinic-cloud is pinned at v0.2.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply