Packer

532 views
Skip to first unread message

Carl Quinn

unread,
Jul 2, 2013, 7:23:07 PM7/2/13
to amin...@googlegroups.com
Has anyone here taken a look at or tried out Packer (http://www.packer.io/)?

It has a nice JSON-based input scheme and way of chaining provisioners. I like Aminator's chroot approach to avoid launching, but Packer does look to do a better job in this other area.

Maybe an enhancement idea for Aminator?

K Vick

unread,
Jul 2, 2013, 8:11:15 PM7/2/13
to Carl Quinn, amin...@googlegroups.com

Funny you should mention packer, I was browsing the github repo just now as I was trying to get some inspiration from his step/multi-step provisioning.  I find myself wanting to do that in aminator.

This week I'm experimenting with adding the ability to have aminator run whatever scripts it finds in a directory after package install, but while still in the chroot.

Where I'll use this is aminating the Base AMI from the pristine Foundation AMI. 

The base build will look like this:

1. Jenkins builds a package containing cookbooks (thanks Berkshelf!) and node.json file which is needed to build the base.  This package also contains 1-n scripts in /var/local (the script installs chef-solo from URL, then runs chef-solo)
2. Aminate the package from above on a foundation AMI (just deliver cookbooks, node.json and the script(s)
   a. While still in the chroot and the package install is done (releasing the lock on the package db), aminator will look in the configured script location (e.g /var/local) and execute each script it finds there.  

This will give us the ability to deliver the scripts/cookbooks we need via a package and then run an arbitrary number of commands while still in the provision block.

Mike and I would like to be able to do this all via command-line rather than delivering scripts in packages, but we'd need a significant refactoring to support that.  

K



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

Brian Moyles

unread,
Jul 6, 2013, 2:38:15 AM7/6/13
to K Vick, Carl Quinn, amin...@googlegroups.com
I exchanged a few tweets with Mitch@Vagrant shortly after Packer was announced and he indicated that no-launch AMI production is in the works.

Carl Quinn

unread,
Jul 9, 2013, 9:06:42 PM7/9/13
to amin...@googlegroups.com, K Vick, Carl Quinn
And interesting combination with Packer is Docker. http://www.docker.io/

Packer + Vagrant + Docker ... seems like an interesting combo. Maybe Docker Images would make good intermediate application artifacts?

Mitchell Hashimoto

unread,
Jul 31, 2013, 2:46:21 AM7/31/13
to amin...@googlegroups.com, K Vick, Carl Quinn
Hi all,

I just joined this group to let you know that I just merged the no-launch AMI builder to Packer: https://github.com/mitchellh/packer/commit/ab73e65a59a154b95d9a16fc2173c8efca87ef3c

You can see it in action here: https://vimeo.com/71399041

It will be part of the next release, which should come next week, most likely. 

As far as I know, it matches most of the major features of Aminator:

* Meant to be run on an EC2 instance itself.
* Can read access tokens, region, etc. from the instance it is running on, if available.
* Mounts the root volume of another AMI onto the existing EC2 instance, uses a chroot to provision.
* Finds an available device (if not specified).
* File locks so that multiple Packer runs can be run in parallel, safely.
* Retains the block device mapping of the original AMI, but replaces the snapshot ID of the root device with the newly created snapshot.

And being part of Packer, it gets to take advantage of some of the common Packer features that are coming in (that are likely already Aminator features, but I'm unsure):

* Custom block device mapping
* Multi-region AMI distribution

Enjoy!

Best,
Mitchell

Brian Moyles

unread,
Aug 1, 2013, 5:21:24 PM8/1/13
to amin...@googlegroups.com
Sweet! I'll have to give this a spin soon. Thanks for the update, Mitch!

Brian
Reply all
Reply to author
Forward
0 new messages