My Journey with Packer

Standard

Lately i have been playing around with Packer 0.5.2 (packer.io). Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.

Since I am doing a lot of testing and repetitive tasks, it seemed to be a good tool. At first i wanted to create a normal VM for Fusion, no problem, later i wanted to add my VMs to my vCenter (manual import, no problem) and finally i wanted to automate the whole process (creation, import, registration). After some trial and error, a visit to the Packer Google Group, I now have a fully automated process for creating VMs for my vCenter and Locally for Fusion.

Where do one begin?

My Packer/ISO Directory is: /Users/TheDude/packer/ISO
My Build/Source Directory is: /Users/TheDude/Build/{scripts,kickstart}

In order to serve the ISO and Kickstart files i use the local Python HTTP server. Just remember that the web server’s root i.e. / is where you launch the command:
python -m SimpleHTTPServer &;

Python HTTP Server shell script (startHTTP.sh) located in my /Users/TheDude/ directory.

#!/bin/sh
python -m SimpleHTTPServer &

Leave a Reply