This example shows how to create a microservices architecture and deploy it with Kubernetes.
This project creates a complete microservice demo system in Docker containers. The services are implemented in Java using Spring and Spring Cloud.
It uses three microservices:
init-container-service
to run the database migrations on deploy.edge-service
- provide API gateway, which supports reactive http communications to underlying service (dashboard), simple GraphQL interface to fetch countries, cities & hotels data.importer-service
to handle Booking.com API descriptive data (countries, cities, hotels lists).dashboard-service
provides API for frontend/end user interactions.
java 21, Maven 3, Spring Boot, Spring Cloud, mysql:5.7.43, rabbitmq:3.8
Including utils: liquibase, WireMock, Mysql testcontainers, docker-compose.dev.yml, checkstyle configuration, SpotBugs, PMD etc.
cd ./src/main/kubernetes-minikube-samples/scripts/
./start-cluster.sh
cd ./src/main/kubernetes-minikube-samples/scripts/
./setup-cluster.sh
cd ./src/main/kubernetes-minikube-samples/scripts/
./install-all.sh
cd ./src/main/kubernetes-minikube-samples/scripts/
./delete-all.sh
cd ./src/main/kubernetes-minikube-samples/scripts/
./destroy-cluster.sh
cd ./src/main/kubernetes-minikube-samples/scripts/
./stop-cluster.sh
The code follows Google Code Conventions. Code quality is measured by:
- Sonarqube
- PMD
- CheckStyle
- SpotBugs
This project has standard JUnit tests. To run them execute this command:
./mvnw verify -P use-testcontainers
Project uses a three-segment CalVer scheme, with a short year in the major version slot, short month in the minor version slot, and micro/patch version in the third and final slot.
YY.MM.MICRO
- YY - short year - 6, 16, 106
- MM - short month - 1, 2 ... 11, 12
- MICRO - "patch" segment