[StarCluster] writing plugins

Dmitry Serenbrennikov dmitry at adchemy.com
Tue Mar 4 14:43:04 EST 2014


Hi Adam,
Thanks for sharing the code!
I didn't know about node.ssh.remote_file(). That's really handy!

I ended up coding something myself as well, but I wanted to avoid the need for my workstation to have validation.pem on it.
So I found that I can ssh to a machine on our network that does have it and then use knife bootstrap from it.
I'm new to chef and not sure what makes for better setup. Validation.pem anyhow seems to end up widely shared, so it's hard to call it a "private" key...

One thing didn't find a good solution for is implementing sensible behavior on "starcluster stop" vs. "starcluster terminate". It appears that a plugin can't tell the difference between the two.
If the node is terminated, I would want to remove the client and probably the node from the chef server. But if I do that, then on "stop" I end up invalidating the client and on "start -x" it is not recognized.
I noticed that your plugin doesn't implement any of this either, or am I mistaken?

Is the recommended practice to fully delete everything and then re-provision as if it's a fresh start even on "start -x"?

Thanks very much for any advice!
-Dmitry?


________________________________
From: Adam <adamnkraut at gmail.com>
Sent: Tuesday, March 04, 2014 7:55 AM
To: Dmitry Serenbrennikov
Cc: starcluster at mit.edu; dserebren at gmail.com
Subject: Re: [StarCluster] writing plugins

Hi Dmitry,

You can look at my simple chef plugin here. It might not be exactly what you're trying to do but hopefully it helps.

https://github.com/bioteam/StarClusterPlugins/blob/master/starcluster_plugins/chef/chef.py

Best Regards,
Adam


On Wed, Feb 26, 2014 at 7:06 PM, Dmitry Serenbrennikov <dmitry at adchemy.com<mailto:dmitry at adchemy.com>> wrote:

Hello!


I'm trying to write a simple plugin for Chef integration. But I'm having trouble finding good examples and docs out there. Can someone please point me to some good resources, besides the http://star.mit.edu/cluster/docs/latest/manual/plugins.html#plugin-system page?


DefaultClusterSetup is useful, but a bit tough to get through. Also, I don't know if it has example of what I am trying to do. For example, how does one get a cluster name and template name from inside plugin's run method?


Thanks!

Dmitry

dserebren at gmail.com<mailto:dserebren at gmail.com>

_______________________________________________
StarCluster mailing list
StarCluster at mit.edu<mailto:StarCluster at mit.edu>
http://mailman.mit.edu/mailman/listinfo/starcluster


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/starcluster/attachments/20140304/9b9b806f/attachment.htm


More information about the StarCluster mailing list