Skip to content

Cart service is one of the microservices in CoolStore which is a containerised polyglot microservices application consisting of services based on JBoss Middleware, NodeJS, Spring, Netflix OSS and more running on OpenShift

Notifications You must be signed in to change notification settings

siamaksade/cart-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Red Hat Cool Store Microservice Demo Build Status

This is an example demo showing a retail store consisting of several of microservices based on JBoss EAP 7 and Node.js, deployed to OpenShift.

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

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 JBoss EAP 7, 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. Coolstore Gateway - Java EE + Spring Boot + Camel application running on JBoss EAP 7, serving as an entry point/router/aggregator to the backend services
  5. Web UI - A frontend based on AngularJS and PatternFly running in a Node.js container.

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 new-project coolstore
oc process -f coolstore-template.yaml | oc create -f -

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

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

Deploy Complete Demo with CI/CD

In order to deploy the complete demo infrastructure for demonstrating Microservices, CI/CD, agile integrations and more, either order the demo via RHPDS or use the following script to provision the demo on any OpenShift environment:

$ oc login MASTER-URL
$ openshift/scripts/provision-demo.sh 

You can delete the demo projects and containers with:

$ openshift/scripts/provision-demo.sh --delete

CI/CD Demo CI/CD Demo

Read the script docs for further details and how to run the demo on a local cluster with oc cluster.

Troubleshooting

  • If you see an error like An error occurred while starting the build.imageStream ... it might be due to RHEL or JBoss imagestreams not being installed on your OpenShift environment. Contact the OpenShift admin to install these imagestreams with the following commands:

    oc login -u system:admin
    oc delete -n openshift -f 'https://raw.githubusercontent.com/jboss-openshift/application-templates/master/jboss-image-streams.json'
    oc delete -n openshift -f 'https://raw.githubusercontent.com/openshift/openshift-ansible/master/roles/openshift_examples/files/examples/v1.3/image-streams/image-streams-rhel7.json'
    oc create -n openshift -f 'https://raw.githubusercontent.com/jboss-openshift/application-templates/master/jboss-image-streams.json'
    oc create -n openshift -f 'https://raw.githubusercontent.com/openshift/openshift-ansible/master/roles/openshift_examples/files/examples/v1.3/image-streams/image-streams-rhel7.json'
    
  • If you attempt to deploy any of the services, and nothing happens, it may just be taking a while to download the Docker builder images. Visit the OpenShift web console and navigate to Browse->Events and look for errors, and re-run the 'oc delete ; oc create' commands to re-install the images (as outlined at the beginning.)

About

Cart service is one of the microservices in CoolStore which is a containerised polyglot microservices application consisting of services based on JBoss Middleware, NodeJS, Spring, Netflix OSS and more running on OpenShift

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages