jbossdemocentral / coolstore-microservice

CoolStore is a containerised polyglot microservices application consisting of services based on JBoss, NodeJS, Spring Boot, WildFly Swarm, Vert.x, Netflix OSS and more running on OpenShift
299 stars 325 forks source link

Red Hat Cool Store Microservice Demo Build Status

This is an example demo showing a retail store consisting of several microservices based on Red Hat OpenShift Application Runtimes (Spring Boot, WildFly Swarm, Vert.x, JBoss EAP and Node.js) deployed to OpenShift.

It demonstrates how to wire up small microservices into a larger application using microservice architectural principals.

Development Branch

:warning: Please note that master is our development branch and may contain untested features. For stable branch use a version branch like 1.2.x

Services

There are several individual microservices and infrastructure components that make up this app:

  1. Catalog Service - Java application running on JBoss Web Server (Tomcat) and MongoDB, serves products and prices for retail products
  2. Cart Service - Spring Boot application running on JDK which manages shopping cart for each customer
  3. Inventory Service - Java EE application running on JBoss EAP 7 and PostgreSQL, serves inventory and availability data for retail products
  4. Pricing Service - Business rules application for product pricing on JBoss BRMS
  5. Review Service - WildFly Swarm service running on JDK for writing and displaying reviews for products
  6. Rating Service - Vert.x service running on JDK for rating products
  7. Coolstore Gateway - Spring Boot + Camel application running on JDK serving as an API gateway to the backend services
  8. Web UI - A frontend based on AngularJS and PatternFly running in a Node.js container.

Architecture Screenshot

Architecture Screenshot

Prerequisites

In order to deploy the CoolStore microservices application, you need an OpenShift environment with

Deploy CoolStore Microservices Application

Deploy the CoolStore microservices application using this template openshift/coolstore-template.yaml:

oc login -u developer
oc new-project coolstore
oc process -f openshift/coolstore-template.yaml | oc create -f -

When all pods are deployed, verify all services are functioning:

oc rsh $(oc get pods -o name -l app=coolstore-gw)
curl http://catalog:8080/api/products
curl http://inventory:8080/api/availability/329299
curl http://cart:8080/api/cart/FOO
curl http://rating:8080/api/rating/329299
curl http://review:8080/api/review/329299

Deploy Demo: CoolStore Microservices with CI/CD

Use the Ansible deployer for deploying the CoolStore demos: https://github.com/siamaksade/openshift-demos-ansible

Troubleshooting