Spring-Boot-Framework / springboot-jpa-sakila

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

License:MIT License


Languages

Language:TSQL 98.6%Language:PLpgSQL 0.6%Language:Smarty 0.5%Language:Java 0.3%Language:Dockerfile 0.0%Language:Shell 0.0%