mitchellh / vagrant-aws

Use Vagrant to manage your EC2 and VPC instances.
MIT License
2.61k stars 572 forks source link

Support Spot Instances #32

Open iangcarroll opened 11 years ago

iangcarroll commented 11 years ago

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

tralamazza commented 11 years ago

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

kamalmarhubi commented 11 years ago

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.

mitchellh commented 11 years ago

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.

tralamazza commented 11 years ago

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.

kamalmarhubi commented 11 years ago

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 commented 11 years ago

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

alexgorbatchev commented 11 years ago

:+1:

tralamazza commented 11 years ago

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

kamalmarhubi commented 11 years ago

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

tralamazza commented 11 years ago

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

wutali commented 11 years ago

+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.

nabeken commented 11 years ago

:+1:

tralamazza commented 11 years ago

Anyone tried this patch? Any feedback?

nabeken commented 11 years ago

@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:

tralamazza commented 11 years ago

@nabeken nice! thanks.

spullara commented 10 years ago

Vagrant + Spot instances would be great!

jfmwz commented 10 years ago

I would like to get it

agarwlGaurav commented 10 years ago

Implementing it will be very useful.

yuku commented 10 years ago

:+1:

varju commented 10 years ago

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

maccman commented 10 years ago

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

nabeken commented 10 years ago

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

michaelbarton commented 10 years ago

This would be useful for me too.

mizzy commented 10 years ago

:+1:

tknerr commented 10 years ago

oh yes please :+1:

randywallace commented 10 years ago

+1

cadams500 commented 10 years ago

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

KostyaSha commented 10 years ago

:+1: any ETA for release?

mrdavidlaing commented 9 years ago

:+1: for merging this

mrkn commented 9 years ago

I want this feature :+1:

haoyuan commented 9 years ago

Any update on this?

shvenkat commented 9 years ago

Rebased onto current master at https://github.com/KariusDx/vagrant-aws/tree/spot

dgreene3p commented 9 years ago

If I could vote more than +1 this I would

kalehrishi commented 9 years ago

any ETA when this will be in master?

sebastiang commented 9 years ago

+1

haoyuan commented 9 years ago

+1

ghost commented 9 years ago

+1

yuzhu commented 9 years ago

+1

fganglberger commented 9 years ago

+1

davidski commented 9 years ago

There have been outstanding PRs for this feature for over a year. @mitchellh - What can the user community do to help get this accepted and released in the main branch?

kalehrishi commented 9 years ago

@mitchellh It would be nice to have this feature.

ermaker commented 8 years ago

@mitchellh Any plans?

3vcloud commented 8 years ago

There were issues with EBS settings not being passed through, and tagging wasn't working either. The tagging is more of a fog limitation, but I've added code to tag the server after its up to solve that one.

Created a pull request for https://github.com/KariusDx/vagrant-aws/tree/spot aswell

VVMichaelSawyer commented 8 years ago

+1

poflynn commented 8 years ago

+1

StevenVanAcker commented 8 years ago

+1

mh720 commented 8 years ago

@rtyler could you assist with this PR?

mblanche commented 8 years ago

Is there any development on this request? Pulled the spot_instances branch just to find that it was a stalled branch with broken features. Spot request would be a great addition to the aws plugin

jhedev commented 8 years ago

@mblanche Not sure if this helps you: I made a fork with some fixes to get it working. See here: https://github.com/jhedev/vagrant-aws/tree/spot (branch spot). I'm using it already and it works great. So maybe this is useful until the fixes are merged upstream...

javnav commented 7 years ago

Hi @jhedev I just forked your repo and I'm trying to install the plugin with spot support. Unfortunately, I got this error: Unable to resolve dependency: user requested 'vagrant-aws (= 0.7.2.spot)'. Sorry guys, but I don't understand what I'm doing wrong. These are my steps:

$ git checkout spot
$ gem build vagrant-aws.gemspec
$ vagrant plugin install vagrant-aws-0.7.2.spot.gem
Unable to resolve dependency: user requested 'vagrant-aws (= 0.7.2.spot)'

Can you help me, please?