Deploy lightweight, simple and fast Java microservices to Red Hat OpenShift.
Once you have a hypothesis and some spare time, what do you do? You perform an experiment! That is exactly what our Go To Markets - Assets and Architecture team did.
Throughout this blog series, you'll learn about how our team implemented the StoreFront application using the latest and greatest capabilities from Quarkus and deployed it on Red Hat OpenShift. With the StoreFront application, we have created a microservices-based reference architecture that gives users a digital storefront experience and CI/CD pipelines to build and deploy the containers it is made up of on Red Hat OpenShift.
In this blog series, we will examine common and edge-case scenarios when implementing standard microservices projects with the Quarkus framework. Furthermore, we will also walk you through different deployment options. This includes deploying the microservices locally on your workstation and utilizing the most advanced techniques — such as CI/CD with GitOps to deploy them onto a Red Hat OpenShift cluster.
You won't want to miss this blog series if you are currently developing Java-based microservices.
Topics we plan to cover
- Our journey with Quarkus
- Application security: Keycloak is our go-to solution
- Application security: IBM Security Verify
- Deploy StoreFront locally using Docker
- Deploy StoreFront to Red Hat OpenShift using Quarkus
- Part 1: StoreFront with Keycloak integration.
- Part 2: StoreFront with IBM Security Verify integration
- Let's adopt Tekton: CI pipelines for StoreFront
- Kickoff continuous delivery for StoreFront using ArgoCD
- Our GitOps way for StoreFront: OpenShift, Tekton and ArgoCD
If interested, you can find additional information about the StoreFront application and Java microservices architectures in the following resources:
- StoreFront Reference Application and its GitHub repositories.
- Microservices architecture on IBM Architecture Center.
You can also browse the Quarkus guides to become a Quarkus expert.
How did it all begin?
There is no doubt that things are moving pretty fast. For years, Java has been widely used around the world and still is one of the most popular languages. On the other hand, Java is also known for being slow and memory-intensive. Recently, there has been a lot of talk about Quarkus, a Java framework designed to address these issues. Quarkus is also particularly well suited for cloud environments.
We decided to evaluate the features of Quarkus by adopting it to implement and containerize the different microservices of which the StoreFront application is comprised. After successfully deploying these microservices locally using Docker, we realized that containers provide agility unlike anything we've experienced before. At this point, we had already gained enough confidence to port the StoreFront application to Red Hat OpenShift:
There is a lot of buzz around CI/CD nowadays, which results in more than tens of options, tools and technologies to implement a CI/CD strategy. In our opinion, CI/CD is not only about being able to deliver code at high speed but also doing it reliably. As a result, we decided to use Tekton, a powerful and flexible open-source framework for creating CI/CD systems that is a project included in the Cloud Native Computing Foundation (CNCF) and also natively leveraged by the Red Hat OpenShift Pipelines.
But is this enough? Fortunately, we didn't stop there. We went a step further and found GitOps to be the best way to implement continuous deployment for cloud native applications. By utilizing established and emerging tools — including Git, Tekton and ArgoCD — we are looking forward to enabling a developer-centric experience when operating infrastructure:
Our journey so far was exciting and full of rewards. Take a ride with us as we share this blog post that will become a part of a larger series.
A glimpse of the StoreFront reference application
This is a simple store front shopping application that displays a catalog of vintage computing devices, where users can search and purchase products. To interact with the backend data, it uses separate BFF (Backend for Frontend) services:
In this architecture, there are several components:
- In this omnichannel application, an AngularJS web application is integrated.
- To fetch data, the web application invokes its own backend microservice — also known as a BFF or Backend for Frontend — that follows the Backend for Frontend pattern. A frontend developer usually writes backend logic for the frontend in this layer. Node.js Express Framework is used to implement the Web BFF. These microservices are packaged in Docker containers, and they are managed by a Kubernetes cluster.
- The BFFs invoke another layer of reusable Java microservices. The reusable microservices are written using Quarkus.
- Below are the Java microservices we used in StoreFront:
- The Inventory Service stores the inventory items using an instance of MySQL.
- The Catalog Service retrieves items from a searchable JSON datasource using ElasticSearch.
- The Customer Service stores and retrieves customer data from a searchable JSON datasource using CouchDB.
- The Orders Service uses an instance of MariaDB to store order information.
- All these microservices run inside a Kubernetes cluster — for example, the IBM Cloud Kubernetes Service or Red Hat OpenShift — using Docker.
You'll find this multi-part series to be very helpful if you're interested in learning about scalable, secure, resilient and all-around better Java microservices and deploying them to Red Hat OpenShift using the latest and greatest tools and techniques available out there. We will cover a DevOps pipeline that will encompass more than just CI/CD and, along with that, you will also get a chance to see how testing tools, security scans and more are implemented for our StoreFront application.
Additionally, if you would like some hands-on experience with Quarkus, check out quarkus.io guides. There are over a dozen Quarkus-specific tutorials for deploying Java applications on the world’s most flexible, open-source application runtime, built for cloud native and microservices. Also, we have an awesome collection of open-source assets that help you to quickly deliver to Red Hat OpenShift. If you are interested, don't forget to check out the Cloud Native Toolkit and our IBM Garage Methodology Practices.