13 ms·
Packer is a tool for creating identical machine images for multiple platforms
- mitchellh 13y agoHey everyone. Packer guy here. I've been working on Packer the past couple months and I think its time to bring this to the public. I'm happy to answer any questions you have. I want to stress that this is the _first public release_. There is a lot of work to be done and a lot of improvements to be made. It may not be "production ready" but it is definitely "experimentation ready." Although I know many companies already starting to use this in production. I also want to note that although I made Vagrant as well, Packer is not tied to Vagrant in ANY WAY. Packer stands on its own as an extremely useful tool. However, Packer can be used to make Vagrant boxes, as well. ENJOY!
- RyanZAG 13y agoA tutorial showing every step from start to finish for creating something simple, such as a webserver running a database with some custom html pages would be really great. The docs look good, but it's hard to see which steps to follow in what order for someone who hasn't tried to automate this kind of thing before.
- TallGuyShort 13y agoWhen you're configuring the image, is the network stack usable? I currently use Boxgrinder, and the most frustrating limitation is that I can't start and interact with network daemons to initialize things that way, because it's really just a chroot jail (in the Linux sense). Consequently, I have to isolate the embedded databases of the services I'm configuring and install them directly as files.
- mitchellh 13y agoYes, everything is usable.
- xorgar831 13y agoHow does packer compare to boxgrinder?
- tom_usher 13y agoThis looks great, nice work. For the dev/prod parity use case, where do you usually draw the line between Packer and Vagrant? I'm currently building boxes with Veewee with all dependencies pre-installed and distributing this to the team. Vagrant could easily deal with this, installing dependencies when the VM is launched using provisioners. Does anyone have any preferences/reasons to go one way or another?
- mitchellh 13y agoIt depends on what works best for you. In big organizations, I prefer to take the Veewee approach (although in this case replacing Veewee with Packer). If you use Veewee, see: http://www.packer.io/docs/templates/veewee-to-packer.html http://www.packer.io/docs/templates/veewee-to-packer.html
- tlrobinson 13y agoGreat stuff! I hope this means we'll see a bunch of identical prepackaged Vagrant boxes for all these platforms soon.
- mitchellh 13y agoYes, yes you will. The Vagrant boxes are now being built with Packer (but not uploaded yet).
- AjithAntony 13y agoOn your high level descriptions of your tools, like packer, and vagrant, when you say "VMware" you really need to start being clear about which products you specifically support.
- mitchellh 13y agoIt is intentionally vague as I intend to support all of them. I apologize for the confusion, however.
- geetarista 13y agoFor anyone coming from veewee, there is a tool for converting templates to packer: https://github.com/mitchellh/veewee-to-packer https://github.com/mitchellh/veewee-to-packer
- mitchellh 13y agoAnd more user-friendly docs for that: http://www.packer.io/docs/templates/veewee-to-packer.html http://www.packer.io/docs/templates/veewee-to-packer.html
- bpatrianakos 13y agoI could totally use this! The only question I have is can you exclude certain things. I'd want to clone 95% of a production server but then would need to exclude SSL settings and such.
- mitchellh 13y agoYou choose what you want in the final images, so you can exclude whatever you'd like. You basically have complete control over what gets installed, it doesn't hold your hand in any way, really.
- NHQ 13y agoneat!
- csears 13y agoCan Packer build Windows images?
- mitchellh 13y agoIt is missing a single crucial feature, but yes it will be ABLE to. The next release. It can currently build OS X machines fine though.
- deleted 13y ago[deleted]
- tmzt 13y agoIs it possible to build AMIs offline? Why is it starting an instance for the source AMI?
- mitchellh 13y agoIt is explained in the opening paragraphs here[1] but I'll explain. There are two ways to make AMIs: EBS-backed or instance-store. For instance-store, you basically need to debootstrap a chroot or something like that. You can do this offline, technically. EBS-backed you just launch a source AMI, build on that, then re-snapshot it. For the purposes of a 0.1, Packer currently only supports the EBS-backed approach. This is not a technical limitation, however, and in a future version I do want to add the ability to make instance store. [1]: http://www.packer.io/docs/builders/amazon-ebs.html http://www.packer.io/docs/builders/amazon-ebs.html
- tmzt 13y agoOkay, I guess the question was is it possible to pull down a source AMI without starting an instance, then build the new AMI based on that.
- mitchellh 13y agoNo, that's not planned. I've actually not seen/read anything that does this. If it is possible, it is certainly interesting, but I have a feeling that this would be very tricky.
- ksec 13y agoWritten in Ruby as well? Edit: Just Checked GitHub, it is Written in Go, Interesting..... Another sign of Ruby being painfully slow.
- nwjsmith 13y agoI doubt this is why Go was chosen over Ruby, it would be fast enough for this problem. It probably has more to do with distributing the software. Distributing programs in written in Go is _much_ easier that distributing them in Ruby, i.e. cross compile and ship the binary, but distribution of Ruby programs is hard. Too much time is wasted on 'omnibus' projects to distribute Ruby programs, just look at Chef or Sensu or Mitchell's own Vagrant installers project: https://github.com/mitchellh/vagrant-installers https://github.com/mitchellh/vagrant-installers (I don't mean to say those projects were a waste of time, but that it seems like this should be a 'solved' problem).
- mitchellh 13y agoDing ding. There are other reasons but this was a _big_ one.
- timmow 13y agoThis seems to me to be an issue that there is some disagreement on between devs and ops people - most devs are happy to distribute software with a Gemfile and see it as a solved problem. Ops packages tend to go the omnibus route like Chef has, or use Jruby and package as a Jar file like http://logstash.net/ http://logstash.net/ I wonder if there is anything developers can do as a community to help solve the problems these distributors feel they have?
- StavrosK 13y agoOkay, can someone please explain Packer/Vagrant/etc to me? The way I currently provision is using ansible, I have a script that goes from bare machine to serving the site in one command (http://www.stavros.io/posts/example-provisioning-and-deployment-ansible/ http://www.stavros.io/posts/example-provisioning-and-deploym...). How does something like Packer/Vagrant help me? From what I understand, all they do is create a VM, which just takes two seconds in VirtualBox anyway. There must be a benefit, since everyone is using them, but I'm missing it. Can anyone please explain?
- njharman 13y ago> How does something like Packer/Vagrant help me? Totally depends on what you need doing. Might want to check out use cases in the packer documentation. There is some overlap in all these tools. ThAnsible/Salt/Chef/Puppet tend to used to manage "live" OS's/systems, keeping them updated, deploying new builds to them. Although some like Ansible are more generic. Vagrant and Packer(I know little) manage images. Starting, stoping, provisioning (and often running one of the above Configuration Managments to finish customizing. Although some believe in running from pure AMI, updating them instead of the live systems). They get more power when there are many devs, lots of images. I.E. when you have enough complexity you need help managing it. If your small or simple (no negative connotation implied) they probably aren't worth it. I'm one man shop and use Ansible cause it's the right fit for that (although it's expanding fast).
- StavrosK 13y agoHmm, so what they do is generate an image, "freeze" and deploy it? I'm not very big on that philosophy, I prefer having a script to take the system from a clean state to the current state at all times, but I guess that's just preference. Maybe it's just that I don't have a big enough need for it, but I did see people using it for single VMs/servers, so I was wondering. Thanks for the explanation! Also, have you seen ansible's pull mode? I just saw it the other day and I am itching to try it, it looks phenomenal.
- dekz 13y ago
- zeckalpha 13y agoNot to be confused with https://github.com/keenerd/packer https://github.com/keenerd/packer
- Nux 13y agoSurprised not to see support for KVM.
- druiid 13y agoSounds interesting for sure. I don't see any built-in ability to generate qcow2 style images though. Are you going to add that? There are ways to convert (like from a virtualbox image), but having the built-in ability to create qcow2 would be great. Even better would be having a keystone/glance connector to upload generated images to Openstack!
- mitchellh 13y agoYep, definitely.
- nusbit 13y agoMay I als you why you choose golang, I am just interested im your opinion.
- lojack 13y agoI'm curious where this fits in with my Vagrant/chef workflow where I load a virtual environment with vagrant and provision both development environments and production environments with chef. Seems as though there's some overlap between how I provision environments and where this tool fits in. What would be the advantages moving this away from my provisioning tool and towards Packer?
- joemaller1 13y agoThis is seriously ambitious! Glad to see it, a tool for cloning existing boxes was the first thing I went looking for when I started using Vagrant.
- wnevets 13y agowould I use this instead of vagrant or with vagrant?
- mitchellh 13y agoOn its own or with Vagrant. Packer is useful on its own but also integrates well with Vagrant if you use it.
- jimmcslim 13y agoCan Packer meaningfully work with Docker.io? I gather there is some overlap, but is there a way they can work together? It seems to me: * Packer abstracts creation of images. * Vagrant abstracts running images, via a VM, and applying changes to images (via chef/puppet, although that seems to overlap with Packer as well). * Docker seems to abstract both creation of images (via docker build) and running of images (albeit only on top of LXC). To complicate things further, it seems like Vagrant has some initial support for running (Linux) images on top of LXC (via Fabio Rehm's plugin) and possibly on top of Docker (although the state of the plugin for this is vague). All this stuff seems very powerful, but the overlap is confusing. My head hurts...
- zimbatm 13y agoPacker mentions continuous delivery in the intro documentation[1]. Is there a scenario where you install the result on existing systems or do you rolling deploys with new VMs all the time ? I'm specifically thinking of services that need to maintain state like databases where the second scenario is not very handy. [1]: http://www.packer.io/intro/use-cases.html http://www.packer.io/intro/use-cases.html
- julnepht 13y agoIs there any PXE boot support with Packer ? How does Packer compare to Cobbler + Koan ?