Featured image for Red Hat JBoss Enterprise Application Platform.

Despite the incredible pace of adoption of container orchestration platforms such as Kubernetes and Red Hat OpenShift, the vast majority of Java workloads are still running on virtual machines or bare metal. In many cases, enterprise operation teams are mandated to modernize and move these workloads to the cloud, and OpenShift is the natural destination.

When we talk about Red Hat JBoss Enterprise Application Platform (EAP) migration, developers ask questions such as:

  • What does the process involve?
  • What are the benefits of moving workloads to OpenShift?
  • How easy is it to move these workloads?
  • How can you be sure you won't require code changes?
  • What tools are there to assist with this effort?

This article, the first in a two-part series, provides answers to these questions. The second part of the series is a tutorial that walks through the steps to actually migrate a JBoss EAP application to OpenShift.

Migrating Java applications to OpenShift: What's involved?

OpenShift is an enterprise Kubernetes platform. Kubernetes is a container orchestration system for automating computer application deployment, scaling, and management. All applications deployed on Kubernetes must be containerized. To containerize an application, an image in compliance with the Open Container Initiative (OCI) needs to be built containing the required runtime, any additional libraries, and the application code. Red Hat provides a tool to create these images from JBoss EAP applications: The JBoss EAP Source-to-Image (S2I) builder.

Once the image is built, there are a number of ways (e.g., template, Helm chart, Kubernetes Operator) to deploy the application image to OpenShift. My recommendation is to use the JBoss EAP Operator. This Operator has been designed to simplify some of the operations team's tasks when deploying EAP applications. The Operator supports functionality critical to enterprise-scale applications such as transaction recovery and Enterprise Java Bean (EJB) remote calls. Using the Operator, deployment can be as simple as identifying the image and specifying the number of instances to deploy.

What are the benefits of moving JBoss EAP workloads to OpenShift?

There are quite a few benefits. Here are some of the main ones:

  • Reduced operational costs: Taking advantage of OpenShift tools—such as the JBoss EAP Operator, OpenShift Service Mesh, Tekton, and Argo CD—reduces the load on the operations team.
  • Improved resource usage: The OpenShift JBoss EAP S2I builder tools, since version 7.3 of JBoss EAP, deliver greatly reduced image size and memory footprint through a combination of Galleon layer provisioning and use of a JBoss EAP runtime image.
  • Integrated monitoring and metrics: OpenShift integrates application monitoring and metrics through the use of Prometheus. These tools collect metrics from JBoss EAP applications running on OpenShift. In addition, with the JBoss EAP Expansion Pack (XP) MicroProfile tools, JBoss EAP applications can report their health status to OpenShift with minimal code.
  • Improved developer experience: OpenShift provides a lot of tools to improve the developer experience, such as the Developer UI (a developer-focused view of the running cluster), continuous integration tools (Tekton), and all the microservices patterns provided out of the box by OpenShift Service Mesh.
  • Kubernetes functionality: Kubernetes provides a number of services to manage the maintenance and running of application workloads: For example, resource management, application health monitoring, workload scheduling, and horizontal scaling. All combine to make better use of resources and save costs.
  • Additional benefits from the Red Hat Runtimes bundle: JBoss EAP subscriptions can be converted to Red Hat Runtimes subscriptions at no additional cost. With Red Hat Runtimes, customers get the same level of support for JBoss EAP along with tools essential to developing cloud applications, such as Red Hat's single sign-on technology, Red Hat Data Grid, and Red Hat AMQ Broker.

How easy is it to move workloads?

The enterprise world is all about automation. Migrating a single workload to OpenShift is very straightforward: We'll go through how to do it in the second part of this series. But for large amounts of applications, you'll need to automate this process. Everything we're going to go through in this article can be incorporated into pipelines and automation tools.

How can you be sure of no code changes?

At Red Hat, we know JBoss EAP and legacy Java applications well. We also know Kubernetes and what works well in containers. In our experience, JBoss EAP 7 applications rarely require code changes during containerization. A few exceptions exist, such as applications issuing remote method invocations, but these are rare. EJB remoting is more common.

To help you determine whether any code changes are required, Red Hat supplies the migration toolkit for applications. This tool analyzes Java applications to determine their suitability for migration to a range of target destinations, including containerization. You can run the migration toolkit using the web user interface shown in Figure 1, a command-line interface, a Maven plugin, or an IDE extension. This tool can be used to analyze applications you want to containerize and presents any mandatory or recommended changes in a report.

The graphical interface of Red Hat's migration toolkit for applications offers several options, including Containerization.
Figure 1. The graphical interface of the migration toolkit for applications offers several options, including containerization.

What tools are there to assist with this effort?

We've already touched on two tools: the JBoss EAP S2I image builder and the migration toolkit for applications.

There is also a range of tools under the Konveyor community project. These tools assist with the migration of workloads to Kubernetes. In addition to tools for rehosting an existing container-based application, rehosting a virtual machine, and migrating an application onto Kubernetes, the Konveyor project also provides tools to manage an enterprise's application portfolio and measure the performance of software delivery by gathering metrics about team and organizational behaviors over time.

Note: The Konveyor project is an upstream project maintained by an open source community, and is not covered by Red Hat support.

Conclusion

OpenShift makes application development and deployment easier on many levels. A number of tools, both from the Konveyor project and from Red Hat itself, make it relatively easy to migrate your Java application. Stay tuned for the next article in this series, which will dive into the process step-by-step.

Last updated: August 26, 2022