- A
docker-compose.ymlfile is provided that will set up the Jaeger and Zipkin. - Both the tools can be run together, and application can send traces to both of them.
- Access Jaeger UI on - http://localhost:16686/search
- Acces Zipkin UI on - http://localhost:9411/zipkin/
- The
docker-compose.ymlalso contains setup for OpenCensus Agent - The configuration for OpenCensus Agent is located at -
/resources/docker/ocagent-config.yaml - It is configured to recieve OpenCensus Traces from application, and export traces to Zipkin and Jaeger tools.
- Docker
- Java 11
- Gradle
Do this if you are starting the application for first time
rm -rf ~/data/opencensus-pgres-13
mkdir -p ~/data/opencensus-pgres-13
-
Build
./gradlew clean build --console=plain -
Run
docker-compose up -d --build
Connect to PostGres (username: pgadmin, password: pgadmin#123), and run the sql scripts in resources/dummy-data-scripts folder to create the dummy data for this application.
Customer-DummyData.sql- Run oncustomerdbOrders-DummyData.sql- Run onorderdbProducts-DummyData.sql- Run onproductdb
To connect to postgres from your host machine, you can install pgAdmin
docker run --name postgres-admin -p 5000:80 -e "PGADMIN_DEFAULT_EMAIL=admin@dba.com" -e "PGADMIN_DEFAULT_PASSWORD=admin" -d dpage/pgadmin4
Connect to pgAdmin at http://localhost:5000, and login using the admin credentials provided in docker run command.
-
Get all customers
http://localhost/api/v1/bff/customers?pageNum=0&pageSize=10 -
Get All Orders for a customer
http://localhost/api/v1/bff/customer/5c0e7fe0-f062-11ea-9298-0242c0a88003/orders -
Encrypt properties for
curl http://localhost:<config-server-port>/encrypt -d dummyPropValue -
Get Config for Customer Service
curl http://localhost:<config-server-port>/product-service/default
- Enable SQL Tracing
