Migrating your JBOSS EAP apps to Azure App Service
Published Feb 13 2024 09:00 AM 1,261 Views
Microsoft

Migrating web apps to App Service typically follows a 4-step process: 

  1. Discover
  2. Assess
  3. Upgrade
  4. Migrate

We'll take a look at each of these for a JBOSS EAP application, the cool store from Red Hat, as an example of an app migration using the latest and greatest tooling from Microsoft and Red Hat. 

 

If you prefer video content, check out the video demo, or livestream of this content.

 

Discover

Discovering applications can be a challenge, especially in the case of bulk migrations of large environments potentially containing hundreds or more applications. Azure Migrate makes discovery of web apps, servers, and even databases simpler than ever. Just run the appropriate Azure Migrate tool in your VM or on-prem environment to generate an inventory of applications, servers, and databases. 

 

Assess

Before migrating your applications to App Service, they may need to be modernized to be cloud-ready. In the case of JBOSS EAP applications, the Red Hat Migration Toolkit for Applications (MTA) is available to help. MTA performs source code inspection and static code analysis to determine your app's cloud readiness. Microsoft engineers directly contributed to this tool, providing specific rulesets for Azure App Service migration targets, giving you access to expert engineering help with pinpointing issues and potential improvements to your applications. 

 

Being a CLI tool downloadable off the Red Hat website, MTA is straightforward and easy to use or even script for bulk cloud readiness assessments. Simply run the tool on the source code of your application to produce a report specifying exactly which issues your code has, tagged with the migration target for your app. MTA even shows specific file locations and line numbers for issues, saving enormous amounts of guesswork and engineering hours spent troubleshooting app modernization efforts.

 

The following output was produced in the report generated by this CLI command: 

 

mta-cli-6.2.1.GA-redhat-00002\bin\windup-cli --input .\coolstore-jakartaee

 

 

coolstore.png

 

Upgrade

Upgrading your app to be cloud ready can be time consuming. This effort is usually done using your preferred IDE and dev setup, but can be enhanced by the output from MTA. For example, after completing a modernization effort, running MTA over the updated application source code will produce a new report detailing any newly discovered issues or otherwise necessary changes for cloud readiness. Once all the "cloud-mandatory" issues are complete, your app is ready to migrate to Azure App Service! But you'll need a test environment or enterprise environment first...

 

Migrate

Completing your migration requires an environment set up in App Service to host your application. For test applications or individual app migrations, using the maven plugin to create and deploy your application is sufficient to get familiar with the App Service deployment process for Java applications (in this case, a JBOSS EAP application). Steps included at the end of this article. 

 

For at-scale migrations requiring enterprise environments, the App Service Landing Zone Accelerator can be incredibly helpful. Landing Zone Accelerator is an open-source collection of ARM, Bicep, and Terraform templates designed by engineers at Microsoft for a secure environment baseline. This applies to both single tenant (App Service Environment) or multitenant setups. 

 

Being open source, this repo can always be forked and modified if you don't see the perfect template or configuration for your application or suite of applications targeted for migration to Azure App Service. For this example, we'll just use the provided Deploy to Azure button, which still allows for some configuration in a clearly defined, in-portal experience (shown below) for configuring the specifics of your enterprise environment. Note that there may be some cost associated with the resources created by Landing Zone Accelerator, depending on your selected options. This is intended for enterprise environment creation for applications "at-scale". 

 

LZA.png

 

After creating your environment, the last step is to deploy! First, run: 

 

 

mvn clean install

 

 

This will grab and install all the dependencies for your application.

 

Next, you'll need to configure the Maven Plugin for your application by running the following command: 

 

 

mvn com.microsoft.azure:azure-webapp-maven-plugin:2.12.0:config 

 

 

This will accelerate configuration of your deployment for App Service. You may be asked to authenticate and provide some information about your soon-to-be-deployed application including: OS type (Linux), Java version (Java 11), web container (JBOSS EAP 7), and pricing tier (P1V3). After making these selections, you'll need to modify your pom.xml file to specify your resource group and app name as shown below: 

 

pom.png

 

Now all we have to do is complete our deployment to App Service by running: 

 

 

mvn package azure-webapp:deploy -DskipTests 

 

 

This command builds and deploys our JBOSS EAP application to App Service. Once complete, browse to your App Service URL to see your web app up and running! 

 

website screenshot.png

Now we've successfully discovered, assessed, upgraded, and migrated our JBOSS EAP application to App Service! For additional resources, check out the Azure App Service Quickstart for Java to get started writing, building, and deploying Java apps to App Service today!

Co-Authors
Version history
Last update:
‎Feb 10 2024 02:29 PM
Updated by: