Red Hat AMQ 6
As of February 2025, Red Hat is no longer supporting Red Hat AMQ 6. If you are using AMQ 6, please upgrade: Migrating to AMQ 7.Este conteúdo não está disponível no idioma selecionado.
2.3. Update a Profile
Atomic container upgrades Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
Normally, when you edit a profile that is already deployed in a container, the modification takes effect immediately. This is because the Fabric Agent in the affected container (or containers) actively monitors the fabric registry in real time.
In practice, however, immediate propagation of profile modifications is often undesirable. In a production system, you typically want to roll out changes incrementally: for example, initially trying out the change on just one container to check for problems, before you make changes globally to all containers. Moreover, sometimes several edits must be made together to reconfigure an application in a consistent way.
Profile versioning Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
For quality assurance and consistency, it is typically best to modify profiles atomically, where several modifications are applied simultaneously. To support atomic updates, fabric implements profile versioning. Initially, the container points at version 1.0 of a profile. When you create a new profile version (for example, version 1.1), the changes are invisible to the container until you upgrade it. After you are finished editing the new profile, you can apply all of the modifications simultaneously by upgrading the container to use the new version 1.1 of the profile.
Upgrade to a new profile Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
For example, to modify the
quickstarts-beginner-camel.log profile, when it is deployed and running in a container, follow the recommended procedure:
- Create a new version, 1.1, to hold the pending changes by entering this console command:
JBossFuse:karaf@root> fabric:version-create Created version: 1.1 as copy of: 1.0
JBossFuse:karaf@root> fabric:version-create Created version: 1.1 as copy of: 1.0Copy to Clipboard Copied! Toggle word wrap Toggle overflow The new version is initialised with a copy of all of the profiles from version 1.0. - Use the
fabric:profile-editcommand to change the message that is written to the container log by the Camel route. Enter the followingprofile-editcommand to edit thecamel.xmlresource:JBossFuse:karaf@root> fabric:profile-edit --resource camel.xml quickstarts-beginner-camel.log 1.1
JBossFuse:karaf@root> fabric:profile-edit --resource camel.xml quickstarts-beginner-camel.log 1.1Copy to Clipboard Copied! Toggle word wrap Toggle overflow This opens the built-in text editor for editing profile resources (see Appendix A, Editing Profiles with the Built-In Text Editor).Remember to specify version1.1to thefabric:profile-editcommand, so that the modifications are applied to version 1.1 of thequickstarts-beginner-camel.logprofile.When you are finished editing, type Ctrl-S to save your changes and then type Ctrl-X to quit the text editor and get back to the console prompt. - Upgrade the
childcontainer to version1.1by entering this console command:JBossFuse:karaf@root> fabric:container-upgrade 1.1 child
JBossFuse:karaf@root> fabric:container-upgrade 1.1 childCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Roll back to an old profile Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
You can easily roll back to the old version of the
quickstarts-beginner-camel.log profile, using the fabric:container-rollback command like this:
JBossFuse:karaf@root> fabric:container-rollback 1.0 child
JBossFuse:karaf@root> fabric:container-rollback 1.0 child