Package starcluster :: Package commands :: Module shell :: Class CmdShell
[hide private]
[frames] | no frames]

Class CmdShell

source code



shell

Load an interactive IPython shell configured for starcluster development

The following objects are automatically available at the prompt:

    cfg - starcluster.config.StarClusterConfig instance
    cm - starcluster.cluster.ClusterManager instance
    ec2 - starcluster.awsutils.EasyEC2 instance
    s3 - starcluster.awsutils.EasyS3 instance

All StarCluster modules are automatically imported in the IPython session
along with all StarCluster dependencies (e.g. boto, paramiko, etc.)

If the --ipcluster=CLUSTER (-p) is passed, the IPython session will be
automatically be configured to connect to the remote CLUSTER using
IPython's parallel interface (requires IPython 0.11+). In this mode you
will have the following additional objects available at the prompt:

    ipcluster - starcluster.cluster.Cluster instance for the cluster
    ipclient - IPython.parallel.Client instance for the cluster
    ipview - IPython.parallel.client.view.DirectView for the cluster

Here's an example of how to run a parallel map across all nodes in the
cluster:

    [~]> ipclient.ids
    [0, 1, 2, 3]
    [~]> res = ipview.map_async(lambda x: x**30, range(8))
    [~]> print res.get()
    [0,
     1,
     1073741824,
     205891132094649L,
     1152921504606846976L,
     931322574615478515625L,
     221073919720733357899776L,
     22539340290692258087863249L]

See IPython parallel docs for more details
(http://ipython.org/ipython-doc/stable/parallel)

Instance Methods [hide private]
 
_add_to_known_hosts(self, node) source code
 
addopts(self, parser) source code
 
execute(self, args) source code

Inherited from base.CmdBase: cancel_command, catch_ctrl_c, warn_experimental

Inherited from base.CmdBase (private): _build_dict, _positive_int

Inherited from optcomplete.CmdComplete: autocomplete

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  names = ['shell', 'sh']

Inherited from base.CmdBase: gopts, gparser, opts, parser, subcmds_map

Inherited from base.CmdBase (private): _cfg, _cm, _ec2, _nm, _s3

Properties [hide private]

Inherited from base.CmdBase: cfg, cluster_manager, cm, comp_words, ec2, goptions_dict, log, nm, node_manager, options_dict, s3, specified_options_dict

Inherited from object: __class__

Method Details [hide private]

addopts(self, parser)

source code 
Overrides: base.CmdBase.addopts