Packer is an open source tool for creating virtual machine images for later deployment.
Packer is lightweight and runs on all major operating systems, and it is highly performant, creating identical virtual machine images for multiple platforms in parallel from a single configuration file.
A machine image is pre-configured operating system and installed software which is used to quickly create new running machines.
Machine image formats change for each platform. Some examples include AMIs for EC2, VMDK/VMX files for VMware, OVF exports for VirtualBox, etc.
Packer comes with support to build images for Amazon EC2, Google Compute Engine, Microsoft Azure, VirtualBox, VMware, CloudStack, DigitalOcean, Docker, and more.
Packer Installation :
Download the pre-compiled binary file from Downloads page.
If you are using Linux Box, move the binary file to /usr/local/bin directory and verify it.
$ wget https://releases.hashicorp.com/packer/1.3.3/packer_1.3.3_linux_amd64.zip $ unzip packer_1.3.3_linux_amd64.zip $ sudo mv packer /usr/local/bin/ $ packer version Packer v1.3.3
If you are using windows, add the packer binary path to PATH variable in Environment variables.
Available commands are:
- build build image(s) from template
- fix fixes templates from old versions of packer
- inspect see components of a template
- validate check that a template is valid
- version Prints the Packer version