Hi Ignasi, Thanks for the reply.
*I'm not very familiar with the Rackspace specific apis, but why do you need to get the ip address of the node?* After looking through the api examples, I gathered I needed the ip so I could establish an ssh connection. There is a CloudServicePublish example that does this and I was trying to follow that example. *If you use the ComputeService, the "runScriptOnNode" methods only need the node id (does the node returned by the loadbalancer api have the same id than the one returned by the compute service?). Jclouds will take care of retrieving all information it needs.* Unfortunately No. The one returned by the load balancer api is of an integer value. The Compute Service runScriptOnNode methods require a String id. This is my whole problem. I have the nodes to iterate through from the Load Balancer, but not the NodeMetadata which contains the String id that the compute service needs. *You can also use the "runScriptOnNodesMatching" and provide a predicate. If you need to run a script on a set of nodes matching a certain criteria, this might be useful too.* I will look at this a bit more closely to see if there is some info I can gleen from the Load Balancer and Node data that I can pass to this predicate, but again these methods take a Predicate<NodeMetadata> as the filter. Thanks again, I really appreciate the response. Neil On Sat, Jan 25, 2014 at 4:36 AM, Ignasi Barrera <[email protected]>wrote: > Hi Neil, > > I'm not very familiar with the Rackspace specific apis, but why do you > need to get the ip address of the node? > > If you use the ComputeService, the "runScriptOnNode" methods only need the > node id (does the node returned by the loadbalancer api have the same id > than the one returned by the compute service?). Jclouds will take care of > retrieving all information it needs. > > You can also use the "runScriptOnNodesMatching" and provide a predicate. > If you need to run a script on a set of nodes matching a certain criteria, > this might be useful too. > > HTH! > > I. > El 25/01/2014 07:39, "Carlos Ospina" <[email protected]> escribió: > > Hello Neil. >> I believe the best way to do steps 3-6 is to use a Continuous integration >> server like Hudson or Jenkins. >> I do this very often and works like a charm. >> The Balancer tasks can also be automated with the CI server >> On Jan 24, 2014 8:55 PM, "Neil Corbet" <[email protected]> wrote: >> >>> Hello All, >>> >>> I am new to JClouds and I am hoping that maybe someone can help point me >>> in the right direction. >>> >>> I have a basic use case. I need to do the following: >>> >>> 1. Grab a Load Balancer >>> 2. Disable the nodes one by one to take them out of the load balancer. >>> 3. Shut down an app server ( tomcat ) on each node >>> 4. Update a war file. >>> 5. Restart App Server >>> 6. Run a selenium based smoke test to make sure the app deployed fine. >>> 7. Add the node back to the load balancer. >>> >>> All of this is in the Rackspace cloud. Linux based servers. >>> >>> So far, I can do numbers 1 and 2 with no problem. Where I am struggling >>> is getting from the Node to the NodeMetadata so that I can get the Public >>> address so I can use the ScriptBuilder to perform steps 3, 4, and 5. >>> >>> I am using the CloudLoadBalancerApi to get my balancer by zone and name. >>> I then get the NodeApi to get the nodes and I can disable them fine. >>> >>> I just dont know what to do from here because I need the public address >>> for the script builder and ssh. >>> >>> Am I on the right track, or is there an easier way to do this? >>> >>> Thanks, >>> Neil >>> >>
