[Starcluster] Spot Instances

Marc Resnick mresnick at MIT.EDU
Fri Jul 23 12:47:05 EDT 2010


Hey Austin,

You can start a cluster of spot instances by using the -b option with
your starcluster start command, along with the price.

(starcluster)dhcp-18-111-111-170:~ mresnick$ starcluster start testspot -b .03

Some price statistics can be seen as such:

(starcluster)dhcp-18-111-111-170:~ mresnick$ starcluster spothistory m1.small
StarCluster - (http://web.mit.edu/starcluster) (v. 0.9999)
Software Tools for Academics and Researchers (STAR)
Please submit bug reports to starcluster at mit.edu

>>> Current price: $0.03
>>> Max price: $0.09
>>> Average price: $0.03


Once you've placed requests, you can view them:

(starcluster)dhcp-18-111-111-170:~ mresnick$ starcluster listspots


If you kill the starcluster start command before your instances come
up, you can use that command to check on them. They're up when they
get an instance ID.


Alternatively, you can open up the starcluster shell and use:

In [1]: ec2.request_spot_instances?
Type:           instancemethod
Base Class:     <type 'instancemethod'>
String Form:    <bound method EasyEC2.request_spot_instances of
<starcluster.awsutils.EasyEC2 object at 0x101ab1c90>>
Namespace:      Interactive
File:           /Users/mresnick/pycode/StarCluster/starcluster/awsutils.py
Definition:     ec2.request_spot_instances(self, price, image_id,
instance_type='m1.small', count=1, launch_group=None, key_name=None,
availability_zone_group=None, security_groups=None, placement=None,
user_data=None)
Docstring:
    <no docstring>


Be sure to specify a key_name, or you'll have no control of the instances.


Marc


On Fri, Jul 23, 2010 at 12:36 PM, Austin Godber <godber at uberhip.com> wrote:
> Is there any documentation on using spot instances?  I only see things
> in the release notes and code.
>
> Austin
> _______________________________________________
> Starcluster mailing list
> Starcluster at mit.edu
> http://mailman.mit.edu/mailman/listinfo/starcluster
>




More information about the StarCluster mailing list