ok - i think the patch is pretty simple - let me file a pull request. i had added the user_data param as well ..<div><br></div><div>i think the &#39;#&#39; strategy works for yaml as well (looking one message below). i was just afraid it wasn&#39;t universal.<br>
<br><div class="gmail_quote">On Tue, Feb 7, 2012 at 11:03 PM, Justin Riley <span dir="ltr">&lt;<a href="mailto:justin.t.riley@gmail.com">justin.t.riley@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Paolo/Joydeep,<br>
<br>
You&#39;re correct that StarCluster currently uses the user-data to store<br>
node-aliases which at the moment kills the ability to utilize user-data<br>
scripts. It is possible to run user-scripts on the entire cluster fairly<br>
easily, however, using a StarCluster plugin. I&#39;m happy to provide an<br>
example or perhaps include it in a future release if you&#39;re interested.<br>
<br>
The reason for storing the alias in user-data is that I needed some way<br>
to &#39;stick&#39; a name to a node at launch time. The new tagging API for EC2<br>
is useful but it&#39;s still not possible to assign names at launch time. My<br>
current approach is to use the user-data at launch time, then later<br>
fetch it from user-data once the instance is up and apply an alias tag.<br>
This is useful for example if things crash somewhere in the middle - the<br>
nodes are guaranteed to be named the same thing the next time around<br>
because of the user-data.<br>
<br>
Your solution of effectively &#39;commenting&#39; the alias line in user-data so<br>
that other scripts can run is not a bad solution actually. I&#39;d be<br>
willing to accept a pull request for this and include the functionality<br>
in a future release. We need to add a USER_DATA config parameter to the<br>
cluster config that would let users point to a user-data script.<br>
<br>
Would you be interested in contributing this back? I&#39;m happy to help you<br>
along with the fork/pull request process if you&#39;re willing. There&#39;s also<br>
a contribute guide that gives an overview of the process:<br>
<br>
<a href="http://web.mit.edu/star/cluster/docs/latest/contribute.html" target="_blank">http://web.mit.edu/star/cluster/docs/latest/contribute.html</a><br>
<br>
~Justin<br>
<div class="im"><br>
<br>
On 01/24/2012 11:41 AM, Joydeep Sen Sarma wrote:<br>
&gt; It doesn&#39;t.<br>
&gt;<br>
&gt; Currently the user data is used by starcluster itself to store node aliases.<br>
&gt;<br>
&gt; I had a similar requirement as yours - but in my case - the user data<br>
&gt; was restricted to shell scripts. So what i did for my use case was hack<br>
&gt; the starcluster code to use the first line of the user data - prepended<br>
&gt; with a &#39;#&#39; for node aliases - and the rest of the user data could be<br>
&gt; used as a shell script (filled in when launching the cluster from the<br>
&gt; configuration).<br>
&gt;<br>
&gt; it seemed pretty hacky to me - so didn&#39;t try to contribute back.<br>
&gt;<br>
&gt; there may be other ways of achieving this outcome. for example - one<br>
&gt; could take the cluster-name and the instance alias (node001 etc.) and<br>
&gt; then map that to a location in s3 (s3://urbucket/cluster-name/node001)<br>
&gt; and then store instance specific user data in that location. the boot<br>
&gt; scripts can get the cluster name and the instance alias from ec2 apis<br>
&gt; and then use that to locate the instance data and get rolling.<br>
&gt;<br>
&gt; On Tue, Jan 24, 2012 at 9:22 PM, Paolo Di Tommaso<br>
</div><div class="im">&gt; &lt;<a href="mailto:Paolo.DiTommaso@crg.eu">Paolo.DiTommaso@crg.eu</a> &lt;mailto:<a href="mailto:Paolo.DiTommaso@crg.eu">Paolo.DiTommaso@crg.eu</a>&gt;&gt; wrote:<br>
&gt;<br>
&gt;     Dear all,<br>
&gt;<br>
&gt;     Does StarCluster provide any support for EC2 user data feature?<br>
&gt;<br>
&gt;     <a href="http://www.turnkeylinux.org/blog/ec2-userdata" target="_blank">http://www.turnkeylinux.org/blog/ec2-userdata</a><br>
&gt;<br>
&gt;<br>
&gt;     I would like to use this mechanism to specify some extra instance<br>
&gt;     configuration at node boot time.<br>
&gt;<br>
&gt;     If no, is there any other alternative?<br>
&gt;<br>
&gt;<br>
&gt;     Thank you,<br>
&gt;     Paolo Di Tommaso<br>
&gt;<br>
&gt;     Software Engineer<br>
&gt;     Comparative Bioinformatics Group<br>
&gt;     Centre de Regulacio Genomica (CRG)<br>
&gt;     Dr. Aiguader, 88<br>
&gt;     08003 Barcelona, Spain<br>
&gt;<br>
&gt;<br>
&gt;     _______________________________________________<br>
&gt;     StarCluster mailing list<br>
</div>&gt;     <a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a> &lt;mailto:<a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a>&gt;<br>
&gt;     <a href="http://mailman.mit.edu/mailman/listinfo/starcluster" target="_blank">http://mailman.mit.edu/mailman/listinfo/starcluster</a><br>
<div><div></div><div class="h5">&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; StarCluster mailing list<br>
&gt; <a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a><br>
&gt; <a href="http://mailman.mit.edu/mailman/listinfo/starcluster" target="_blank">http://mailman.mit.edu/mailman/listinfo/starcluster</a><br>
<br>
</div></div></blockquote></div><br></div>