vagrant-aws icon indicating copy to clipboard operation
vagrant-aws copied to clipboard

Support Spot Instances

Open iangcarroll opened this issue 12 years ago • 59 comments

Testing costs could be lowered from 3 cents an hour to .003 cents an hour.

Edited to remove development from issue, tralamazza has a point

iangcarroll avatar Apr 03 '13 19:04 iangcarroll

could be nice, but spot instances might be killed at any moment, good for fault tolerant tasks

tralamazza avatar Apr 03 '13 21:04 tralamazza

I have this on my mind as well. Not for development per se, but as a way to spin up a temporary big box at low cost without all this ec2rsi -t blah -f blah -p blah stuff, and without having to fit all the setup in just one file.

I'd be willing to take a stab at implementation but I need to learn a bit more about Vagrant's architecture. In particular, it would be preferable to me to specify the price limit and instance type on the command line, but I don't know if providers can specify their own command line options.

kamalmarhubi avatar Apr 04 '13 18:04 kamalmarhubi

I think this would be perfect for Vagrant-style development where creating a dev environment can be "cheap"

I'd love to look into this.

mitchellh avatar Apr 09 '13 22:04 mitchellh

I looked into spot instance requests, they are extremely slow (5 to 10 minutes sometimes). I have a prototype implementation which records a spot request id in the data_dir. I don't know if that is the correct approach. Maybe the simplest would be to implement separate commands for that.

tralamazza avatar Apr 09 '13 22:04 tralamazza

Oh great! I was going to look into this later this week because it's something I really want: an easier interface for one-off spot instances to do big crunching. Can you throw your code up into a branch on your fork?

kamalmarhubi avatar Apr 09 '13 23:04 kamalmarhubi

@tralamazza Bumpity bump! Do you think you'll keep going with yours?

kamalmarhubi avatar Apr 24 '13 13:04 kamalmarhubi

:+1:

alexgorbatchev avatar May 07 '13 22:05 alexgorbatchev

~~I will push my work here https://github.com/tralamazza/vagrant-aws/tree/spot_commands~~

tralamazza avatar May 20 '13 13:05 tralamazza

Thanks! I'll take a look when I get some time. Are you still working on it?

kamalmarhubi avatar Jun 08 '13 21:06 kamalmarhubi

I have a working version here. To use it you must specify the spot_max_price and set spot_instance to true.

# ...
aws.region_config "eu-west-1" do |region|
  # ...
  region.spot_instance = true
  region.spot_max_price = "0.2"
end
$> vagrant up --provider=aws

Note: these are one-off spot requests. Note2: this branch also contains PRs #31 and #93

tralamazza avatar Jul 09 '13 13:07 tralamazza

+1

@mitchellh Do you have a plan to merge this feature from the @tralamazza 's branch? If there is something to do, I wanna contribute it.

wutali avatar Aug 27 '13 15:08 wutali

:+1:

nabeken avatar Sep 26 '13 07:09 nabeken

Anyone tried this patch? Any feedback?

tralamazza avatar Sep 26 '13 15:09 tralamazza

@tralamazza I tried your changes and it works well. I fixed a minor problem at https://github.com/nabeken/vagrant-aws/commit/86ff6b62e48dd8e8467f0d8a58e31480235ec53b

A parallel acceptance test with a combination of vagrant-aws + spot instance + Jenkins dramatically accelerates the tests and also keeps down costs:satisfied:

nabeken avatar Oct 11 '13 04:10 nabeken

@nabeken nice! thanks.

tralamazza avatar Oct 11 '13 16:10 tralamazza

Vagrant + Spot instances would be great!

spullara avatar Jan 04 '14 03:01 spullara

I would like to get it

jfmwz avatar Jan 07 '14 12:01 jfmwz

Implementing it will be very useful.

agarwlGaurav avatar Apr 08 '14 17:04 agarwlGaurav

:+1:

yuku avatar May 14 '14 01:05 yuku

Building on the work @nabeken did, I've merged in the latest changes from master at https://github.com/varju/vagrant-aws/commit/0bb9f27454b7a40dfcecde0bfc86d89f665771e0

varju avatar May 14 '14 23:05 varju

I'd love for this to get merged. It's incredibly useful and will save me a lot of money! :+1:

maccman avatar May 21 '14 14:05 maccman

FYI: I've rebased spot instance support on current master at https://github.com/nabeken/vagrant-aws/tree/spot-3

nabeken avatar Jul 31 '14 08:07 nabeken

This would be useful for me too.

michaelbarton avatar Aug 13 '14 20:08 michaelbarton

:+1:

mizzy avatar Oct 20 '14 06:10 mizzy

oh yes please :+1:

tknerr avatar Oct 28 '14 07:10 tknerr

+1

randywallace avatar Nov 13 '14 05:11 randywallace

:+1: Would be an awesome feature. In the meantime, I'm going to check out @nabeken's implementation.

cadams500 avatar Nov 13 '14 05:11 cadams500

:+1: any ETA for release?

KostyaSha avatar Nov 23 '14 19:11 KostyaSha

:+1: for merging this

mrdavidlaing avatar Dec 02 '14 13:12 mrdavidlaing

I want this feature :+1:

mrkn avatar Feb 14 '15 07:02 mrkn