HashiCorp’s Packer becomes more Windows-friendly

HashiCorp’s Packer becomes more Windows-friendly

The latest version of machine image creation tool Packer has been released, bringing a greater focus on Windows and the ability to set variables to set other variables.

Version 1.4.0 features beta-level support for those of you creating Windows containers using the tool’s Docker builder. This seems to fit with increased efforts in the Docker camp to make their platform more Windows, and therefore enterprise, friendly.

Developers wanting to build images for OpenStack can now use force_delete if needed. For authentication with the platform, they are able to draw on application credentials instead of a user/password combo.

Meanwhile, an enhancement to the amazon-chroot builder lets you specify custom block device mappings when building from an existing image. In earlier versions such a reconfiguration wasn’t an option, since new mappings were simply overwritten.

To define variables that depend on other variables, Packer 1.4 lets you reference user variables set in the variables section of the Packer template within that section. Users are now also able to switch to using go mod to manage dependencies, and Packer will select an alternative VNC port if the initial one is busy.

Provisioners in version 1.4 come with a timeout parameter: if set, the provisioner will be canceled once the specified time has passed. A newly introduced sleep provisioner on the other hand will sleep for as long as the duration setting suggests.

Packer is an open-source project started by HashiCorp in 2013. It was the software company’s first tool, and meant for creating consistent machine images for multiple platforms, such as VirtualBox, VMware, and EC2, from a single configuration.

Since it is more on the lightweight side, Packer can be comparabilly easy integrated into continuous delivery pipelines, where it would be able to for example react to changes in configuration management tools such as Chef or Puppet.