|
__init__(self,
ec2_conn=None,
spot_bid=None,
cluster_tag=None,
cluster_description=None,
cluster_size=None,
cluster_user=None,
cluster_shell=None,
master_image_id=None,
master_instance_type=None,
node_image_id=None,
node_instance_type=None,
node_instance_types=[ ] ,
availability_zone=None,
keyname=None,
key_location=None,
volumes=[ ] ,
plugins=[ ] ,
permissions=[ ] ,
refresh_interval=30,
disable_queue=False,
disable_threads=False,
cluster_group=None,
force_spot_master=False,
**kwargs)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature |
source code
|
|
|
|
|
load_volumes(self,
vols)
Iterate through vols and set device/partition settings automatically
if not specified. |
source code
|
|
|
|
|
|
|
_validate_running_instances(self)
Validate existing instances against this cluster's settings |
source code
|
|
|
|
|
|
|
load_receipt(self,
load_plugins=True)
Load the original settings used to launch this cluster into this
Cluster object. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
create_node(self,
alias,
image_id=None,
instance_type=None,
zone=None,
placement_group=None,
spot_bid=None,
force_flat=False) |
source code
|
|
|
create_nodes(self,
aliases,
image_id=None,
instance_type=None,
zone=None,
placement_group=None,
spot_bid=None,
force_flat=False)
Convenience method for requesting instances with this cluster's
settings. |
source code
|
|
|
|
|
add_node(self,
alias=None,
no_create=False)
Add a single node to this cluster |
source code
|
|
|
|
|
remove_node(self,
node,
terminate=True)
Remove a single node from this cluster |
source code
|
|
|
remove_nodes(self,
nodes,
terminate=True)
Remove a list of nodes from this cluster |
source code
|
|
|
_get_launch_map(self,
reverse=False)
Groups all node-aliases that have similar instance types/image ids
Returns a dictionary that's used to launch all similar instance types
and image ids in the same request. |
source code
|
|
|
_get_type_and_image_id(self,
alias)
Returns (instance_type,image_id) for a given alias based on the map
returned from self._get_launch_map |
source code
|
|
|
create_cluster(self)
Launches all EC2 instances based on this cluster's settings. |
source code
|
|
|
|
|
|
|
is_spot_cluster(self)
Returns True if all nodes are spot instances |
source code
|
|
|
has_spot_nodes(self)
Returns True if any nodes are spot instances |
source code
|
|
|
is_ebs_cluster(self)
Returns True if all nodes are EBS-backed |
source code
|
|
|
has_ebs_nodes(self)
Returns True if any nodes are EBS-backed |
source code
|
|
|
|
|
|
|
is_cluster_compute(self)
Returns true if all instances are Cluster/GPU Compute type |
source code
|
|
|
|
|
is_cluster_up(self)
Check that all nodes are 'running' and that ssh is up on all nodes
This method will return False if any spot requests are in an 'open'
state. |
source code
|
|
|
|
|
wait_for_active_spots(self,
spots=None)
Wait for all open spot requests for this cluster to transition to
'active'. |
source code
|
|
|
wait_for_active_instances(self,
nodes=None)
Wait indefinitely for cluster nodes to show up. |
source code
|
|
|
wait_for_running_instances(self,
nodes=None)
Wait until all cluster nodes are in a 'running' state |
source code
|
|
|
wait_for_ssh(self,
nodes=None)
Wait until all cluster nodes are in a 'running' state |
source code
|
|
|
|
|
is_cluster_stopped(self)
Check whether all nodes are in the 'stopped' state |
source code
|
|
|
is_cluster_terminated(self)
Check whether all nodes are in a 'terminated' state |
source code
|
|
|
attach_volumes_to_master(self)
Attach each volume to the master node |
source code
|
|
|
detach_volumes(self)
Detach all volumes from all nodes |
source code
|
|
|
|
|
stop_cluster(self,
terminate_unstoppable=False)
Shutdown this cluster by detaching all volumes and 'stopping' all
nodes |
source code
|
|
|
terminate_cluster(self)
Destroy this cluster by first detaching all volumes, shutting down
all instances, canceling all spot requests (if any), removing its
placement group (if any), and removing its security group. |
source code
|
|
|
start(self,
create=True,
create_only=False,
validate=True,
validate_only=False,
validate_running=False)
Creates and configures a cluster from this cluster template's settings. |
source code
|
|
|
_start(self,
create=True,
create_only=False)
Create and configure a cluster from this cluster template's settings
(Does not attempt to validate before running) |
source code
|
|
|
setup_cluster(self)
Waits for all nodes to come up and then runs the default StarCluster
setup routines followed by any additional plugin setup routines |
source code
|
|
|
_setup_cluster(self)
Runs the default StarCluster setup routines followed by any
additional plugin setup routines. |
source code
|
|
|
run_plugins(self,
plugins=None,
method_name=' run ' ,
node=None,
reverse=False)
Run all plugins specified in this Cluster object's self.plugins list
Uses plugins list instead of self.plugins if specified. |
source code
|
|
|
|
|
is_running_valid(self)
Checks whether the current running instances are compatible with this
cluster template's settings |
source code
|
|
|
|
|
is_valid(self)
Returns True if all cluster template settings are valid |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
__check_platform(self,
image_id,
instance_type)
Validates whether an image_id (AMI) is compatible with a given
instance_type. |
source code
|
|
|
|
|
|
|
_validate_ebs_aws_settings(self)
Verify EBS volumes exists and that each volume's zone matches this
cluster's zone setting. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
ssh_to_master(self,
user=' root ' ,
command=None) |
source code
|
|
|
ssh_to_node(self,
alias,
user=' root ' ,
command=None) |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__sizeof__ ,
__subclasshook__
|