- Spring MSA api gateway & service discovery with consul & Jaeger & MySQL JPA & Cassandra
- Prepare the Cassandra server
- Create a keyspace and table with table.sql file
- As of version 1.11.1 of Consul
- Download version 1.11.1 according to your operating system from https://www.consul.io/downloads
- After unzip Consul, run it as Server
./consul agent -server -bootstrap -ui -client=0.0.0.0 -data-dir ./data --bind=127.0.0.1 &
-
Check at http://localhost:8500
-
After installing docker compose, run docker-compose.yml in this jaeger_all_in_one or jaeger_msa directory
-
Execute Jaeger Tracing with docker
docker-compose up
-
Check at http://localhost:16686
-
Execute docker-compose.yml in mysql folder to run mysql server and create table
docker-compose up
- mvn clean install
- mvn -pl gateway spring-boot:run
- mvn -pl config-server spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=dev1"
-
mvn -pl appkey-service spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=dev1"
-
mvn -pl appkey-service spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=dev2"
-
mvn -pl api-service spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=dev1"
-
mvn -pl api-service spring-boot:run -Dspring-boot.run.jvmArguments="-Dspring.profiles.active=dev2"
- You can use api service document at http://localhost:8100/swagger-ui/index.html
- mvn -pl gateway clean package spring-boot:repackage docker:build
- mvn -pl config-server clean package spring-boot:repackage docker:build
- mvn -pl appkey-service clean package spring-boot:repackage docker:build
- mvn -pl api-service clean package spring-boot:repackage docker:build
- docker-compose up
-
You can search traces between MSA services at http://localhost:16686
- You can view the docker container logs under the logs directory by connecting to the docker volume.