Skip to content

An implementation of the Springboot JPA and Spring Rest Data - Hateos Rest Service - Spring Cloud Docker - Kubernetes Example

License

Notifications You must be signed in to change notification settings

Spring-Boot-Framework/springboot-jpa-sakila

 
 

Repository files navigation

Spring Boot JPA

A Spring Cloud On Kubernetes Example

Features

  • micrometer (for gathering metrics)
  • actuator
  • Prometheus
  • Grafana
  • Postgresql Sakila DB

Built With

Getting Started

You will need:

  • Docker desktop
  • Docker-Kubernetes or Minikube (Kubernetes Dashboard or similar)
  • Helm 3
  • kubectl
  • superbenchmarker choco install superbenchmarker

Prerequisites

uses aballaci/springboot-sakila-jpa:v3 in Dockerhub

you can build your own version:

docker build -t namespace/image-name:version .

docker push namespace/image-name:version

Set first the namespace in the current context -- the services should be installed in the same namespace.

kubectl config set-context --current --namespace=default

install prometheus:

helm install prometheus ./prometheus

install the postgres persistent volumes that populate the database:

kubectl create -f persistent-volume.yml

install postgres

helm install postgres postgresql/

install grafana:

helm upgrade grafana ./grafana/

create the prometheus datasource:

url: http://prometheus-server

access: Server(default)

install the dashboard in grafana importing it from grafana_dashboard_spring-boot-statistics_rev2.json

Installing

kubectl apply -f springboot-jpa.yaml

or for local development

skaffold dev

to make the builds faster use a nexus docker image as proxy... more on that later...

Metrics: http://localhost:8080/actuator/metrics

Metrics in prometheus format: http://localhost:8080/actuator/prometheus

Grafana dashboard:

screenshot

Running the tests

`Run the load tests: sh load-test.sh

screenshot

Versioning

I use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Armand Ballaci

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

An implementation of the Springboot JPA and Spring Rest Data - Hateos Rest Service - Spring Cloud Docker - Kubernetes Example

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TSQL 98.6%
  • Other 1.4%