Package starcluster :: Module cluster :: Class Cluster
[hide private]
[frames] | no frames]

Class Cluster

source code


Instance Methods [hide private]
 
__init__(self, aws_access_key_id=None, aws_secret_access_key=None, aws_port=None, aws_is_secure=True, aws_ec2_path='/', aws_s3_path='/', aws_region_name=None, aws_region_host=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, availability_zone=None, keyname=None, key_location=None, volumes=[], plugins=[], **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
 
load_plugins(self, plugins) source code
 
update(self, kwargs) source code
 
_validate_running_instances(self)
Validate existing instances against this template's settings
source code
 
get(self, name) source code
 
__str__(self)
str(x)
source code
 
load_receipt(self)
Fetch the StarCluster receipt file from the master node and use it to populate this object's attributes.
source code
 
create_receipt(self)
Create a 'receipt' file on the master node that contains this Cluster object's attributes.
source code
 
get_node_by_dns_name(self, dns_name) source code
 
get_node_by_id(self, instance_id) source code
 
run_instances(self, price=None, image_id=None, instance_type='m1.small', min_count=1, max_count=1, count=1, key_name=None, security_groups=None, launch_group=None, availability_zone_group=None, placement=None) source code
 
create_cluster(self) source code
 
is_cluster_up(self)
Check whether there are cluster_size nodes running, that ssh (port 22) is up on all nodes, and that each node has an internal ip address associated with it
source code
 
attach_volumes_to_master(self) source code
 
detach_volumes(self) source code
 
stop_cluster(self) source code
 
start(*arg, **kargs)
Raw timing function
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)
Checks that all cluster template settings are valid
source code
 
_validate_spot_bid(self) source code
 
_validate_cluster_size(self) source code
 
_validate_shell_setting(self) source code
 
_validate_image_settings(self) source code
 
_validate_zone(self) 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_instance_types(self) source code
 
_validate_ebs_aws_settings(self)
Verify EBS volumes exists on Amazon and that each volume's zone matches this cluster's zone setting.
source code
 
_validate_ebs_settings(self)
Check EBS vols for missing/duplicate DEVICE/PARTITION/MOUNT_PATHs and validate these settings.
source code
 
_has_all_required_settings(self) source code
 
_validate_credentials(self) source code
 
_validate_keypair(self) source code

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

Properties [hide private]
  zone
If volumes are specified, this method determines the common availability zone between those volumes.
  _security_group
  master_group
  cluster_group
  master_node
  nodes
  running_nodes

Inherited from object: __class__

Method Details [hide private]

__init__(self, aws_access_key_id=None, aws_secret_access_key=None, aws_port=None, aws_is_secure=True, aws_ec2_path='/', aws_s3_path='/', aws_region_name=None, aws_region_host=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, availability_zone=None, keyname=None, key_location=None, volumes=[], plugins=[], **kwargs)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

load_volumes(self, vols)

source code 

Iterate through vols and set device/partition settings automatically if not specified.

This method assigns the first volume to /dev/sdz, second to /dev/sdy, etc for all volumes that do not include a device/partition setting

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

load_receipt(self)

source code 

Fetch the StarCluster receipt file from the master node and use it to populate this object's attributes. This is used to restore the state of this object's settings as they were at the time of creating the cluster.

create_receipt(self)

source code 

Create a 'receipt' file on the master node that contains this Cluster object's attributes. This receipt is useful for loading the settings used to create the cluster at a later time using load_receipt().

start(*arg, **kargs)

source code 

Raw timing function

Decorators:
  • @print_timing

__check_platform(self, image_id, instance_type)

source code 

Validates whether an image_id (AMI) is compatible with a given instance_type. image_id_setting and instance_type_setting are the setting labels in the config file.

_validate_ebs_aws_settings(self)

source code 

Verify EBS volumes exists on Amazon and that each volume's zone matches this cluster's zone setting. Requires AWS credentials.

_validate_ebs_settings(self)

source code 

Check EBS vols for missing/duplicate DEVICE/PARTITION/MOUNT_PATHs and validate these settings. Does not require AWS credentials.


Property Details [hide private]

zone

If volumes are specified, this method determines the common availability zone between those volumes. If an availability zone is explicitly specified in the config and does not match the common availability zone of the volumes, an exception is raised. If all volumes are not in the same availabilty zone an exception is raised. If no volumes are specified, returns the user specified availability zone if it exists.

Get Method:
unreachable.zone(self) - If volumes are specified, this method determines the common availability zone between those volumes.

_security_group

Get Method:
unreachable._security_group(self)

master_group

Get Method:
unreachable.master_group(self)

cluster_group

Get Method:
unreachable.cluster_group(self)

master_node

Get Method:
unreachable.master_node(self)

nodes

Get Method:
unreachable.nodes(self)

running_nodes

Get Method:
unreachable.running_nodes(self)