[StarCluster] plugin shell help
Dan Tenenbaum
dtenenba at fhcrc.org
Sat Oct 30 18:48:48 EDT 2010
On Sat, Oct 30, 2010 at 3:45 PM, Justin Riley <jtriley at mit.edu> wrote:
> On 10/30/10 5:44 PM, Dan Tenenbaum wrote:
>
> OK,
>
> Farther along.
> I made an additional patch to cluster.py, in load_plugins():
>
> old code:
> for plugin in plugins:
>
> new code:
> for key in plugins:
> plugin = plugins[key]
>
> That gets me past that trouble spot.
>
> Then, though, when I try and run my plugin from the shell, I get this:
>
>
> You can also use the following approach to run your plugin:
>
> $ starcluster shell
> $ from shortread import ShortReadPlugin
> $ plugin = ShortReadPlugin(your, args, here)
> $ cl = cluster.get_cluster("mycluster", cfg)
> $ cl.load_receipt()
> $ plugin.run(cl.nodes, cl.master_node, cl.cluster_user, cl.cluster_shell,
> cl.volumes)
>
> Alternatively this patch to run_plugin in cluster.py should work:
>
> def run_plugin(plugin_name, cluster_tag, cfg):
> ec2 = cfg.get_easy_ec2()
> cl = <
> span class="n" style="margin: 0px; padding: 0px; line-height: 1.4em;">get_cluster
>
> (cluster_tag, cfg)
> cl.load_receipt()
> plug = cfg.get_plugin(plugin_name)
> plugins = {}
> plugins[plugin_name] = plug
> plugins = cl.load_plugins(plugins)
> master = cl.master_node
> for p in plugins:
> plugins.get(p).run(cl.nodes, cl.master_node, cl.cluster_user, cl.
> cluster_shell, cl.volumes)
>
>
>
Great minds think alike. ;)
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.mit.edu/pipermail/starcluster/attachments/20101030/2fe2c16e/attachment.htm
More information about the StarCluster
mailing list