Home | Trees | Indices | Help |
|
---|
|
This class represents a single compute node in a StarCluster.
It contains all useful metadata for the node such as the internal/external hostnames, ips, etc as well as a paramiko ssh object for executing commands, creating/modifying files on the node.
'instance' arg must be an instance of boto.ec2.instance.Instance
'key_location' arg is a string that contains the full path to the private key corresponding to the keypair used to launch this node
'alias' keyword arg optionally names the node. If no alias is provided, the alias is retrieved from the node's user_data based on the node's launch index
'user' keyword optionally specifies user to ssh as (defaults to root)
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
alias Fetches the node's alias stored in a tag from either the instance or the instance's parent spot request. |
|||
tags | |||
groups | |||
cluster_groups | |||
num_processors | |||
memory | |||
ip_address | |||
public_dns_name | |||
private_ip_address | |||
private_dns_name | |||
private_dns_name_short | |||
id | |||
block_device_mapping | |||
dns_name | |||
state | |||
launch_time | |||
local_launch_time | |||
uptime | |||
ami_launch_index | |||
key_name | |||
arch | |||
kernel | |||
ramdisk | |||
instance_type | |||
image_id | |||
placement | |||
root_device_name | |||
root_device_type | |||
network_names Returns all network names for this node in a dictionary |
|||
attached_vols Returns a dictionary of all attached volumes minus the root device in the case of EBS backed instances |
|||
spot_id | |||
ssh | |||
Inherited from |
|
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
repr(x)
|
Returns dictionary where keys are remote group names and values are grp.struct_grp objects from the standard grp module key_by_gid=True will use the integer gid as the returned dictionary's keys instead of the group's name |
Returns dictionary where keys are remote usernames and values are pwd.struct_passwd objects from the standard pwd module key_by_uid=True will use the integer uid as the returned dictionary's keys instead of the user's login name |
Remote version of the getgrgid method in the standard grp module returns a grp.struct_group |
Remote version of the getgrnam method in the standard grp module returns a grp.struct_group |
Remote version of the getpwuid method in the standard pwd module returns a pwd.struct_passwd |
Remote version of the getpwnam method in the standard pwd module returns a pwd.struct_passwd |
Add a user to the remote system. name - the username of the user being added uid - optional user id to use when creating new user gid - optional group id to use when creating new user shell - optional shell assign to new user (default: bash) |
Generates an id_rsa/id_rsa.pub keypair combo for a user on the remote machine. ignore_existing - if False, any existing key combos will be used rather than generating a new RSA key auth_new_key - if True, add the newly generated public key to the remote user's authorized_keys file auth_conn_key - if True, add the public key used to establish this ssh connection to the remote user's authorized_keys |
Populate user's known_hosts file with pub keys from hosts in nodes list username - name of the user to add to known hosts for nodes - the nodes to add to the user's known hosts file add_self - add this Node to known_hosts in addition to nodes NOTE: this node's hostname will also be added to the known_hosts file |
Copies a remote file from this Node instance to another Node instance without passwordless ssh between the two. dest - path to store the data in on the node (defaults to remote_file) |
Export each path in export_paths to each node in nodes via NFS nodes - list of nodes to export each path to export_paths - list of paths on this remote host to export to each node Example: # export /home and /opt/sge6 to each node in nodes $ node.start_nfs_server() $ node.export_fs_to_nodes( nodes=[node1,node2], export_paths=['/home', '/opt/sge6'] |
Removes nodes from this node's /etc/exportfs nodes - list of nodes to stop Example: $ node.remove_export_fs_to_nodes(nodes=[node1,node2]) |
Mount each path in remote_paths from the remote server_node server_node - remote server node that is sharing the remote_paths remote_paths - list of remote paths to mount from server_node |
Set this node's hostname to self.alias hostname - optional hostname to set (defaults to self.alias) |
Starts EBS-backed instance and puts it in the 'running' state. Only works if this node is EBS-backed, raises exception.InvalidOperation otherwise. |
Shutdown EBS-backed instance and put it in the 'stopped' state. Only works if this node is EBS-backed, raises exception.InvalidOperation otherwise. NOTE: The EBS root device will *not* be deleted and the instance can be 'started' later on. |
Shutdown and destroy this instance. For EBS-backed nodes, this will also destroy the node's EBS root device. Puts this node into a 'terminated' state. |
Shutdown this instance. This method will terminate traditional instance-store instances and stop EBS-backed instances (ie not destroy EBS root dev) |
Attempts to launch an interactive shell by first trying the system's ssh client. If the system does not have the ssh command it falls back to a pure-python ssh shell. |
|
aliasFetches the node's alias stored in a tag from either the instance or the instance's parent spot request. If no alias tag is found an exception is raised.
|
tags
|
groups
|
cluster_groups
|
num_processors
|
memory
|
ip_address
|
public_dns_name
|
private_ip_address
|
private_dns_name
|
private_dns_name_short
|
id
|
block_device_mapping
|
dns_name
|
state
|
launch_time
|
local_launch_time
|
uptime
|
ami_launch_index
|
key_name
|
arch
|
kernel
|
ramdisk
|
instance_type
|
image_id
|
placement
|
root_device_name
|
root_device_type
|
network_namesReturns all network names for this node in a dictionary
|
attached_volsReturns a dictionary of all attached volumes minus the root device in the case of EBS backed instances
|
spot_id
|
ssh
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Jun 27 11:48:20 2011 | http://epydoc.sourceforge.net |