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 '#' strategy works for yaml as well (looking one message below). i was just afraid it wasn't universal.<br>
<br><div class="gmail_quote">On Tue, Feb 7, 2012 at 11:03 PM, Justin Riley <span dir="ltr"><<a href="mailto:justin.t.riley@gmail.com">justin.t.riley@gmail.com</a>></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'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'm happy to provide an<br>
example or perhaps include it in a future release if you're interested.<br>
<br>
The reason for storing the alias in user-data is that I needed some way<br>
to 'stick' a name to a node at launch time. The new tagging API for EC2<br>
is useful but it'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 'commenting' the alias line in user-data so<br>
that other scripts can run is not a bad solution actually. I'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'm happy to help you<br>
along with the fork/pull request process if you're willing. There'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>
> It doesn't.<br>
><br>
> Currently the user data is used by starcluster itself to store node aliases.<br>
><br>
> I had a similar requirement as yours - but in my case - the user data<br>
> was restricted to shell scripts. So what i did for my use case was hack<br>
> the starcluster code to use the first line of the user data - prepended<br>
> with a '#' for node aliases - and the rest of the user data could be<br>
> used as a shell script (filled in when launching the cluster from the<br>
> configuration).<br>
><br>
> it seemed pretty hacky to me - so didn't try to contribute back.<br>
><br>
> there may be other ways of achieving this outcome. for example - one<br>
> could take the cluster-name and the instance alias (node001 etc.) and<br>
> then map that to a location in s3 (s3://urbucket/cluster-name/node001)<br>
> and then store instance specific user data in that location. the boot<br>
> scripts can get the cluster name and the instance alias from ec2 apis<br>
> and then use that to locate the instance data and get rolling.<br>
><br>
> On Tue, Jan 24, 2012 at 9:22 PM, Paolo Di Tommaso<br>
</div><div class="im">> <<a href="mailto:Paolo.DiTommaso@crg.eu">Paolo.DiTommaso@crg.eu</a> <mailto:<a href="mailto:Paolo.DiTommaso@crg.eu">Paolo.DiTommaso@crg.eu</a>>> wrote:<br>
><br>
> Dear all,<br>
><br>
> Does StarCluster provide any support for EC2 user data feature?<br>
><br>
> <a href="http://www.turnkeylinux.org/blog/ec2-userdata" target="_blank">http://www.turnkeylinux.org/blog/ec2-userdata</a><br>
><br>
><br>
> I would like to use this mechanism to specify some extra instance<br>
> configuration at node boot time.<br>
><br>
> If no, is there any other alternative?<br>
><br>
><br>
> Thank you,<br>
> Paolo Di Tommaso<br>
><br>
> Software Engineer<br>
> Comparative Bioinformatics Group<br>
> Centre de Regulacio Genomica (CRG)<br>
> Dr. Aiguader, 88<br>
> 08003 Barcelona, Spain<br>
><br>
><br>
> _______________________________________________<br>
> StarCluster mailing list<br>
</div>> <a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a> <mailto:<a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a>><br>
> <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">><br>
><br>
><br>
><br>
> _______________________________________________<br>
> StarCluster mailing list<br>
> <a href="mailto:StarCluster@mit.edu">StarCluster@mit.edu</a><br>
> <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>