20.3. Patching a Container in a Fabric
- Getting a patch file.
- Customer Support sends you a patch.
- Customer Support sends you a link to download a patch.
- You, or your organization, generate a patch file for an internally created application.
- Uploading one or more patch files to the fabric's Maven repository.
- Applying the patch(es) to a profile version.This creates a new profile version that points to the new versions of the patched bundles and repositories.
- Migrate one or two containers to the patched profile version to ensure that the patch does not introduce any new issues.
- After you are certain that the patch works, migrate the remaining containers in the fabric to the patched version.
Using the management console
Using the command console
- Create a new version, using the
JBossFuse:karaf@root> fabric:version-create 1.1 Created version: 1.1 as copy of: 1.0ImportantThe version name must be a pure numeric string, such as
2.2. You cannot incorporate alphabetic characters in the version name (such as
- Apply the patch to the new version, using the
fabric:patch-applycommand. For example, to apply the
activemq.zippatch file to version
JBossFuse:karaf@root> fabric:patch-apply --version 1.1 file:///patches/activemq.zip
- Upgrade the container using the
fabric:container-upgradecommand, specifying which container you want to upgrade. For example, to upgrade the
rootcontainer, enter the following command:
JBossFuse:karaf@root> fabric:container-upgrade 1.1 root Upgraded container root from version 1.0 to 1.1
- You can check that the new patch profile has been created using the
fabric:profile-listcommand, as follows:
BossFuse:karaf@root> fabric:profile-list --version 1.1 | grep patch default 0 patch-activemq-patch patch-activemq-patchWhere we presume that the patch was applied to profile version 1.1.TipIf you want to avoid specifying the profile version (with
--version) every time you invoke a profile command, you can change the default profile version using the
fabric:version-set-default Versioncommand.You can also check whether specific JARs are included in the patch, for example:
JBossFuse:karaf@root> list | grep -i activemq [ 131] [Active ] [Created ] [ ] [ 50] activemq-osgi (5.9.0.redhat-61037X) [ 139] [Active ] [Created ] [ ] [ 50] activemq-karaf (5.9.0.redhat-61037X) [ 207] [Active ] [ ] [ ] [ 60] activemq-camel (5.9.0.redhat-61037X)