Skip to content

📝 Example showcasing how to leverage OpenShift and it's runtimes to do microservices

License

Notifications You must be signed in to change notification settings

gbengataylor/openshift-microservices

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PLEASE NOTE THIS REPO IS IN-WORK

We are still building out the core capabilities. Current status:

  • Working services: app-ui, boards, context-scraper, and profile service
  • Coming soon: Auth via SSO
  • Working platform components integrated: Istio

This header will be removed when the initial version is ready for beta usage

OpenShift Version

Microservices

Microservices, also known as the microservice architecture, is a software development technique that structures an application as a collection of loosely coupled services. Microservice architectures enable the continuous delivery/deployment/scaling of complex applications.

This git repo showcases an app built using the microservice architecture with several intentionally simple components. The goal is to showcase an example way to develop and manage microservices using a container platform. However, this example is not meant to be prescriptive - obviously your team and business goals will drive your specific architecture and environment. The technology should translate and hopefully you will find this repo helpful.

Why microservices?

Agility. Deliver application updates faster. Isolate and fix bugs easier. Done right, a microservices architecture will you help to meet several important non-functional requirements for your software:

  • scalability
  • performance
  • reliability
  • resiliency
  • extensibility
  • availability

This Repo

This repo is an example microservices based application. It's core functionality is a paste board. It's an intentionally simple example that could be the prototype for something bigger like a Pinterest, a PasteBin, a CodePen, or even a Ranker.

Current screenshot

Screenshot

Here's the planned architecture:

Diagram In the above diagram web app users are accessing the APP UI service which has all it's calls to the application managed via 3scale. Access to the services from mobile apps also go through the 3scale API management capability. 3scale APIs are secured via a single sign on capability (keycloak in this example). The Istio service mesh is shown as an optional component because some of the demos in this repo depend upon it. All of this is running on top of an OpenShift cluster. (Additional service interactions and deployment details are in other diagrams).

Diagram The above diagram shows how the services are related and additionally how they are abstracted from the underlying infrastructure (compute and storage) when deployed on top of an OpenShift cluster. (The abstraction means this can be run in AWS, GCP, Azure, on-prem, or in some hybrid combination).

ℹ️ This example is based on OpenShift Container Platform version 3.11. It should work with other versions but has not been tested.

How to run this?

First off, you need access to an OpenShift cluster. Don't have an OpenShift cluster? That's OK, download the CDK (or minishift) for free here: https://developers.redhat.com/products/cdk/overview/. You will need a fairly beefy machine to run everything on the same machine via CDK, so I'd recommend you expose extra CPUs and Mem to the CDK when you start your cluster.

You will also need to install/configure the additional dependencies you plan to leverage. We assume you want to run these in the cluster, so you might need to tweak the install scripts to move things outside or to use already existing shared services in different namespaces.

  • Istio
  • 3Scale - COMING SOON
  • Kafka - COMING SOON
  • Caching - COMING SOON

To install everything:

Once you have the basic app up and running, how about trying out some demos

About the code / software architecture

The parts in action here are:

  • A set of microservices that together provide full application capability for a cut and paste board (in code folder)
  • Key platform components that enable this example:
    • container building via s2i
    • service load balancing
    • service autoscaling
    • service health checks and recovery
    • dynamic storage allocation and persistent volume mapping
    • Kubernetes operators to manage middleware components (e.g. Kafka)
    • advanced service traffic management via Istio
    • additional service observability via Istio
  • Middleware components in this example:
    • API management and metrics (on the external facing APIs)
    • authorization and application security via SSO
    • Kafka for scalable messaging

References, useful links, good videos to check out

Microservices

Istio Service Mesh

Single Sign On

Contributing

See guidelines here. But in general I would love for help with 2 things.

  1. Use this repo and report issues, even fix them if you can.
  2. Have discussions on topics related to this repo. Things like "Securing services", or "Microservices vs SOA"...
    • currently doing this in issues (and tagging them as a discussion).

License

Apache 2.0.

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 76.0%
  • Java 7.7%
  • HTML 6.2%
  • FreeMarker 6.2%
  • Shell 2.9%
  • CSS 1.0%