Here's a plugin solution:<div><br></div><div>---------------------</div><div><br></div><div><div>from starcluster.clustersetup import ClusterSetup</div><div>from starcluster.logger import log</div><div><br></div><div>class ElasticIPSetup(ClusterSetup):</div>
<div><br></div><div> def __init__(self,elasticip):</div><div> self.elasticip = elasticip</div><div> log.debug('elasticip = %s' % elasticip)</div><div><br></div><div> def run(self, nodes, master, user, user_shell, volumes):</div>
<div><br></div><div> master.ec2.conn.associate_address(<a href="http://master.instance.id">master.instance.id</a>,self.elasticip)</div><div><br></div><div># Config usage: </div>
<div>#[plugin staticip] </div>
<div>#setup_class = elasticip.ElasticIPSetup </div>
<div>#elasticip = 50.123.456.789 </div><div><br></div><div><br></div><div>----------------</div><div><br></div><div>Thanks to Dan Yamins for input.</div><div><br></div><br><div class="gmail_quote">On Tue, Aug 21, 2012 at 4:46 PM, Charles Cadieu <span dir="ltr"><<a href="mailto:cadieu@mit.edu" target="_blank">cadieu@mit.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hey,<div><br></div><div>I was wondering if anyone has a simple solution to the non-static public IP address for the master node. Using the sshmaster command is fine, but having an alias or static IP would make it easy for other programs to find the cluster without having to manually enter the public IP every time it changes.</div>
<div><br></div><div>This could be something simple, like automatically updating my local /etc/hosts with the correct alias between the cluster's name and the dynamic public IP.</div><div>Or a plugin to automatically assign an Elastic IP address to the master node: <a href="http://aws.amazon.com/articles/1346" target="_blank">http://aws.amazon.com/articles/1346</a></div>
<div><br></div><div>Let me know if anyone has a solution to this problem.</div><div><br></div><div>Thanks!</div><span class="HOEnZb"><font color="#888888"><div>Charles</div>
</font></span></blockquote></div><br></div>