amazon-ebs builder spot instance

438 views
Skip to first unread message

Graham Rye

unread,
Feb 26, 2014, 6:34:51 PM2/26/14
to packe...@googlegroups.com
I'm just starting with packer and evaluating whether it will fit my workflow.

Is it possible to use a spot instance for the packer builder to keep costs down? I need to create cc2.8xlarge images and the spot price can be a tenth of the on-demand price. I guess I could fire up a spot cc2.8xlarge and then use amazon-chroot builder but that just adds an extra level of complexity.

Cheers

Graham

Shane Meyers

unread,
Feb 26, 2014, 6:59:19 PM2/26/14
to packe...@googlegroups.com
cc2.8xlarge instances use HVM AMIs. You could build your AMI on a
different instance type and use it on the cc2.8xlarge. I build my HVM
AMIs using Packer on c3.large instances and the AMIs work fine on our
cc2.8xlarge instances.

Building the AMI on c3.large on-demand instances ($0.15/hr) would still
be less money than spot cc2.8xlarge (~$0.27/hr in us-east-1 today) on a
per hour basis. I'm not sure how long your instances will take to
build, but for a data point mine take about 20 minutes on c3.large, so
the cost is never greater than one hour of usage.

-shane
> --
> You received this message because you are subscribed to the Google
> Groups "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to packer-tool...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Graham Rye

unread,
Feb 26, 2014, 7:02:30 PM2/26/14
to packe...@googlegroups.com
Hi Shane

That's a good idea. I'll have a look at the relative pricing and give that a shot.

Cheers

Graham

Henry Huang

unread,
May 8, 2014, 1:39:38 AM5/8/14
to packe...@googlegroups.com
Hi, Graham

I have submitted two PRs to make the packer support spot instance launching. Now it works.
If you have any interests, you could have a try.
 1. <PR #1> Packer relies on the Go AWS library "goamz": https://github.com/mitchellh/goamz/pull/41
 2. <PR #2> Patch on Packer to support spot instance launching: https://github.com/mitchellh/packer/pull/1139
You could compile the packer and use it.
 
If you have any questions or comments, please let me know.
Thanks
Henry
Reply all
Reply to author
Forward
0 new messages