This image is one of 5 backend microservice APIs that connect to Azure CosmosDB + a Java front-end website which comprises the Parts Unlimited MRP microservices application. It has hands-on-labs (HOLs) associated with them which can be found at: https://microsoft.github.io/PartsUnlimitedMRPmicro/ all of which deploy to Azure Container Service (ACS) with Kubernetes (K8s) orchestrator.
The 5 other docker hub images are:
- Dealer - .Net Core API
- Catalog - Java Spring API
- Quote - Java Spring API
- Shipment - Java Spring API
- Web - Java JSP webpage hosted on Tomcat 9.
The order microservice is a Java 8 spring boot API which connects to MongoDB or CosmosDB with MongoDB API. The source code and more details on how to develop, build, and test this code can be found here on GitHub.
The Docker file used to create this image is at the root of that location, but also linked to directly here for convenience. Here is the size and layers breakdown of the :latest tagged image:
Since this is a sample application not under active development, likely the only tag / version will be
1.0.0 which is also
latest. However, the image will be updated to ensure the underlying
FROM host container is patched where the build of the code resides.
How to use this image
A MongoDB or CosmosDB using MongoDB connection string is required for the API to run and must be passed into the image.
<mongodb-string> in the command below with your own to run the microservice locally on port 8080. Be sure to insert any database name (lowercase, alphanumeric only) after the base connection url. For instance with CosmosDB string:
mongodb://mydbserver:firstname.lastname@example.org:10255/?ssl=true&replicaSet=globaldb would add
pumrp and now the connection string becomes: :
docker run -d --name pumrp-order -p 8080:8080 -e mongo_conn='<mongodb-string>' microsoft/pumrp-order
Now to verify the API is working, look at the log output via the following command:
docker logs pumrp-order
After ~30 seconds the logs will display something similar to the following:
2017-07-18 21:57:48.916 INFO [order-service,,,] 5 --- [ main] smpl.order.OrderServiceApplication : Started OrderServiceApplication in 18.575 seconds (JVM running for 19.257) 2017-07-18 21:57:48.917 INFO [order-service,,,] 5 --- [ main] smpl.order.OrderServiceApplication : Order Service Ready for use
Issue or Recommendation?
Please report problems, feature requests, or recommendations to the PartsUnlimitedMRPmicro GitHub Issue page. This project is open source and welcomes contributions.