Packer is free and open-source software for creating identical machine images or containers for multiple platforms from a single source configuration.[1] It was written by Mitchell Hashimoto and became one of the products in his company Hashicorp's software toolkits as open-source proprietary-managed software.[2] It is associated with the Vagrant container management tool, also written by Hashimoto.

Applications

edit

Packer can be used in a number of applications, including as a component in a Continuous integration and/or Continuous delivery workflow. The images that Packer creates can easily be turned into Vagrant boxes. Any updates to an image become available to the users through Vagrant cloud (a cloud service also from Hashicorp) or Atlas. The users can then update their copies of the image by running certain Vagrant commands. The Hashicorp Terraform system deployment product can use Packer as a container, and the Hashicorp Atlas workflow tool includes Vagrant, Packer, Serf, and Terraform as component tools. Packer can be used to create and maintain different project development environments.

Usage

edit

Packer takes a configuration template and produces machine image as per instructions in the template. Templates are usually JSON files and can contain following sections:

  • builders - This section holds an array of objects that Packer should use to generate different machine images. Each builder object generates an image for a specific platform. By default, Packer comes with builders for several platforms like VMware, VirtualBox, AWS EC2, Google compute engine, Docker etc. New builders can be added to Packer via plug-ins.
  • description - description of what the template does.
  • min_packer_version - minimum Packer version required to parse the template to ensure that proper versions of Packer are used with the template. Packer supports Backward compatibility
  • post-processors - Defines the various post-processing steps to take with the built images. For instance, the built image can be converted to Vagrant box format.
  • provisioners - To install additional software beyond the base operating system software.
  • variables - defines user variables contained in the template

While other fields are optional, builders is a mandatory section in a template


Chef can use Packer for container creation via the Bento toolkit. [3] [4]

See Also

edit

References

edit
  1. ^ "Packer". Retrieved December 3, 2013.
  2. ^ "Hashicorp". Retrieved April 24, 2015.
  3. ^ "Chef for Containers". Retrieved April 24, 2014.
  4. ^ "Bento". Retrieved April 24, 2015.
edit