StarCluster - Mailing List Archive

Re: accessing cluster object from a plugin

From: Justin Riley <no email>
Date: Mon, 20 Dec 2010 17:17:10 -0500

Hash: SHA1

Hey Guys,

Sorry for dropping the ball on this one. I'd like to avoid passing in
the entire Cluster object if I can help it. The next version will have a
'groups' attribute in the Node class. For now you can access the various
groups that a node is a member of by using the groups attribute in the
Node class's instance attribute:

 In[1] groups = n.instance.groups
 In[2] g = groups[0]
 In[3] print
Out[3] '_at_sc-mycluster'

Checking whether a group is a starcluster name is simply a matter of
testing whether the starts with static.SECURITY_GROUP_PREFIX:

 In[4] is_cluster_group =

In the next version accessing the groups will simply be:

In[1] n.groups

This will contain *all* security groups. We will also have a
cluster_groups attribute in the next version for listing *only* cluster
security groups:

In[2] n.cluster_groups

Last, for the time being you can access the *boto* ec2 connection object
(not EasyEC2) which will allow you to make boto calls to EC2 via the
n.instance.connection attribute:

In[1] n.instance.connection.authorize_security_group(...)

Keep in mind this n.instance.connection object is a *boto* ec2
connection not StarCluster's EasyEC2 connection. In the next version you
will have an 'ec2' attribute in the Node class that will allow you to
make aws/ec2 calls via the EasyEC2 object.

Does this make sense?


On 12/20/2010 04:08 PM, Dan Yamins wrote:
> Any further info on this?
> On Wed, Dec 15, 2010 at 7:23 PM, Dan Yamins <
> <>> wrote:
> I'm interested to know this as well ... Justin, you were saying
> something about the cluster object being passed to the run method,
> in the github code?
> D
> On Tue, Dec 7, 2010 at 1:27 PM, Igor Tatarinov <
> <>> wrote:
> I can't figure out if it's possible. I just need to know the
> cluster security group.
> The arg list doesn't include 'cluster':
> def run(self, nodes, master, user, user_shell, volumes):
> and it doesn't seem possible to get to the cluster from a node
> object.
> _______________________________________________
> StarCluster mailing list
> <>

Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Mozilla -

Received on Mon Dec 20 2010 - 17:17:16 EST
This archive was generated by hypermail 2.3.0.


Sort all by: