StarCluster - Mailing List Archive

Re: plugin shell help

From: Dan Tenenbaum <no email>
Date: Sat, 30 Oct 2010 15:48:48 -0700

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
Received on Sat Oct 30 2010 - 18:48:51 EDT
This archive was generated by hypermail 2.3.0.

Search:

Sort all by:

Date

Month

Thread

Author

Subject