[chef] Re: Re: Launching spot instances?


Chronological Thread 
  • From: James < >
  • To:
  • Subject: [chef] Re: Re: Launching spot instances?
  • Date: Fri, 26 Oct 2012 01:41:20 -0700

I do not think it is a bad idea to add spot instance functionality to knife ec2. Spot instances are great, not only because they are very inexpensive, but because you can set an end date for your reservation. Load testing, staging, queue workers, batch jobs, and map reduce are examples of potential use cases. In cases where it would be ideal, but is not necessary for a spot instance to stay up, you can bid higher than the on-demand price. It is pretty rare for spot prices to exceed on-demand, so you will most likely still save money with this tactic. 

I think it is possible to add this functionality to knife ec2. You would monitor the status of the bid request until it is fulfilled. It would probably be ideal to write a basic cookbook to manage cleaning up the nodes/clients when the spot instances are terminated. 

Here is a blog on the new Spot Instance Status API: http://aws.typepad.com/aws/2012/10/amazon-ec2-spot-instance-bid-status.html

James

On Thu, Oct 25, 2012 at 6:56 AM, Mike < " target="_blank"> > wrote:
While the underlying library fog may provide this functionality, this
actually seems less useful to be part of the knife-ec2 command set.

`knife ec2 server create` attempts to create an instance, wait for it
to come up, bootstrap it via ssh, and start up chef-client (usually).

From what I garner, placing a spot request with a bid provide is not
ensured to be delivered at the time pf placing the request, and
therefore the flow of what "ec2 server create" does today would not be
the same, rather it seems like it would be: "If I can get a spot
request now, please give it to me, otherwise...?" Fail? The bid
request was probably placed, so this isn't a failure per se.

The other part of why I think this might not be a great idea is:  Spot
instances come up and down whenever their bid price is met or outbid
respectively. This can cause easy buildup of cruft in your node/client
list if you are allowing these to auto-register/validate themselves,
and then have to clean up after them once they are gone.

All in all, I think spot instances have a use case, but I don't know
if during ec2 server create (and subsequently bootstrap phase) makes
sense to support this.


On Wed, Oct 24, 2012 at 1:44 PM, Christopher J. Bottaro
< "> > wrote:
> How can I launch spot instances using "knife ec2 server create"?  I don't
> see any relevant command line switches.
>
> Thanks for the help.




Archive powered by MHonArc 2.6.16.

§