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.
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:
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...
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".
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:
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:
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!
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!