이 콘텐츠는 선택한 언어로 제공되지 않습니다.
Chapter 15. Patching
15.1. Patching a Container in a Fabric 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
Abstract
In a fabric patches are applied to profiles and the patched version of the profile is applied to the container. The management console is the recommended tool for patching containers in a fabric. The fabric shell also has the commands needed to apply a patch and roll it out to running containers.
Overview 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
The bundles loaded by a container in a fabric are controlled by the container's Fabric Agent. The agent inspects the profiles applied to the container to determine what bundles to load, and the version of each bundle, and then loads the specified version of each bundle for the container.
A patch typically includes a new version of one or more bundles, so to apply the patch to a container in a fabric you need to update the profiles applied to it. This will cause the Fabric Agent to load the patched versions of the bundles.
The management console is the recommended tool for patching containers in a fabric. However, the command console's fabric shell also provides the commands needed to patch containers running in a fabric.
Procedure 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
Patching a container in a fabric involves:
- 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 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
The management console is the easiest and most verbose method of patching containers in a fabric. Its Patching tab uploads patches to a fabric's Maven repository and applies the patch to a specified profile version. You can then use the management console to roll the patch out to all of the containers in the fabric.
See chapter "Patching a Fabric" in "Management Console User Guide" for more information.
Using the command console 링크 복사링크가 클립보드에 복사되었습니다!
링크 복사링크가 클립보드에 복사되었습니다!
The Red Hat JBoss Fuse command console can also be used to patch containers running in a fabric. To patch a fabric container:
- Create a new version, using the
fabric:version-create
command:JBossFuse:karaf@root> fabric:version-create 1.1 Created version: 1.1 as copy of: 1.0
JBossFuse:karaf@root> fabric:version-create 1.1 Created version: 1.1 as copy of: 1.0
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ImportantThe version name must be a pure numeric string, such as1.1
,1.2
,2.1
, or2.2
. You cannot incorporate alphabetic characters in the version name (such as1.0.patch
). - Apply the patch to the new version, using the
fabric:patch-apply
command. For example, to apply theactivemq.zip
patch file to version1.1
:JBossFuse:karaf@root> fabric:patch-apply --version 1.1 file:///patches/activemq.zip
JBossFuse:karaf@root> fabric:patch-apply --version 1.1 file:///patches/activemq.zip
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Upgrade the container using the
fabric:container-upgrade
command, specifying which container you want to upgrade. For example, to upgrade theroot
container, enter the following command:JBossFuse:karaf@root> fabric:container-upgrade 1.1 root Upgraded container root from version 1.0 to 1.1
JBossFuse:karaf@root> fabric:container-upgrade 1.1 root Upgraded container root from version 1.0 to 1.1
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - You can check that the new patch profile has been created using the
fabric:profile-list
command, as follows:BossFuse:karaf@root> fabric:profile-list --version 1.1 | grep patch default 0 patch-activemq-patch patch-activemq-patch
BossFuse:karaf@root> fabric:profile-list --version 1.1 | grep patch default 0 patch-activemq-patch patch-activemq-patch
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Where 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 thefabric:version-set-default Version
command.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)
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)
Copy to Clipboard Copied! Toggle word wrap Toggle overflow