Loading...

Azure Tips and Tricks - How to deploy a Java EE application to Azure

Azure Tips and Tricks - How to deploy a Java EE application to Azure

How to deploy a Java EE application to Azure

 

 

Run Red Hat JBoss EAP on Azure

You can use JBoss EAP (Enterprise Application Platform) to run Java applications, like Java EE (Enterprise Edition) in a variety of environments, including on-premises and the cloud. JBoss provides enterprise-grade tools to manage, build and run your applications.

In Azure, you can host JBoss EAP on Azure App Service, Azure Red Hat Openshift and on Azure Virtual Machine Scale Sets. In this post, we'll host JBoss EPA on an Azure App Service Web App and use it to run a Java EE application.

 

Prerequisites

If you want to follow along, you'll need the following:

  • An Azure subscription (If you don't have an Azure subscription, create a free account before you begin)

 

Host JBoss EAP on Azure App Service

We will start by creating an Azure App Service Web App that hosts the JBoss Enterprise Application Platform.

  1. Go to the Azure portal
  2. Click the Create a resource button (the plus-sign in the top left corner)
  3. Search for Web App, select the "Web App" result and click Create
    1. Select a Resource Group
    2. Enter a Name
    3. For "Runtime stack", pick "Java 8"
    4. Next, select "Red Hat JBoss EAP 7" for "Java web server stack"
    5. Pick a Region
    6. Click Review + create and then Create to create the Web App
 

162create1.png

 

(create an Azure App Service Web App in the Azure portal)

 

  1. Next, open the Azure Cloud Shell. You can do this by clicking on the Cloud Shell icon in the top-right menu, or by going to http://shell.azure.com/
  2. We will use a sample Java EE application to run in JBoss on App Service. Clone the sample application with this command:

 

git clone https://github.com/agoncal/agoncal-application-petstore-ee7.git

 

     6. Navigate to the application folder:
cd agoncal-application-petstore-ee7

 

  1. Next, we will install the App Service Maven plugin. This will help with building and deploying the app to App Service:
mvn com.microsoft.azure:azure-webapp-maven-plugin:2.5.0:config
  1. The Maven plugin will ask to select the App Service that we want to use. Select the App Service that we just created (for instance, by pressing 2)

162mavenplugin.png

(The Azure App Service Maven plugin in action)

 

  1. Confirm the Web App properties by typing "Y"
  2. Next, deploy the Java EE application to the App Service with this command:

 

mvn package azure-webapp:deploy -DskipTests

 

  1. When the deployment is done, you can use the application by navigating to the App Service Web App URL in a browser

jbossjboss

 

(The Java EE application running on JBoss EAP in an Azure App Service Web App)

 

Conclusion

You can run any type of application in Azure, including Java EE applications on JBoss EAP, for instance on an Azure App Service Web App.To learn more, create a trial account today and go and check it out!

Published on:

Learn more
Azure Developer Community Blog articles
Azure Developer Community Blog articles

Azure Developer Community Blog articles

Share post:

Related posts

Announcing Azure Cosmos DB Integration with LangChain.js!

Announcing Azure Cosmos DB Vector Store Integration with LangChain.js! We’re simplifying AI app development by integrating Azure Cosmos ...

14 hours ago

Scale Your Database Workloads with Multishard Clusters in vCore-based Azure Cosmos DB for MongoDB

We’re excited to introduce significant enhancements to vCore-based Azure Cosmos DB for MongoDB with the release of multishard clusters preview...

14 hours ago

Transform Your Azure Container Apps with Bulletproof Security

In this post, we explore how to transform your Azure Container Apps with unshakable security. Learn how to master secrets management, optimize...

1 day ago

Optimize Azure Landing Zone with Azure Virtual Network Manager IP Address Management

Optimize Azure Landing Zone with Azure Virtual Network Manager IP Address Management What you will learn from this blog This blog explores how...

1 day ago

Announcing UNLIMITED Public Preview of Metadata Caching for Azure Premium SMB/REST File Shares

Azure Files is excited to announce the Unlimited public preview of Metadata Caching for the premium SMB/REST file share tier.  Unlimited ...

1 day ago

Dominate your industry and boost performance using Azure AI tools and skilling

As AI technologies continue to rapidly evolve, developers have the exciting opportunity to stay ahead by continually learning and adapting. Wi...

2 days ago

Azure DevOps – EPICS vs FEATURES vs USER STORIES vs Tasks vs Bugs

Today, we’re diving into Epics, Features, User Stories, Tasks and Bugs and the main differences between them. You will learn when to use...

2 days ago

Discover the New Azure Cosmos DB Samples Gallery!

We are thrilled to introduce the Azure Cosmos DB Samples Gallery —your ultimate destination for top-tier Azure Cosmos DB samples, technical gu...

2 days ago
Stay up to date with latest Microsoft Dynamics 365 and Power Platform news!
* Yes, I agree to the privacy policy