<br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><br></div><div>Right now I have created an AMI, but whenever I launch starcluster using that AMI, I have to manually log into that machine,</div><div>mount that scratch drive, change permissions etc. (probably something like just write a script that runs when booting a new instance)</div>
</blockquote><div><br>Abhijit, one way to solve your problem (and others like it ) is to use starcluster&#39;s &quot;plugin&quot; feature.   <br><br>See <a href="http://web.mit.edu/stardev/cluster/docs/plugins.html">http://web.mit.edu/stardev/cluster/docs/plugins.html</a><br>
<br>This feature will allow you to write a short python script and configure your cluster setup so that the script runs each time a cluster is started. <br><br><br>In your case, you might might want something like:<br><br>
<br>#######FILE $STARCLUSTER_HOME/plugins/myplugin.py######<br><br>from starcluster import clustersetup as cs<br><br>class mySetup(cs.ClusterSetup):<br><br>    def run(self, nodes, master, user, user_shell, volumes):<br>              <br>
        master.ssh.execute(&quot;mount /dev/sdb scratch/&quot;)       ##&lt;- I&#39;m guessing about this line, it might not be quite right<br><br>######END FILE########################################<br><br>If you follow the online instructions and configure your cluster to use this plugin like this:<br>
<br>[plugin MountSetup]<br>SETUP_CLASS = muplugin.mySetup<br><br>.<br>.<br>.<br><br>[cluster mycluster]<br>.<br>.<br>.<br><br>PLUGINS=MountSetup<br><br><br>.... then the plugin will be run whenver you start a cluster. <br>
<br>Obviously, there might be other better ways to solve your problem in specific, but in general, any time you find that you haven&#39;t quite set up your AMI right, you can always use a plugin as a faster and more flexible way to solve the problem than recreating the AMI.   <br>
<br><br><br>Dan<br></div></div>