2 Replies Latest reply on Sep 15, 2014 1:37 PM by pcootey

    Camel Endpoint Discovery : fabric:ClusterID not found even after installing feature

    pcootey

      I have a glassfish endpoint with a rest interface.  We want to access this through the ESB.  It looks like I can use fabric:ClusterID:http://myrestendpoint/myreststuff so that I can route to my service through the ESB.  I believe this is Camel endpoint discovery. https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/6.1/html-single/Fabric_Guide/index.html.  I can't get the command.

       

      First Question: Is Camel Endpoint Discovery the right way to go?

       

      Steps I took:

      1. When I run the command from my console I get "Command not found: fabric:ClusterID:http://myrestendpoint". 
      2. Further investigation in documentation indicates I need to install fabric-camel https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/6.1/html/Apache_Camel_Component_Reference/files/Fabric.html
      3. I went ahead and installed the feature, that didn't work, "Error executing command: The container is managed by fabric, please use fabric:profile-edit --features fabric-camel/0.0.0 target-profile instead. See fabric:profile  --help for more information." 
      4. Then I tried the installing on the profile associated with root. jboss-fuse-full.  That installed the feature but still no command.
      
      JBossFuse:karaf@root> features:list | grep fabric-camel
      [uninstalled] [1.0.0.redhat-379       ] fabric-camel-cxf                        fabric-camel-cxf-1.0.0.redhat-379
      [installed  ] [1.0.0.redhat-379       ] fabric-camel                            fabric-1.0.0.redhat-379
      [uninstalled] [1.0.0.redhat-379       ] fabric-camel-autotest                   fabric-1.0.0.redhat-379
      [uninstalled] [6.1.0.redhat-379       ] mq-fabric-camel                         fabric-1.0.0.redhat-379
      
      

       

      I have to be missing some prerequisite.  The container: root is associated with the JBoss/Fuse profile 'full' and yet no ClusterID command.

       

      My prompt looks like

      JBossFuse:karaf@root>

       

      I saw that I could use the Console Manager to add the profile, So here it is.  I am still unable to user the command.  I thought the container list could help trouble shoot/shed light on what I missed.

       

      JBossFuse:karaf@root> fabric:container-list

      [id]                           [version] [connected] [profiles]                                         [provision status]

      EAPrototype-2                  1.0       true        fabric, fabric-ensemble-0001-2                     success

      EAPrototype-3                  1.0       true        fabric, fabric-ensemble-0001-3                     success

      FabricContainer-1              1.0       true        fabric, feature-camel                              success

      FabricContainer-2              1.0       false       fabric                                             success

      root*                          1.0       true        fabric, fabric-ensemble-0000-1, jboss-fuse-full, fabric-ensemble-0001-1, feature-camel success

       

      -

       

      Something I noticed, no camel icon for root in the Management Console.

        • 1. Re: Camel Endpoint Discovery : fabric:ClusterID not found even after installing feature
          davsclaus

          fabric endpoint is not a command in the shell. You can read more about it here

          fabric: endpoint | Fabric8 Documentation

           

          You use it from a Camel application. There is a little example here:

          fabric8/fabric/fabric8-karaf/src/main/resources/distro/fabric/import/fabric/profiles/example/camel/cluster at master · f…

           

          You can then see the cluster's using the cluster-list command, where a cluster with your logical group name should appear in the list.

          • 2. Re: Camel Endpoint Discovery : fabric:ClusterID not found even after installing feature
            pcootey

            Thank you for the quick response.  Very helpful.  I am proceeding to work through the exercises in hopes that it will help me with my objective.  I knew I had to be on the wrong track because things were not lining up.

             

            I appreciate your patience as I learn the answer to my first question.  The question came about in an attempt to achieving an objective. The objective is "Integrate an existing Glassfish web services to the ESB so that an ESB client can access that Glassfish web service through the ESB to benefit from discovery and load balancing - without any development on the Glassfish web service itself"  Is this possible, to create a route from an existing web service and publish that route on the ESB? If so, how might I proceed?

             

            It's possible the example will answer my question.  I will come back to update the thread once I work through it.

             

            I recently found this reference in the documentation:

            http://camel.apache.org/how-to-use-camel-as-a-http-proxy-between-a-client-and-server.html

             

            Progress Notes:

            At first I was set back on how I could get the profile into my JBoss Fuse instance.  I couldn't identify the example by its name from the Fabric8 repo reference below. I ended up not needing to. Claus' example is deployed with JBoss Fuse 6.1.0 into two different directories in "/fabric/profiles/example/camel" rather than in "/fabric/profiles/example/camel/cluster".  The sub directories are named differently as well.

             

            If you do want to import/copy/modify a profile I recommend this link to learn about what role git plays in JBoss Fuse. Git | Fabric8 Documentation It's important to understand this if you want to pull in profiles from different sources or copy existing examples to modify them for your own purposes.  You actually check in the profile to a local repo running in JBoss Fuse to make it available to deploy to a container.  Fuse lives up to its name.