This project demonstrate how to leverage Service Mesh Layer in Microservice Architecture.
- Build docker images locally
or build and push docker images to configured $dockerRepository
./gradlew clean jibDockerBuild
./gradlew clean jib
Build separate service
./gradlew clean :order-service:jib -x test
- Up and run docker containers with all the business and technical services
cd docker && docker-compose up -d --scale order-service=2 --scale user-service=2
- Test "get orders" endpoint works (request chain: api-gateway -> linkerd -> order-service -> linkerd -> user-service
curl -v http://localhost:8070/order-service/api/orders
One-liner Run:
./gradlew clean jibDockerBuild && cd docker && docker-compose up -d --remove-orphans --scale order-service=2 --scale user-service=2
Stop:
cd docker && docker-compose stop
-
Install order-service
cd order-service && helm install order-service ./chart
Uninstall order-service
cd order-service && helm uninstall order-service
-
Install user-service
cd user-service && helm install user-service ./chart
Uninstall order-service
cd user-service && helm uninstall user-service
-
Install all MSA infra
helm install msa-infra ./msa-infra-chart
Uninstall all MSA infra
helm uninstall msa-infra
Project Architecture
Service Mesh Demo Presentation
Notes:
Desired name of the dockerRepository should be configured in gradle.properties
.
Tags:
Example of Microservice Architecture with Spring Boot, Microservice Architecture with Service Mesh, Service Mesh example Java Kotlin, Service Mesh POC, Linkerd example Java, Linkerd Docker example