Chapter 4. Adding Feature Packs to existing JBoss EAP Servers using the jboss-eap-installation-manager.

You can use jboss-eap-installation-manager to install and update JBoss EAP. You can also install and update feature packs on your existing JBoss EAP servers using jboss-eap-installation-manager.

4.1. Prerequisites

  • You have an account on the Red Hat Customer Portal and are logged in.
  • You have reviewed the supported configurations for JBoss EAP 8.0.
  • You have installed a supported JDK.
  • You have downloaded the jboss-eap-installation-manager.

4.2. Adding Feature Packs to an existing JBoss EAP installation

You can install feature packs on existing JBoss EAP servers using jboss-eap-installation-manager.

Prerequisites

  • You have installed JBoss EAP 8.0.

Procedure

  1. Open your terminal emulator and navigate to the directory containing the downloaded jboss-eap-installation-manager.
  2. Define the channels, that provide the feature packs, you want your JBoss EAP server subscribed to:

    ./jboss-eap-installation-manager.sh channel add \
      --channel-name feature-pack-channel \
      --repositories https://fp.repo.org/maven \
      --manifest com.example:feature-pack
  3. Create and subscribe your JBoss EAP installation to a channel providing additional artifacts. For more information see Creating and subscribing your JBoss EAP installation to a channel providing additional artifacts.

Select layers and configuration of the installed Feature Pack

The feature-pack add command is used to select which feature pack layer(s) need to be installed and which configuration files should be modified.

  1. Provide the necessary layers for the installation.

    $ ./jboss-eap-installation-manager.sh feature-pack add \
      --fpl com.example:feature-pack \
      --layers layer-one,layer-two \
      --dir jboss-eap8
  2. Provide the necessary layers for the installation and choose the configuration file you want to modify.

    $ ./jboss-eap-installation-manager.sh feature-pack add \
      --fpl com.example:feature-pack \
      --layers layer-one,layer-two \
      --target-config standalone-ha.xml
      --dir jboss-eap8
    Note
    • You can modify the default feature pack configuration file by using the --target-config parameter. This parameter selects the configuration file in the standalone/configuration folder that will receive the changes.
    • If you have changed the chosen configuration file before, the updates won’t overwrite it. Instead, the changes will be saved in a new file named with a .glnew ending. You’ll need to handle and merge any conflicts yourself.
    • The feature pack can only modify standalone configuration files and not files in a managed domain.
    • The supported values for the --target-config parameter are the names of the configuration files provided by the base EAP8/XP5 servers. Additional feature packs should not provide additional configurations.

4.3. Adding feature packs to existing JBoss EAP servers

You can add additional feature packs when installing a JBoss EAP server with jboss-eap-installation-manager.

Prerequisites

  • You have an account on the Red Hat Customer Portal and are logged in.
  • You have reviewed the supported configurations for JBoss EAP 8.0.
  • You have installed a supported JDK.
  • You have downloaded the jboss-eap-installation-manager.

Procedure

  1. Open the terminal emulator and navigate to the directory containing jboss-eap-installation-manager.
  2. Create a provisioning.xml file and define the feature packs you want to install:

    <?xml version="1.0" ?>
    
    <installation xmlns="urn:jboss:galleon:provisioning:3.0">
        <feature-pack location="org.jboss.eap:wildfly-ee-galleon-pack:zip">
            <packages>
                <include name="docs.examples.configs"/>
            </packages>
        </feature-pack>
        <feature-pack location="<FEATURE_PACK_GROUP_ID>:<FEATURE_ARTIFACT_ID>:zip">
            <default-configs inherit="false"/>
            <packages inherit="false"/>
        </feature-pack>
        <config model="standalone" name="standalone.xml">
            <layers>
                <include name="<FEATURE_PACK_LAYER>"/>
            </layers>
        </config>
    </installation>
  3. Create a channels.yaml file, and define the channels you want JBoss EAP subscribed to.

      schemaVersion: "2.0.0"
      name: "eap-8.0"
      repositories:
        - id: "mrrc"
          url: "file:/Users/spyrkob/workspaces/set/prospero/prod-prospero/jboss-eap-8.0.0.GA-maven-repository/maven-repository"
      manifest:
        maven:
          groupId: "org.jboss.eap.channels"
          artifactId: "eap-8.0"
      ---
      schemaVersion: "2.0.0"
      name: "feature-pack-channel"
      repositories:
        - id: "feature-pack-repository"
          url: "https://repository.example.com/feature-pack"
      manifest:
        maven:
          groupId: "com.example.channels"
          artifactId: "feature-pack"
  4. Install feature packs using the --definition and --channel parameters:

    ./jboss-eap-installation-manager.sh install \
      --definition provisioning.xml \
        --channel channels.yaml \
        --dir jboss-eap8
    Installing galleon provisioning definition: provisioning.xml
    Using channels:
    # eap-8.0
      manifest: org.jboss.eap.channels:eap-8.0
      repositories:
        id: mrrc
        url: file:/tmp/jboss/jboss-eap-8.0.0.GA-maven-repository/maven-repository
    #feature-pack-channel
      manifest: com.example.channels:feature-pack
      repositories:
        id: feature-pack-repository
        url: https://repository.example.com/feature-pack
    
    ===============
    END USER LICENSE AGREEMENT RED HAT JBOSS® MIDDLEWARE™
    ===============
    [...]
    ===============
    
    
    Accept the agreement(s) [y/N]y
    
    Feature-packs resolved.
    Packages installed.
    Downloaded artifacts.
    JBoss modules installed.
    Configurations generated.
    JBoss examples installed.
    
    Server created in /tmp/jboss/jboss-eap8
    Operation completed in 16.30 seconds

4.4. Adding Feature Packs to JBoss EAP servers by using an offline repository

You can use the jboss-eap-installation-manager to add feature packs when installing a JBoss EAP from an offline repository.

Prerequisites

Note

Downloading the feature pack offline repository is an optional prerequisite because some feature packs are already included in the JBoss EAP 8.0 offline repository.

Procedure

  1. Open the terminal emulator and navigate to the directory containing jboss-eap-installation-manager.
  2. Install the required feature pack into JBoss EAP and specify the offline repositories by using --repositories parameter:

    $ ./jboss-eap-installation-manager.sh feature-pack add \
      --fpl com.example:feature-pack \
      --layers layer-one,layer-two \
      --repositories file:/path/to/eap8/offline_repo,file:/path/to/feature_pack/offline_repo
      --dir jboss-eap8

4.6. Creating and subscribing to channels when installing JBoss EAP to provide additional artifacts

Some feature packs require additional artifacts that are not supplied by Red Hat. You have to provide the required artifacts by defining custom channels. For example, the MyFaces feature pack requires the org.apache.myfaces.core:myfaces-impl and org.apache.myfaces.core:myfaces-api jar files. However, it is up to you to determine the precise versions of these jars.

Note

The following procedure describes how to create a channel that provides additional artifacts for the MyFaces feature pack.

Prerequisite

  • You have an account on the Red Hat Customer Portal and are logged in.
  • You have reviewed the supported configurations for JBoss EAP 8.0.
  • You have installed a supported JDK.
  • You have downloaded the jboss-eap-installation-manager.
  • Your JBoss EAP installation has a feature pack installed on it.

Procedure

  1. Open the terminal emulator and navigate to the directory containing jboss-eap-installation-manager.
  2. Create a manifest.yaml file:

    schemaVersion: 1.0.0
    name: MyFaces manifest file
    streams:
      - groupId: org.apache.myfaces.core
        artifactId: myfaces-impl
        version: 4.0.0
      - groupId: org.apache.myfaces.core
        artifactId: myfaces-api
        version: 4.0.0
  3. Deploy the manifest to a local repository:

    mvn deploy:deploy-file -Dfile=manifest.yaml \
      -DgroupId=com.example.channels -DartifactId=myfaces \
      -Dclassifier=manifest -Dpackaging=yaml -Dversion=1.0.0 \
      -Durl=file:/path/to/local/repository
  4. Subscribe your JBoss EAP server to the new channel:

    $ ./jboss-eap-installation-manager.sh channel add \
      --channel-name myfaces-channel \
      --repositories https://repo1.maven.org/maven2,file:/path/to/local/repository \
        --manifest com.example.channels:myfaces \
      --dir jboss-eap8