[StarCluster] Using starcluster as a library

Jeff White jeff at decide.com
Tue Feb 15 20:58:32 EST 2011


I just joined the list and am responding to a post back in May 2010 with the
same subject. I wrote this python script as recommended by Justin:

def main():
     cfg = starcluster.config.StarClusterConfig(); cfg.load()
     sc =  cfg.get_cluster_template('smallcluster', 'mynewcluster')
     if sc.is_valid():
         sc.start(create=True)

if __name__ == "__main__":
     main()


The instances were created, but the only output I get is this instead of the
usual status messages about the master node and installing SGE etc.

Reservation:r-74f42b19
2/2
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
100%
2/2
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
100%

My guess is that starcluster.logger needs to be imported in some way, but I
haven't figured out how. I'm new to starcluster and python, so I may be
missing something obvious. I hope that using starcluster in this way is not
considered a hack, and is somewhat officially supported. This gives me
convenient access to cluster values, which I don't get by using the
command-line tools.

thanks,
jeff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/starcluster/attachments/20110215/b2c31063/attachment.htm


More information about the StarCluster mailing list