Contents

Packer Introduction

Explanation on what is packer and its basic usage

Website Visitors:

Do you want to start learning Packer, but don’t know where to start? Don’t worry, we got you covered. In this article, we will explain what is packer all about, and its uses.

What is Packer

Packer is an open source tool designed by Hashicorp company for creating images from existing instances/VMs. Packer is available for multiple platforms and it also runs on all major operating systems. Packer can create images for your VMs both on the cloud and on-prem environments. Packer would be very useful if you want to create multiple immutable environments.

An image which is referred here is a template (in VMware terminology) which is created from an instance running with an operating system and optionally, some software’s installed already. In simple words, Packer can create images from existing servers. You can then use these images to create additional new servers.

Info
If you are coming from VMware environment, you’d create a new VM, install all the softwares, optionally run sysprep, shutdown the VM and convert it to a template. This is called a template in VMware terminology. In Packer terminology it is called image. Packer script that you write to create an image is called template file.

Packer will:

  • Create a new instance.

  • Run custom scripts which you specify or run commands or call in configuration management software like Ansible to perform some additional tasks like installing software.

  • Once the instance is ready, Packer will then create an image from it. You can then use this image to deploy additional instances/VMs.

When automating, Terraform can pickup an image created by Packer for creating instances in your infrastructure. If any changes are required to your base image, you can add them using the configuration tools like Chef or Puppet and then use Packer to create an image. As Packer is very light weight tool, it can also be used with your continuous delivery pipeline.

Using Packer you can deploy multiple instances to your cloud infrastructure at same time. This will be useful when you’re creating multiple environments like prod and dev at same time.

Do not confuse Packer with Chef or Puppet. Packer can only create images from an existing instance whereas Chef or Puppet can install software on the images. They are more like configuration management tools.

Suggested Article

Now that you know what is Packer and its uses, continue reading our other article Packer Definitions here. All other DevOps categories are listed here: DevOps Tools. Have a look at the posts as per your topic of interest.

Conclusion

In this tutorial, we’ve explained about Packer and its uses. We hope you have learned something new in this article.

Please feel free to share your thoughts about this article in the comments section below.

Your inbox needs more DevOps articles.

Subscribe to get our latest content by email.