This is a demo application project which shows you how microservices architecture can build and what is it in common way.
Open up a picture to consider with a schema
In this application I am using the stackjava 17
spring-boot
hibernate
spring
cloud stack (apigw, eureka-server, zipkin, open feign etc)
k8s
RabbitMQ.
First of all create your account in docker hub.
- Change the row in main pom.xml
<image>YOURACCOUNT/${project.artifactId}:${project.version}</image>
this allows you to build and push docker images in your docker account. - build and publush images
mvn clean package -P build-docker-image
For launching the application, please install minikube and follow the next instructions : 4.
minikube start --driver=hyperkit - launch your env in hyperkit
- Run all deployment and statefulset
kubectl apply -f k8s.minikube.bootstrap/postgres
kubectl apply -f k8s.minikube.bootstrap/customer
kubectl apply -f k8s.minikube.bootstrap/fraud
kubectl apply -f k8s.minikube.bootstrap/notification
kubectl apply -f k8s.minikube.bootstrap/rabbitmq
kubectl get pods -w - Ensure that all pods have been launching
minikube service --url customer - run - because the most pods in private network you should open the tunnel.
Send the post request http://YOURTUNNEL/api/v1/customers