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

Use spot instances

Open galindro opened this issue 8 years ago • 12 comments

Expected behavior

It would be very nice to launch a spotfleet in place of autoscaling group for node (worker) nodes or, even better, make this choice configurable by the user. This will make AWS EC2 price more cheaper than using only on-demand instances.

Actual behavior

Today isn't possible to launch spot instances to be used in worker nodes.

galindro avatar Apr 04 '17 15:04 galindro

I agree

arkaitzmugica avatar Apr 26 '17 13:04 arkaitzmugica

+1

skymaster420 avatar Jul 07 '17 11:07 skymaster420

+1

ccamp46 avatar Jul 07 '17 14:07 ccamp46

Guys, any return??

galindro avatar Jul 24 '17 21:07 galindro

This isn't something we can support right now, we will need to wait until we convert to using infrakit, once we do that, it will be possible.

kencochrane avatar Jul 24 '17 21:07 kencochrane

Is it technically not possible to work with spot instances, or can the cloudformation template be manually customized to achieve it? If yes, does anyone have any guidance or code samples on how to do it? tx

JohanVanHoye avatar Sep 01 '17 08:09 JohanVanHoye

@Eoan242 I'm not 100% sure, but I believe it is possible, you would just need to customize the template to support the spot instances.

kencochrane avatar Sep 01 '17 12:09 kencochrane

Thanks for that. I'm pretty new to all of this so "just need to customize the template" is at this point not within my powers... but with the help of some examples/tutorials I might be able to figure it out.

JohanVanHoye avatar Sep 01 '17 12:09 JohanVanHoye

FYI: Autospotting is a github project which addresses this requirement generically. https://github.com/cristim/autospotting It automatically brings up spot-bid instances which are compatible to the ones in your Docker for AWS Auto Scaling Groups; then yanks your on-demand swarm nodes out of the ASG one at a time, each time putting a spot equivalent in place. Have just been testing on my worker ASG and it seems to work quite well :)

JohanVanHoye avatar Sep 09 '17 13:09 JohanVanHoye

Is there a timeline for when Docker for AWS will be converted to use InfraKit? I'm also very interested in launching worker nodes with spot instances, or even mixing them with on-demand instances.

kinghuang avatar Mar 15 '18 00:03 kinghuang

@kinghuang please checkout Infrakit's repo, for a spot-instance example: https://github.com/docker/infrakit/blob/master/examples/playbooks/aws/provision-spot-instance.yml

FrenchBen avatar Mar 15 '18 00:03 FrenchBen

@FrenchBen Thanks, I'll take a look at that!

kinghuang avatar Mar 15 '18 16:03 kinghuang