Misc Tech Notes

Sön 29 Januari 2017

More automation with packer

Posted by Peter Reuterås in Tips   

I've written about automation before and how I strive to automate as much of my repetitive tasks as possible. My earlier automation scripts to configure SIFT, REMnux and other tools all required a manual installation of the operating system. Like all manual steps this introduced error and differences between different VMs. After working in a SIFT VM for an hour I recently found that I forgot to change the memory from the default of 1 GB. Other times it's been the disk, or the type of Ubuntu that was installed etc. Manual steps introduces errors and inconsistency.

For some time I've had packer.io on my list of tools to try. Finally this week I dived in to the documentation and searched Google for some examples. I also looked at an introduction to Packer on Pluralsight. After some trial and errors and also running in to a new bug in Ubuntu that broke my earlier install scripts I now have template configuration to install:

You can find the repo on Github. There is still a lot more to automate (templates for Fedora, CentOS) and use more features in Packer (variables and more). I also should make sure that all configurations are similar in choice of timezone etc.

Soon it will only require a couple of git clone and running some make install to for example use my AFAR script to analyze files (earlier post).

Live by the motto: Automate all the tings! :)