Chapter 2. Reference Architecture Environment

2.1. Project Modules

This reference architecture takes advantage of the following provided middleware xPaaS container images and templates:

The architecture designs, develops and deploys a simple distributed microservice architecture on EAP 7 and FIS 2.0, on top of OCP 3.5. The project builds upon a basis design laid out and explained in depth in the reference architecture document on EAP Microservice Architecture, enriching functionality with a microservices Gateway API pattern implementation, event-driven microservices, and monitoring components.

The OCP 3.5 environment used herein includes a single stand-alone master configuration with two deployment nodes, which is not intended for use in a production environment. Further information on prerequisite installation and configuration of the Red Hat Enterprise Linux Operating System, OpenShift Container Platform, and more can be found in Section 3, Creating the Environment, of a previous Reference Architecture, Building JBoss EAP 7 Microservices on OpenShift Container Platform. The example application will set up two OpenShift projects, fis2-msa and logging, to be deployed to the two schedulable nodes of the cluster.

The primary OpenShift project, fis2-msa, includes nine services, collectively representing an eCommerce service scenario:

  • A-MQ (Messaging): based on A-MQ - Elastic messaging broker for gateway and event-driven modules
  • Billing Service: based on FIS 2.0 - Event-driven module simulating payment processing and validation
  • Gateway Service: based on FIS 2.0 - Microservices gateway API module serving to route and proxy API requests from upstream consumers to downstream services
  • Presentation: based on EAP 7 - Representation of a possible upstream consumer; simple eCommerce website
  • Product DB: based on MySQL - Product information database
  • Product Service: based on EAP 7 - RESTful service providing logic regarding product information
  • Sales DB: based on MySQL - Transaction and customer information database
  • Sales Service: based on EAP 7 - RESTful service providing logic regarding customer and order information
  • Warehouse Service: based on FIS 2.0 - Event-driven module simulating warehouse shipping fulfillment of successful transactions

A Secondary project, based on the EFK Logging Stack template, uses the following 3 components to provide unified log access to multiple nodes' containers via a single interface:

  • Fluentd: cross-platform data collection providing analyzation of event and application logs
  • Elasticsearch: Lucene-based search engine providing full-text search capabilities across the aggregated log collection
  • Kibana: data visualization plugin for Elasticsearch

Figure 2.1. Design Diagram

Design Diagram

The Presentation service represents a possible consumer for the application, sending requests to the microservices API Gateway and serving HTML to the client browser over HTTP. This web tier is stateless, and can therefore be replicated without concern for loss of state and EAP clustering setup. The provisioning of a gateway within the project yields the ability to serve various types of upstream consumers such as mobile, automation, and third-party integration.

Image-based deployments rely on the Source to Image (S2I) functionality to build and deploy.

All OpenShift services can be configured and scaled with the desired number of replicas. In a default OpenShift installation, the nodes are the only targets for service deployment. However, the masters can also be configured as schedulable in order to host service replicas.