dudash / openshift-microservices

:memo: Example showcasing how to leverage OpenShift and it's runtimes to do microservices
Apache License 2.0
9 stars 21 forks source link
3scale istio keycloak microservices openshift redhat

THIS REPO IS NOW PART OF A HANDS ON WORKSHOP RUN BY RED HAT

Details on that here: http://redhatgov.io/workshops/openshift_service_mesh/

Active development here has stopped, find maintenance updates happening here

Latest tested OpenShift version: 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:

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 initial design for the architecture:

Diagram In the above diagram web app users are accessing the APP UI service which in turns calls chains of microservices on the backend. Optionally the backend services have calls to API services managed via 3scale (and future access to the services from mobile apps could go through the 3scale API management capability as well). A single sign on capability provides security around user access to the application via OpenID Connect (OIDC) and OAuth2. The Istio service mesh is shown too - it provides core capabilities for traffic management and security of the services as well as detailed observation into the application's operational status. 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).

:information_source: This example is based on OpenShift Container Platform version 4.3.

How to run this?

First off, you need access to an OpenShift cluster. Don't have an OpenShift cluster? Download Code Ready Containers (CRC) for free here: https://developers.redhat.com/products/codeready-containers/overview. You will need a fairly beefy machine to run everything on the same machine, so I'd recommend you expose extra CPUs and Mem to CRC when you start your cluster - I actually haven't tried it so YMMV.

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.

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:

This demo is now part of a hands-on workshop from Red Hat!

Click here to check it out

References, useful links, good videos to check out

Microservices

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.