Packer is a command line tool that allows the building of repeatable machines from ISO's these can then be built for different environments including:

  • Digital Ocean
  • AWS
  • Vmware
  • Virtualbox

These can be provisioned using a number for different methods including:

  • Puppet
  • Ansible
  • Bash scripts

Packer uses JSON files to configure the build type and where files should be downloaded from.

An overview of the steps that packer goes through are as follows:

  1. Configure the builder with the specified options.
  2. Fetch specified ISO for building and run checksum against the image to verify the download.
  3. Build the image and apply any provisioning options selected.
  4. Produce the "artifact" of the build and the artifact can be anything from a docker container to an aws machine spun up in the cloud running the image.

This can be a very useful tool when you have to make the same image repeatedly but need to only build on new changes e.g. a version bump or new major version.

but the best way to master packer is to play with community templates and edit them to suit your needs. This will help with learning the syntax. Have fun. Stay safe