Skip to main content
AI
  • Get started with AI

    • Red Hat AI

      Accelerate the development and deployment of enterprise AI solutions.

    • AI learning hub

      Explore learning materials and tools, organized by task.

    • AI interactive demos

      Click through scenarios with Red Hat AI, including training LLMs and more.

    • AI/ML learning paths

      Expand your Red Hat OpenShift AI knowledge using these learning resources.

    • AI quickstarts

      Focused AI use cases designed for fast deployment on Red Hat AI platforms.

    • No-cost AI training

      Foundational Red Hat AI training.

  • Featured resources

    • Red Hat OpenShift AI
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

Red Hat AI Factory with NVIDIA

Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.

Learn
  • Self-guided

    • Documentation

      Find answers, get step-by-step guidance, and learn how to use Red Hat products.

    • Learning paths

      Explore curated walkthroughs for common development tasks.

    • Guided learning

      Receive custom learning paths powered by our AI assistant.

    • See all learning
  • Hands-on

    • Developer Sandbox

      Spin up Red Hat's products and technologies without setup or configuration.

    • Interactive labs

      Learn by doing in these hands-on, browser-based experiences.

    • Interactive demos

      Click through product features in these guided tours.

  • Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics
  • Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
Build
  • Get started

    • Red Hat build of Podman Desktop

      A downloadable, local development hub to experiment with our products and builds.

    • Developer Sandbox

      Spin up Red Hat's products and technologies without setup or configuration.

  • Download products

    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products
  • Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset
  • References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
Community
  • Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions
  • Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github
  • Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

Join the Red Hat Developer program

Download Red Hat products and project builds, access support documentation, learning content, and more.

ConsoleDocsSupport Search
New For you

Recommended

We'll recommend resources you may like as you browse. Try these suggestions for now.

  • Product downloads
  • Cheat sheets
  • Red Hat Developer learning portal
  • Developer blog
  • E-books
  • Developer Sandbox
Log in

Get more with a Red Hat Developer account

  • Product downloads
  • Console access
  • Event registration
  • Training & trials
Explore more account benefitsLog in or register

A subscription may be required for some services.

Contact us

How to easily deploy JBoss EAP on Azure

August 17, 2022
Harsha Cherukuri
Related topics:
Automation
Related products:
Red Hat Enterprise LinuxRed Hat JBoss Enterprise Application Platform

    This article demonstrates how to deploy Red Hat JBoss Enterprise Application Platform (JBoss EAP) on Microsoft Azure using Ansible automation. Currently, Red Hat has a Microsoft Azure Marketplace offering of JBoss EAP, but it's available only through the Bring-Your-Own-Subscription (BYOS) model, which is relatively complex. This article creates Azure resources using Ansible Collections for Azure and then deploys JBoss EAP using the WildFly service provided by the Ansible Middleware project.

    Deploy JBoss EAP in 6 easy steps

    We will use azure-eap-demo as the sample application for this article. Using this application, we will automate and deploy JBoss EAP instances on Azure virtual machines running Red Hat Enterprise Linux.

    Step 1.  Prerequisites setup

    To run the sample application, please put the following requirements in place:

    • An Azure account with an active subscription. If you do not have an Azure subscription, create one for free.
    • JBoss EAP: You need a Red Hat account with a Red Hat Subscription Management entitlement for JBoss EAP. This entitlement allows you to download a version of JBoss EAP tested and certified by Red Hat. If you do not have a JBoss EAP entitlement, sign up for a free developer subscription:  Red Hat Developer Subscription for Individuals. Once registered, you can find the necessary credentials (pool IDs) at the Red Hat customer portal.
    • The following software on the controller host or local machine:
      • Ansible (version 2.9 or greater)
      • Python (version 3.9 or greater)
      • Python3 netaddr (obtained using dnf or pip)
      • The Azure command-line interface (CLI)
      • Download the azure-eap-demo application to your local machine.

    Step 2.  Install WildFly and other components

    After you unpack the azure-eap-demo application, change into the repository's top-level directory, and run the following command:

    $ ansible-galaxy collection install -r requirements.yml

    We are using a dynamic inventory provided by Azure. Once the instances are created, you can view the inventory with the following command:

    $ ansible-inventory -i inventory/myazure_rm.yml --graph

    Step 3.  Create credentials for Red Hat portal access

    You need to provide credentials in the playbook so that it can download software from the Red Hat customer portal. Specify your Red Hat account name in the rhn_username variable and your password in the rhn_password variable.

    In addition, you have to specify the Red Hat Subscription Management entitlement for JBoss EAP in the jboss_eap_rhn_id variable. This variable allows you to specify which version of JBoss EAP (supported by Red Hat) you would like to install. Alternatively, you can just download and install the JBoss EAP ZIP file from the Red Hat customer portal.

    All these variables can be stored in a YAML file, whose name you specify in a section in the Ansible playbook named vars_files.

    Step 4.  Run the Ansible playbook

    Now run the Ansible playbook in create-demo-setup.yml which creates resources on Azure and deploys JBoss EAP:

    ​​​​​​​$ ansible-playbook -e @rhn-creds.yml -i inventory/myazure_rm.yml -e
    "ansible_ssh_user=rheluser ansible_ssh_private_key_file='provide_your_ssh_private_key'
    hosts_group_name=eap wildfly_version=7.4 override_install_name=jboss-eap"
    create-demo-setup.yml
    

    As part of the playbook execution, the azure-eap-demo repository is cloned. Its create-demo-setup.yml file contains:

    - name: Create Azure VM
      hosts: localhost
      gather_facts: false
      connection: local
      vars:
       repo_url: "https://github.com/ansible-middleware/wildfly-cluster-demo.git"
       branch: main
      tasks:
       - name: Git checkout
         ansible.builtin.git:
           repo: "{{ repo_url }}"
           dest: "{{ playbook_dir }}/wildfly-cluster-demo"
           version: "{{ branch }}"
           single_branch: yes
           clone: yes
           update: yes
    
       - name: Create demo resources on azure.
         include_role:
           name: 'azure'
         vars:
           ssh_key_path: "{{ ssh_key | default(lookup('env', 'HOME') + '/.ssh/id_rsa.pub')}}"
    
       - meta: refresh_inventory
       - pause:
           minutes: 1
    
    - name: Run wildfly-cluster-demo
      import_playbook: wildfly-cluster-demo/playbook.yml

    This playbook creates the Azure resources the application needs, including a resource group, virtual networks, subnets, security groups, network interfaces, three virtual machines running Red Hat Enterprise Linux, and public IP addresses for the virtual machines.

    All the default parameters for the Azure cloud instances are within the installed package: roles/azure/defaults/main.yml ​​​​​​.

    Finally, the playbook deploys the WildFly cluster demo. Refer to the article Automate and deploy a JBoss EAP cluster with Ansible to learn more about how to use WildFly.

    Step 5.  Verify deployment of the JBoss EAP cluster and application

    Once the playbook completes successfully, you can verify the JBoss EAP cluster by logging into the Azure portal. Here, you will find all the resources created to support the JBoss EAP cluster. Log in or SSH into any of the virtual machines created and confirm that the WildFly service is running and accessible. Alternatively, you can run the validate.yml playbook provided in the wildfly-cluster-demo application to validate the configuration.

    Step 6.  Clean up Azure resources

    To clean up all the resources created on Azure, run the clean-demo-resources.yml playbook:

    $ ansible-playbook clean-demo-resources.yml

    The contents of clean-demo-resources.yml are as follows:

    - name: Create Azure VM
      hosts: localhost
      connection: local
      tasks:
       - name: Create VM's on azure.
         include_role:
           name: 'azure'
         vars:
           action: destroy

    The destroy action runs the roles/azure/tasks/destroy.yml file, which contains:

    ---
    - name: Remove a VM and all resources that were autocreated
      azure_rm_virtualmachine:
       resource_group: "{{ item.resourcegroup_name }}"
       name: "{{ item.name }}"
       remove_on_absent: all_autocreated
       state: absent
      loop: "{{ vm }}"
    
    - name: Delete a resource group including resources it contains
      azure_rm_resourcegroup:
       name: "{{ item.name }}"
       force_delete_nonempty: yes
       state: absent
      loop: "{{ resource_groups }}"

    The playbook removes all the virtual machines and deletes all the resources under the eap-cluster resource group.

    Ansible simplifies deployment on Azure

    In this article, we demonstrated a step-by-step process to create resources using Ansible on Microsoft Azure and deploy a JBoss EAP cluster using tooling from the Ansible Middleware project. Check out the other collections and demos within the ansible-middleware GitHub organization and the Ansible Middleware website.

    Last updated: November 5, 2025

    Related Posts

    • Load balancing Red Hat JBoss Enterprise Application Platform subclusters with mod_cluster

    • Hello World for JBoss EAP Runtime via CodeReady Studio

    • Customizing an OpenShift Ansible Playbook Bundle

    • WildFly server configuration with Ansible collection for JCliff, Part 1

    Recent Posts

    • A day in the life of an NVIDIA H100 on Red Hat OpenShift 5

    • Migrate BuildConfigs to builds for Red Hat OpenShift with one plug-in install

    • Run Red Hat Enterprise Linux CoreOS on NVIDIA BlueField DPUs

    • Agent harness engineering: Separating model capabilities from enforcement

    • What's new for developers in Red Hat Enterprise Linux 10.3 and 9.9

    What’s up next?

    Red Hat Insights API

    Find out how to get actionable intelligence using Red Hat Lightspeed APIs so you can identify and address operational and vulnerability risks in your Red Hat Enterprise Linux environments before an issue results in downtime.

    Get the cheat sheet
    Red Hat Developers logo

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    Red Hat Developer

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility
    Ask AI