33.8. Patching JBoss Enterprise Application Platform 7

The JBoss ON UI (or CLI) can apply patches to JBoss Enterprise Application Platform instances (version 6.2 and above) or any other layered product based on it managed by JBoss ON and the JBoss ON JBoss Enterprise Application Platform 7 plug-in. As a notable exception, JBoss ON itself cannot be patched using this mechanism. Patches are updates available for specific minor versions of a product (e.g. JBoss Enterprise Application Platform 6.3) and can be found as individual (one-off) or cumulative updates. For more information about JBoss Enterprise Application Platform patches, see the JBoss Enterprise Application Platform Installation Guide.

33.8.1. Patching Operations

JBoss ON applies JBoss Enterprise Application Platform patches through its bundle subsystem using the familiar deploy, revert and purge operations. Deploying allows a user to apply a patch (one-off or cumulative) on a group of JBoss Enterprise Application Platform 7 instances. Reverting a patch allows a user to rollback a patch from a group of JBoss Enterprise Application Platform 7 servers. Purging a destination will rollback all patches applied to the group of JBoss Enterprise Application Platform instances through that destination.
Note
Ensure the Agent has read and write permissions for: $EAP/.installation, $EAP/.installation/.rhq (where agent stores its metadata), and to the EAP directory in general. This allows JON Agents to patch the EAP server.

33.8.1.1. Bundles and Destinations

JBoss Enterprise Application Platform 7 patches are handled using the bundle subsystem of JBoss ON which is described in Section 27.1, “An Introduction to Provisioning Content Bundles”.
Destinations are associations of resources that are intended to be targets of patch operations. Destinations are initially created by specifying a Resource Group when initial deploying patch. Subsequent patch deployments to the same destination must be from the Destination section and NOT as a new deployment.
Important
To prevent unexpected behavior, only a single JBoss ON destination is allowed to work with JBoss Enterprise Application Platform patches on any given JBoss Enterprise Application Platform instance at any given time. If there are multiple destinations for distributing patches using JBoss ON, please ensure they do not overlap (i.e. no JBoss Enterprise Application Platform server is part of more than one resource group which those destinations target). If an attempt is made to deploy a patch to some destination, and it is detected that some patches were already deployed using a different destination, the patch deployment will be aborted on that overlapping JBoss Enterprise Application Platform server.
Purging a destination will remove the association of those members of the resource group from that destination (i.e. after a destination has been purged, another destination may be used to deliver patches to the servers that had been previously handled by the purged destination).
To forcibly change the association of a destination with JBoss Enterprise Application Platform instances (including cases where a destination was deleted on the JBoss ON server but not purged prior to the delete), the takeOver property can be set to true during bundle deployment when using a new destination. This will force JBoss ON to forget the association with the old destination on all servers that the new destination targets.

33.8.1.2. Performing a Patch Deploy

A patch may be deployed to a new or existing destination.
Important
For JBoss ON to correctly track patch deployments and properly perform patching operations, please ensure that subsequent patches intended for existing destination are applied according to the Section 33.8.1.2.3, “Performing a Patch Deploy to an Existing Destination” section and not as a new destination.
Note
JBoss ON can apply a patch to both running and stopped instances of JBoss Enterprise Application Platform. If the instance is running, the patch will be installed but will not be in effect until the instance has been restarted. For stopped instances, the patch will be in effect at the next instance startup. A user may specify whether to automatically restart the servers after patch deployment by using the restart property during the patch deployment (this defaults to true).
33.8.1.2.1. Creating a Bundle with a Patch
  1. Click the Bundles tab.
  2. Launch the Bundle Creation Wizard by clicking the New button in the Bundle section.
  3. Upload the desired patch.
  4. Update any settings and click on the Next button.
  5. Click the Next button.
  6. Click the Finish button.
33.8.1.2.2. Performing a Patch Deploy to a New Destination
  1. Click the Bundles tab.
  2. Click on the EAP bundle.
  3. Click Deploy button, to launch the Deploy Bundle Wizard
    1. Fill in the destination information and click Next.
    2. Select Deployment Bundle Version and click Next.
    3. Select Deployment Configuration and click Next.
      Note
      • The restart option allows users to put the patch into effect immediately by restarting the JBoss Enterprise Application Platform instance. If restart is set to no, then the a patch will not be in effect until the instance's next restart.
      • To set the new destination provided as the default location for the patch deployments to the servers in the resource group, set the takeOver option to true.
    4. Provide the Deployment Information and click Next.
    5. Click Finish to deploy the bundle to the destination.
33.8.1.2.3. Performing a Patch Deploy to an Existing Destination
  1. Click the Bundles tab.
  2. Click on the EAP bundle.
  3. Click on the Destinations subtab.
  4. Click on the desired destination where the bundle will be deployed.
  5. Click on the Deploy button.
  6. Select the bundle version to deploy and click Next.
  7. Select Deployment Configuration and click Next.
    Note
    The restart option allows users to put the patch into effect immediately by restarting the JBoss Enterprise Application Platform instance. If restart is set to no, then the a patch will not be in effect until the instance's next restart.
  8. Provide any needed deployment information and click Next.
  9. Click Finish to deploy the bundle to the destination.
Note
There can be more than a single one-off patch installed in the JBoss Enterprise Application Platform instance at a given time but only one cumulative patch. This is not reflected in the JBoss ON UI since it only understands the last deployment as live. Despite that fact, deployment and rollback logic is the same in JBoss Enterprise Application Platform and JBoss ON. Both allow only the latest patch to be rolled back (reverted in JBoss ON) which restores the previous state of patch deployments. To see actual set of currently applied patches, please consult the Active Patches trait of the JBoss Enterprise Application Platform 7 resource in JBoss ON.

33.8.1.3. Performing a Patch Revert

Reverting a patch allows a user to rollback a patch applied by JBoss ON. JBoss ON tracks all patches it applies to a JBoss Enterprise Application Platform instance and may only revert the patches it applied. Additionally, JBoss ON may only revert as far back as the first patch it applied meaning JBoss ON must apply at least two separate patches before it can perform a revert. To remove all patches applied by JBoss ON see Section 33.8.1.4, “Performing a Patch Purge”.
Important
JBoss ON has the ability to perform patching operations against JBoss Enterprise Application Platform cumulative patches, but JBoss ON treats a cumulative patch (and any previous patches contained within) as a single unit. As such, when performing a revert against a cumulative patch, JBoss ON will revert the entire cumulative patch. For example, a users deploys Cumulative Patch 01 to a JBoss Enterprise Application Platform instance, then applies Cumulative Patch 03 (which also contains Cumulative Patch 02) to that same JBoss Enterprise Application Platform instance. If the user wants to revert Cumulative Patch 03, they may only revert back to Cumulative Patch 01.
To perform a patch revert:
  1. Click on the Bundles tab.
  2. Click on the EAP bundle.
  3. Click on the Destinations tab in the Summary section.
  4. Choose the destination you want to revert.
  5. Click the Revert Button and click Yes.
  6. Click Next twice and click Finish.

33.8.1.4. Performing a Patch Purge

Purging allows a user to uninstall and delete all patches installed by JBoss ON on a JBoss Enterprise Application Platform instance or set of instances. A purge will bring the JBoss Enterprise Application Platform instance or set of instances back to the version number found before JBoss ON installed the first patch.
To perform a purge:
  1. Click on the Bundles tab.
  2. Click on the EAP bundle.
  3. Click on the Destinations tab in the Summary section.
  4. Choose the destination you want to purge.
  5. Click the Purge Button and click Yes.