Deploy enterprise Java applications to Azure with JBoss EAP on Red Hat Enterprise Linux
The Azure Quickstart templates in this article show you how to deploy JBoss Enterprise Application Platform (EAP) with Red Hat Enterprise Linux (RHEL) to Azure virtual machines (VMs) and virtual machine scale sets. You'll use a sample Java app to validate the deployment.
JBoss EAP is an open-source application server platform. It delivers enterprise-grade security, scalability, and performance for your Java applications. RHEL is an open-source operating system (OS) platform. It allows scaling of existing apps and rolling out of emerging technologies across all environments.
JBoss EAP and RHEL include everything that you need to build, run, deploy, and manage enterprise Java applications in any environment. The combination is an open-source solution for on-premises, virtual environments, and in private, public, or hybrid clouds.
JBoss EAP installation. You need to have a Red Hat account with Red Hat Subscription Management (RHSM) entitlement for JBoss EAP. This entitlement will let you download the Red Hat tested and certified JBoss EAP version.
The Azure CLI.
RHEL options. Choose pay-as-you-go (PAYG) or bring-your-own-subscription (BYOS). With BYOS, you need to activate your Red Hat Cloud Access RHEL Gold Image before you deploy the Quickstart template.
Java EE and Jakarta EE application migration
Migrate to JBoss EAP
JBoss EAP 7.2 and 7.3 are certified implementations of the Java Enterprise Edition (Java EE) 8 and Jakarta EE 8 specifications. JBoss EAP provides preconfigured options for features such as high-availability (HA) clustering, messaging, and distributed caching. It also enables users to write, deploy, and run applications by using the various APIs and services that JBoss EAP provides.
Applications on JBoss EAP
Web services applications. Web services provide a standard way to interoperate among software applications. Each application can run on different platforms and frameworks. These web services facilitate internal and heterogeneous subsystem communication.
Enterprise Java Beans (EJB) applications. EJB 3.2 is an API for developing distributed, transactional, secure, and portable Java EE and Jakarta EE applications. EJB uses server-side components called Enterprise Beans to implement the business logic of an application in a decoupled way that encourages reuse.
Hibernate applications. Developers and administrators can develop and deploy Java Persistence API (JPA) and Hibernate applications with JBoss EAP. Hibernate Core is an object-relational mapping framework for the Java language. It provides a framework for mapping an object-oriented domain model to a relational database, so applications can avoid direct interaction with the database.
Hibernate Entity Manager implements the programming interfaces and lifecycle rules as defined by the JPA 2.1 specification. Together with Hibernate Annotations, this wrapper implements a complete (and standalone) JPA solution on top of the mature Hibernate Core.
Red Hat Migration Toolkit for Applications
Red Hat Migration Toolkit for Applications (MTA) is a migration tool for Java application servers. Use this tool to migrate from another app server to JBoss EAP. It works with IDE plug-ins for Eclipse IDE, Red Hat CodeReady Workspaces, and Visual Studio Code for Java.
MTA is a free and open-source tool that:
- Automates application analysis.
- Supports effort estimation.
- Accelerates code migration.
- Supports containerization.
- Integrates with Azure Workload Builder.
Migrate JBoss EAP from on-premises to Azure
The Azure Marketplace offer of JBoss EAP on RHEL will install and provision on Azure VMs in less than 20 minutes. You can access these offers from Azure Marketplace.
This Azure Marketplace offer includes various combinations of EAP and RHEL versions to support your requirements. JBoss EAP is always BYOS, but for RHEL OS, you can choose between BYOS or PAYG. The Azure Marketplace offer includes plan options for JBoss EAP on RHEL as standalone or clustered VMs:
- JBoss EAP 7.2 on RHEL 7.7 VM (PAYG)
- JBoss EAP 7.2 on RHEL 8.0 VM (PAYG)
- JBoss EAP 7.3 on RHEL 8.0 VM (PAYG)
- JBoss EAP 7.2 on RHEL 7.7 VM (BYOS)
- JBoss EAP 7.2 on RHEL 8.0 VM (BYOS)
- JBoss EAP 7.3 on RHEL 8.0 VM (BYOS)
Along with Azure Marketplace offers, you can use Quickstart templates to get started on your Azure migration journey. These Quickstarts include prebuilt Azure Resource Manager (ARM) templates and scripts to deploy JBoss EAP on RHEL in various configurations and version combinations. You'll have:
- A load balancer.
- A private IP for load balancing and VMs.
- A virtual network with a single subnet.
- VM configuration (cluster or standalone).
- A sample Java application.
Solution architecture for these templates includes:
- JBoss EAP on a standalone RHEL VM.
- JBoss EAP clustered across multiple RHEL VMs.
- JBoss EAP clustered through Azure virtual machine scale sets.
Linux Workload Migration for JBoss EAP
Azure Workload Builder simplifies the proof-of-concept, evaluation, and migration process for on-premises Java apps to Azure. Workload Builder integrates with the Azure Migrate Discovery tool to identify JBoss EAP servers. Then it dynamically generates an Ansible playbook for JBoss EAP server deployment. It uses the Red Hat MTA tool to migrate servers from other app servers to JBoss EAP.
Steps for simplifying migration include:
- Evaluation. Evaluate JBoss EAP clusters by using an Azure VM or a virtual machine scale set.
- Assessment. Scan applications and infrastructure.
- Infrastructure configuration. Create a workload profile.
- Deployment and testing. Deploy, migrate, and test the workload.
- Post-deployment configuration. Integrate with data, monitoring, security, backup, and more.
Server configuration choice
For deployment of the RHEL VM, you can choose either PAYG or BYOS. Images from Azure Marketplace default to PAYG. Deploy a BYOS-type RHEL VM if you have your own RHEL OS image. Make sure your RHSM account has BYOS entitlement via Cloud Access before you deploy the VM or virtual machine scale set.
JBoss EAP has powerful management capabilities along with providing functionality and APIs to its applications. These management capabilities differ depending on which operating mode you use to start JBoss EAP. It's supported on RHEL and Windows Server. JBoss EAP offers a standalone server operating mode for managing discrete instances. It also offers a managed domain operating mode for managing groups of instances from a single control point.
JBoss EAP-managed domains aren't supported in Microsoft Azure because the Azure infrastructure services manage the HA feature.
The environment variable
EAP_HOME denotes the path to the JBoss EAP installation. Use the following command to start the JBoss EAP service in standalone mode:
This startup script uses the EAP_HOME/bin/standalone.conf file to set some default preferences, such as JVM options. You can customize settings in this file. JBoss EAP uses the standalone.xml configuration file to start in standalone mode by default, but you can use a different mode to start it.
To start JBoss EAP with a different configuration, use the
--server-config argument. For example:
For a complete listing of all available startup script arguments and their purposes, use the
--help argument. For more information, see Server Runtime Arguments on EAP 7.2 or Server Runtime Arguments on EAP 7.3.
JBoss EAP can also work in cluster mode. JBoss EAP cluster messaging allows grouping of JBoss EAP messaging servers to share message processing load. Each active node in the cluster is an active JBoss EAP messaging server, which manages its own messages and handles its own connections. To learn more, see Clusters Overview on EAP 7.2 or Clusters Overview on EAP 7.3.
Support and subscription notes
These Quickstart templates are offered as follows:
- RHEL OS is offered as PAYG or BYOS via Red Hat Gold Image model.
- JBoss EAP is offered as BYOS only.
Using RHEL OS with the PAYG model
By default, these Quickstart templates use the On-Demand RHEL 7.7 or 8.0 PAYG image from Azure Marketplace. PAYG images have an additional hourly RHEL subscription charge on top of the normal compute, network, and storage costs. At the same time, the instance is registered to your Red Hat subscription. This means you'll be using one of your entitlements.
This PAYG image will lead to "double billing." You can avoid this issue by building your own RHEL image. To learn more, read the Red Hat knowledge base article How to provision a RHEL VM for Microsoft Azure. Or activate your Red Hat Cloud Access RHEL Gold Image.
For details on PAYG VM pricing, see Red Hat Enterprise Linux pricing. To use RHEL in the PAYG model, you'll need an Azure subscription with the specified payment method for RHEL 7.7 on Azure Marketplace or RHEL 8.0 on Azure Marketplace. These offers require a payment method to be specified in the Azure subscription.
Using RHEL OS with the BYOS model
To use BYOS for RHEL OS, you need to have a valid Red Hat subscription with entitlements to use RHEL OS in Azure. Complete the following prerequisites before you deploy the RHEL OS with the BYOS model:
Ensure that you have RHEL OS and JBoss EAP entitlements attached to your Red Hat subscription.
Authorize your Azure subscription ID to use RHEL BYOS images. Follow the Red Hat Subscription Management documentation to complete the process, which includes these steps:
Enable Microsoft Azure as a provider in your Red Hat Cloud Access Dashboard.
Add your Azure subscription IDs.
Enable new products for Cloud Access on Microsoft Azure.
Activate Red Hat Gold Images for your Azure subscription. For more information, see Red Hat Gold Images on Microsoft Azure.
Wait for Red Hat Gold Images to be available in your Azure subscription. These images are typically available within three hours of submission.
Accept the Azure Marketplace terms and conditions for RHEL BYOS images. You can complete this process by running the following Azure CLI commands. For more information, see the RHEL BYOS Gold Images in Azure documentation. It's important that you're running the latest Azure CLI version.
Open an Azure CLI session and authenticate with your Azure account. For assistance, see Sign in with Azure CLI.
Verify that the RHEL BYOS images are available in your subscription by running the following CLI command. If you don't get any results here, ensure that your Azure subscription is activated for RHEL BYOS images.
az vm image list --offer rhel-byos --all
Run the following command to accept the Azure Marketplace terms for RHEL 7.7 BYOS and RHEL 8.0 BYOS, respectively:
az vm image terms accept --publisher redhat --offer rhel-byos --plan rhel-lvm77
az vm image terms accept --publisher redhat --offer rhel-byos --plan rhel-lvm8
Your subscription is now ready to deploy RHEL 7.7 or 8.0 BYOS on Azure virtual machines.
Using JBoss EAP with the BYOS model
JBoss EAP is available on Azure through the BYOS model only. When you're deploying this template, you need to supply your RHSM credentials along with the RHSM Pool ID with valid EAP entitlements. If you don't have EAP entitlements, obtain a JBoss EAP evaluation subscription before you get started.
You can deploy the template in the following ways:
PowerShell. Deploy the template by running the following commands:
New-AzResourceGroup -Name <resource-group-name> -Location <resource-group-location> #use this command when you need to create a new resource group for your deployment
New-AzResourceGroupDeployment -ResourceGroupName <resource-group-name> -TemplateUri <raw link to the template which can be obtained from github>
For information on installing and configuring Azure PowerShell, see the PowerShell documentation.
Azure CLI. Deploy the template by running the following commands:
az group create --name <resource-group-name> --location <resource-group-location> #use this command when you need to create a new resource group for your deployment
az group deployment create --resource-group <my-resource-group> --template-uri <raw link to the template which can be obtained from github>
For details on installing and configuring the Azure CLI, see Install the CLI.
Azure portal. You can deploy to the Azure portal by going to the Azure Quickstart templates as noted in the next section. After you're in the Quickstart, select the Deploy to Azure or Browse on GitHub button.
Azure Quickstart templates
You can start by using one of the following Quickstart templates for JBoss EAP on RHEL that meets your deployment goal:
JBoss EAP on RHEL (standalone VM). This will deploy a web application named JBoss-EAP on Azure to JBoss EAP 7.2 or 7.3 running on RHEL 7.7 or 8.0 VM.
JBoss EAP on RHEL (clustered, multiple VMs). This will deploy a web application called eap-session-replication on a JBoss EAP 7.2 or 7.3 cluster running on n number of RHEL 7.7 or 8.0 VMs. The user decides the n value. All the VMs are added to the back-end pool of a load balancer.
JBoss EAP on RHEL (clustered, virtual machine scale set). This will deploy a web application called eap-session-replication on a JBoss EAP 7.2 or 7.3 cluster running on RHEL 7.7 or 8.0 virtual machine scale sets.
- Azure Hybrid Benefit
- Configure a Java app for Azure App Service
- JBoss EAP on Azure Red Hat OpenShift
- JBoss EAP on Azure App Service Linux
- Deploy JBoss EAP on Azure App Service
- Learn more about JBoss EAP 7.2.
- Learn more about JBoss EAP 7.3.
- Learn more about Red Hat Subscription Management.
- Learn about Red Hat workloads on Azure.
- Deploy JBoss EAP on an RHEL VM or virtual machine scale set from Azure Marketplace.
- Deploy JBoss EAP on an RHEL VM or virtual machine scale set from Azure Quickstart templates.