0 Replies Latest reply on Sep 22, 2016 3:51 PM by nvoskresenskiy

    How to correctly manage feature configuration deployment?


      I am trying to evaluate JBoss Fuse as an integration platform, and I have the following question regarding deployment.


      I am trying to set up a fabric and use profiles, more specifically feature repositories for camel/blueprint component deployment.

      I am having the following issue with externalizing the component configuration: when i update the snapshot of the configuration file artifact, the configuration changes are not picked up by the container.


      Moreover, when i completely remove the profile from the container, the PID config file stays on the server in etc/ folder.


      Also there is an additional issue during deployment where the camel bundle gets activated before the config pid file is loaded, resulting in exception in aries blueprint, and i have to additionally refresh the osgi bundle manually.


      Here is how the feature repository file looks like:

      <?xml version="1.0" encoding="UTF-8"?>
      <features name="fuse-poc">
          <feature name="fuse-poc-common" version="${project.version}">
          <feature name="fuse-poc-camel" version="${project.version}">
              <config name="com.myorg.fuse.poc.camel">
          <feature name="fuse-poc-activemq" version="${project.version}">
              <configfile finalname="etc/com.myorg.fuse.poc.jms.cfg">

      The projects themselves are simple camel archetype projects with one having a basic route with logging and one with route using activemq and cm:property-placeholder in blueprint.xml


      Here is the corresponding build section in maven:


      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <name>FUSE PoC Feature Repository</name>

      Here are the commands i deploy the feature


      fabric:version-create 1.1

      fabric:profile-create --parent jboss-fuse-full fuse-poc

      fabric:profile-edit --repository mvn:com.myorg.fuse/feature/1.0.0-SNAPSHOT/xml/features fuse-poc 1.1


      fabric:profile-edit --feature fuse-poc-camel fuse-poc 1.1

      fabric:profile-edit --feature fuse-poc-activemq fuse-poc 1.1


      fabric:container-upgrade 1.1 root

      fabric:container-add-profile root fuse-poc


      After i manually do osgi:refresh <bundle id> the bundle it starts fine.


      fabric:container-remove-profile root fuse-poc


      All the config pid entries stay in the config, and all osgi bundles are also staying installed. How do i correctly undeploy artifacts so that the container is clean and an updated version of the same artifact can be deployed without side effects?


      I suspect i am doing something conceptually wrong, because ultimately the issue above leads to the following problem: if i add a property to either the <config> element in features, or the .cfg file and install the project using maven again, and then do container-remove-profile, profile-refresh, and container-add-profile, the config does not change at all. It can only be redeployed correctly if i manually do the config:delete command on my pid in the console.