|jclouds- how to uniquely identify one node within a group of compute instances||Arvind||12/24/12 3:45 AM|
In a java app, I have started a group of virtual machines with a specific group name.
Now, I wish to identify each of the virtual machines in that group, uniquely. The code to identify a virtual machine (which is part of that group of machines) will be run within that machine itself directly. What parameter/attribute do I use to uniquely identify such a machine? As I understand "NodeMetadata" identifies each node...But which attribute from "NodeMetadata" class do I use for the purpose as described above? In such a way that, this attribute can be obtained by code running on the node that I wish to terminate?
|Re: jclouds- how to uniquely identify one node within a group of compute instances||Adrian Cole||12/24/12 4:12 AM|
node.id is your best bet. Also, don't be shy about creating groups of size one. Groups intend to represent machines with identical configuration.
|Re: jclouds- how to uniquely identify one node within a group of compute instances||Arvind||12/24/12 5:54 AM|
OK, suppose i create a group of 5 machines--> will the id field have values 1,2,3,4,5? Also, can I obtain the public IP address of a node from the node metadata?
|Re: jclouds- how to uniquely identify one node within a group of compute instances||Adrian Cole||12/24/12 9:57 AM|
Don't plan to parse the id. Sometimes it is a number sometimes it is an href. You can get the public ip from the public addresses accessor.
--To view this discussion on the web visit https://groups.google.com/d/msg/jclouds/-/kia1tDmsj2YJ.