Skip to main content
Redhat Developers  Logo
  • Products

    Featured

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat OpenShift AI
      Red Hat OpenShift AI
    • Red Hat Enterprise Linux AI
      Linux icon inside of a brain
    • Image mode for Red Hat Enterprise Linux
      RHEL image mode
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • Red Hat Developer Hub
      Developer Hub
    • View All Red Hat Products
    • Linux

      • Red Hat Enterprise Linux
      • Image mode for Red Hat Enterprise Linux
      • Red Hat Universal Base Images (UBI)
    • Java runtimes & frameworks

      • JBoss Enterprise Application Platform
      • Red Hat build of OpenJDK
    • Kubernetes

      • Red Hat OpenShift
      • Microsoft Azure Red Hat OpenShift
      • Red Hat OpenShift Virtualization
      • Red Hat OpenShift Lightspeed
    • Integration & App Connectivity

      • Red Hat Build of Apache Camel
      • Red Hat Service Interconnect
      • Red Hat Connectivity Link
    • AI/ML

      • Red Hat OpenShift AI
      • Red Hat Enterprise Linux AI
    • Automation

      • Red Hat Ansible Automation Platform
      • Red Hat Ansible Lightspeed
    • Developer tools

      • Red Hat Trusted Software Supply Chain
      • Podman Desktop
      • Red Hat OpenShift Dev Spaces
    • Developer Sandbox

      Developer Sandbox
      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Secure Development & Architectures

      • Security
      • Secure coding
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
      • View All Technologies
    • Start exploring in the Developer Sandbox for free

      sandbox graphic
      Try Red Hat's products and technologies without setup or configuration.
    • Try at no cost
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • Java
      Java icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • API Catalog
    • Product Documentation
    • Legacy Documentation
    • Red Hat Learning

      Learning image
      Boost your technical skills to expert-level with the help of interactive lessons offered by various Red Hat Learning programs.
    • Explore Red Hat Learning
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

How to use JBoss EAP 8.0's new provisioning system

March 5, 2024
Philip Hayes
Related topics:
DatabasesJava
Related products:
Red Hat JBoss Enterprise Application Platform

Share:

    With the recent release of Red Hat JBoss Enterprise Application Platform (JBoss EAP) 8.0, Red Hat introduced a new set of provisioning tools including a new installation manager (for bare metal and virtual machine installations) and a new Maven plug-in (for Red Hat OpenShift builds).

    For OpenShift, the JBoss EAP Maven plug-in allows users to specify what they want in their server footprint and configuration, for example to specify a feature pack to include database drivers. The JBoss EAP Maven plug-in uses Galleon trimming capability to reduce the size and memory footprint of the server; it also supports the execution of JBoss EAP CLI script files to customize server configuration. The JBoss EAP Maven plug-in is discussed in the previous article How JBoss EAP 8.0 makes deployment on OpenShift easier.

    For bare metal or virtual machine installations the new installation manager allows users to install JBoss EAP 8.0, apply patches, revert patches, and apply feature packs. 

    Advantages to operations teams

    In addition to making it easier for operations teams to install and maintain JBoss EAP instances, the installation manager introduces similar concepts across deployment targets providing a more consistent experience across bare metal, virtual machine, and OpenShift. These concepts include the following.

    Galleon

    Galleon is a provisioning tool designed to create and maintain software distributions that consist of one or more products (or components). By utilizing Galleon layers, JBoss EAP can be provisioned with the minimal set of frameworks required to support an application.

    Feature-packs

    Feature-pack represents a released unit of software (project, product, component, etc.) that can be installed or uninstalled using Galleon tools. For example, for applications requiring database connectivity, the org.jboss.eap:eap-datasources-galleon-pack adds drivers for:

    • Microsoft SQL Server
    • Oracle
    • PostgreSQL

    Layers

    A layer is meant to represent a certain configuration flavor that can be used on its own or in combination with other layers to produce the final configuration.

    The list of supported layers for JBoss EAP 8.0 can be found here.

    Profiles

    The profiles contain complete provisioning configurations required to install a server. Current available profiles are: eap-8.0.

    Using the new installation manager to install and configure JBoss EAP 8.0

    We're going to use the new installation manager to install JBoss EAP 8.0 to support a simple contact management application. The sample application we're going to deploy to JBoss EAP 8.0 requires a connection to a PostgreSQL database, so we going to use the installation manager to install the org.jboss.eap:eap-datasources-galleon-pack to provide PostgreSQL drivers via the postgresql-datasource layer.

    First, we're going to use Podman to start an instance of PostgreSQL.

    podman run --name eapdb \
    
    -e POSTGRES_USER=postgresUSer \
    
    -e POSTGRES_PASSWORD=postgresPW \
    
    -e POSTGRES_DB=contacts \
    
    -p 5432:5432 postgres

    We're now going to download the new JBoss EAP installation manager from this link.

    Unzip the installation manager into a folder, e.g., ~/jboss-eap-8-installer.

    Create a folder for JBoss EAP 8.0 e.g., ~/jboss-eap-8, this is where we're going to install JBoss EAP 8.0.

    Set the JBOSS_HOME environment variable.

    export JBOSS_HOME=~/jboss-eap-8

    Install the JBoss EAP 8.0 base server using the installation manager.  Note we're using the eap-8.0 profile.

    ./bin/jboss-eap-installation-manager.sh install --profile=eap-8.0 --dir=$JBOSS_HOME

    You will be prompted to accept the End User license agreement for Red Hat JBoss Middleware; enter "Y" if you accept to proceed.

    The artifacts will be downloaded from Maven into the destination folder.

    When the installation is complete, you can run JBoss EAP 8.0 by running $JBOSS_HOME/bin/standalone.sh

    Stop the running instance of JBoss EAP 8.0 with "CTRL+C".

    Add PostgreSQL database connectivity

    As we mentioned previously we will need to provide PostgreSQL database connectivity so we're now going to add the postgresql-datasource from the datasources feature pack.

    First we need to set the version of the PostgreSQL driver we're going to install.

    export POSTGRESQL_DRIVER_VERSION=42.6.0.redhat-00001

    We can now use the JBoss EAP installation manager to download the org.jboss.eap:eap-datasources-galleon-pack feature pack and deploy the postgresql-datasouce layer.

    ./bin/jboss-eap-installation-manager.sh feature-pack add --fpl=org.jboss.eap:eap-datasources-galleon-pack --layers=postgresql-datasource --dir=$JBOSS_HOME 

    You will be prompted to "Continue adding the feature pack?"; enter "Y" to continue.

    Once the feature pack is downloaded and the layer deployed, you should see messages similar to:

    Feature-packs resolved.                                                          
    
    Packages installed.               
    
    Downloaded artifacts.                                             
    
    JBoss modules installed.               
    
    Configurations generated.                                                
    
    JBoss examples installed.                                                   
    
    Operation completed in 19.18 seconds.

    Configure the PostgreSQL connection

    Before we can start JBoss EAP 8.0, we will need to set some environment variables to configure the connection to the PostgreSQL database.

    export POSTGRESQL_USER=postgresUSer && export POSTGRESQL_PASSWORD=postgresPW && export POSTGRESQL_DATASOURCE=Contacts && export POSTGRESQL_URL=jdbc:postgresql://localhost:5432/contacts

    We can now start JBoss EAP 8.0 with:

    $JBOSS_HOME/bin/standalone.sh

    JBoss EAP 8.0 should start successfully, and you will notice the bound data source: [java:jboss/datasources/contacts]

    Deploy the application

    We can now deploy our application.

    Check out the code from https://github.com/RedHat-Middleware-Workshops/eap8-rhd-learning-path.git.

    From the folder containing the sample application code, build the application with the command:

    mvn clean package

    Then deploy the application to our instance of JBoss EAP 8.0, first connect via the JBoss CLI.

    $JBOSS_HOME/jboss-cli.sh --connect
    

    Then deploy our application with:

    deploy ./tartget/ROOT.war

    You should now be able to access the application by opening the url http://localhost:8080 in your browser as shown in Figure 1 below.

    Contacts application running on JBoss EAP 8.0
    Figure 1: Contacts application running on JBoss EAP 8.0

    Success! We've installed JBoss EAP 8.0 and added the PostgreSQL drivers using the new JBoss EAP installation manager.

    Summary

    In this article we've taken a look at the new installation manager for JBoss EAP 8.0, using the tool to install a fresh installation of JBoss EAP 8.0 and then applied the org.jboss.eap:eap-datasources-galleon-pack to add support for PostgreSQL database connectivity.

    For more information on using the installation manager, check out the official documentation.

    Related Posts

    • A fully automated setup of a JBoss EAP cluster using Ansible

    • How to migrate a complex JBoss EAP application to OpenShift

    • Automate message queue deployment on JBoss EAP

    • How JBoss EAP 8.0 makes deployment on OpenShift easier

    • The road to JBoss EAP 8

    • How to migrate apps from JBoss EAP 7.x to JBoss EAP 8.0

    Recent Posts

    • How to run a fraud detection AI model on RHEL CVMs

    • How we use software provenance at Red Hat

    • Alternatives to creating bootc images from scratch

    • How to update OpenStack Services on OpenShift

    • How to integrate vLLM inference into your macOS and iOS apps

    What’s up next?

    java-nutshell-cover_Share

    Java in a Nutshell is the reference guide every Java developer needs at their fingertips, with examples that show how to take advantage of modern Java APIs and development best practices.

    Get the e-book
    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Products

    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform

    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

    Red Hat legal and privacy links

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

    Report a website issue