-
Cd to root folder of project demo.microservice.eureka and start eureka server by commands
Window version
cd ..\demo\microservice\eureka
mvn spring-boot:run
-
Move to root folder of image service and start image service eureka-client by commands
cd ..demo\microservice\image
mvn spring-boot:run
-
Set Environment variable for Vault server
Linux
export VAULT_ADDR=’http://127.0.0.1:8200′
Window
start Vault server
vault server -dev
Get root token from console after start Vault
Update this token to bootstrap.properties of galery module
Write config for gallery service. Move root folder this repo and run below command
vault kv put secret/gallery-service @testConfig.json
-
Start config server
cd ..demo\microservice\config
mvn spring-boot:run
-
Move to root folder of gallery service and start gallery service eureka-client by commands
cd ..demo\microservice\galery
mvn spring-boot:run
-
To check service registry and service discovery, pls access eureka server by go to Zuul Dashboard. Access url below on browser
http://localhost:8761/
-
Start auth service , run below commands
cd ..\demo\microservice\auth
mvn spring-boot:run
-
Start Zuul like a gateway
cd ..\demo\microservice\zuul
mvn spring-boot:run
-
Test microsevices before authentication . We can use postman to run this GET request
localhost:8762/gallery
-
Get token by call to API (POST) with header "Content-Type" is application/json
localhost:8762/auth
Main technologies:
- Spring boot for all services
- Netflix Eureka server like service registry
- Netflix Zuul like gateway
- Netflix Eureka client like service discovery
- Spring security + JWT to build authentication service
- Spring web for resource services like image , gallery service
- Netflix Hystrix like Circuit breaker
- ELK (Elasticsearch, logstash, Kibana) for managing, searching, visualizing logs
- Spring Cloud Config for server config and Vault for encrypt config
- Netflix ribbon for load balancer
- How to separate and manage module services in Maven and Git
- How to manage distributed transaction
- How to design and separate correct tables for micro-services
- Interservice communication
- Distributed cache
- Microservices with Spring Boot — Intro to Microservices (Part 1)
- MicroServices using Spring Boot & Spring Cloud – Part 1 : Overview
- Martin Flower - Microservices
- Microserives IO
- Spring Cloud Config
- Vault get started
- Spring cloud circuit breaker
- Which Strategy You Will Choose to Implement Circuit-Breaker