Packer vs PXE Kickstart

1,511 views
Skip to first unread message

Chris Gibbs

unread,
Jul 22, 2014, 6:15:34 PM7/22/14
to packe...@googlegroups.com
We have been considering updating our build process from currently a semi-manual process. We have implemented Foreman for server orchestration and life cycle. From this we are able to build each host on request via a PXE and kickstart process. It works ok but there are a lot of moving parts to ensure that it is built correctly. We are provisioning into vmware and AWS using this process.

The host creation from scratch takes a bit of time but it works and is automated which ticked our main requirement.

However, I happened to watch a puppetconf presentation by Michael Hashimoto about Vagrant and it just happened to mix in packer.

This got us fairly interested, as we saw potential to speed up our build process by using packer images instead of PXE/kickstart.

We have a number of concerns though and without yet having tried it:

  • Extra management for maintaining an image
  • How much to push into the image to start with. I.e. we don't want to overlap on the puppet control as we would like to prevent drift in long running instances.
  • How does the imaging process work, i.e. how does the baked image cater for the size of the disk volume in the instance. I'm assuming some kind of ghost like block copy and expand to suit?

We would welcome any feedback / comments on others that have gone through the process already.

Cheers,

Alvaro Miranda Aguilera

unread,
Jul 22, 2014, 9:50:06 PM7/22/14
to packe...@googlegroups.com
Hello there.

I can understand you are interested into AWS, and I have zero knowledge there.


If you see the picture attached, that is a weekend project I did 2 weekends ago, basically using virtualbox I did this.

iso + packer virtualbox-iso => oracle6-minimal

oracle6-minimal + packer virtualbox-ovf => oracle6
oracle6-minimal + packer virtualbox-ovf => oracle6-preinstall
oracle6-minimal + packer virtualbox-ovf => oracle6-<n>

so I have a base box that I reuse and I create new boxes

If you can share what is you base OS, and you want to start from iso or a base image, etc, I can have a look in to doing something like this.

Alvaro.


--
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/d/optout.

Packer_multi_state.png

Jason Beranek

unread,
Jul 23, 2014, 12:21:10 AM7/23/14
to packe...@googlegroups.com
Chris,

I have never worked a full production workflow, but I had played with a semi-manual process using PXE/kickstart before looking at tools like Vagrant.  What particularly appealed to me was the concept of taking things like kickstart files or additional provisioning script (be it shell scripts, Puppet manifests, or Chef recipes), and automating image builds with something like Jenkins.  

Several of the Packer builders (e.g., vmware-iso, virtualbox-iso, qemu, etc) build VMs from iso files, boot commands, and associated setup scripts (e.g., kickstart files).  These processes feel very similar to a PXE boot type process, and you can reuse your boot commands and kickstart files largely as is with these builders.

To your concerns, my thoughts:

  • Image Management: AWS and VMware server tooling should help with some aspects of image management, but you'll need to determine how many instances of an imagine you wish to keep. Outside of storage, to me this is actually not a bad trade compared to some of the PXE stuff you won't need to manage.
  • How much to push into the image:  One use case for Packer is to bake most of your configuration into an image, and then connect it into your configuration management tool to keep it updated from there.  You save time with the initial provisioning, but still can handle a long running instance staying configured.  Packer's puppet provisioner can also use the same puppet manifests you would use in production when building the image.
  • How does image processing/sizing work: this is a harder question to answer, because it depends on the builder and what is supported by the target environment.  Packer builders I've worked with all rely on the tools of the target platform (vmware or virtualbox) to build images, so Packer does not bring any sizing magic that a given platform does not natively support.  The only exception to this are some of the post-processors, like the Vagrant post-processor, which supports compressing the the builder artifacts and supporting files for distribution.
Hope that helps.  I'd highly recommend running a few experiments with reusing your kickstart files from your PXE setup, along with some of your puppet manifests to get a feel for the behavior and what might work for you.

-Jason

 


--

Chris Gibbs

unread,
Jul 29, 2014, 6:33:17 PM7/29/14
to packe...@googlegroups.com
Thanks for the responses guys, I think I will have to have a play.

We are  running Cent OS 6.5 x64 as our base. We are also a windows shop and the tooling that we are implementing would be great if it is able to build up Windows images as well. Looking at the specs, it seems possible with Packer.

I think it would be a benefit for us to have faster provisioning and then hand off to puppet to maintain the drift.

Cheers,
Reply all
Reply to author
Forward
0 new messages