DisorderlyLabs-Microservice-Infrastructure
In-house MicroService Infrastructure for Disorderly Labs
Prerequisites
- JDK 6+
- Gradle
- Docker
Build the images
Go to individual folders and execute ./gradlew build docker
. You can configure the name of your docker image in the build.gradle
of each microservice.
To build all run sh build.sh
.
Create Network
docker network create --subnet=10.0.0.0/16 mynet
Start the services
sh start.sh
You can also run each container separately without the -d
parameter, to view the logs for each Microservice.
Run a sample command
curl -X PUT "http://localhost:7000/app/instantPlaceOrder?name=Chamber&quantity=7"
The above call involves all five microservices. First 'App' makes a call to 'Inventory', to take the item out of inventory (Inventory Database). Then 'App' makes a call to 'Cart', to add the item to the Cart (Cart Database). Once successful, 'Cart' makes a call to 'paymentGateway' to process the payment. On successful payment, 'Cart' makes a call to 'Invoice' to generate invoice.