19.4. Patching a Container in a Fabric
Is it necessary to patch the underlying container?
fabric:createcommand). Always read the patch
READMEfile to find out whether there are any special steps required to install a particular patch.
Using the management console
Using the command console
- Before you proceed to install the patch, make sure to read the text of the
READMEfile that comes with the patch, as there might be additional manual steps required to install a particular patch.
- 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.1ImportantIt is recommended that you upgrade only one or two containers to the patched profile version, to ensure that the patch does not introduce any new issues. When you are certain that the patch works as expected, upgrade the remaining containers in the fabric.
- 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)