What is packer

Shivanand Mishra
2 min readMar 27, 2021

--

Packer is widely known as Provisioner as software. It is provided by Hashicrop.

In DevOps, world engineers use it for creating identical machine images for various platforms.

It automates the creation of images such as AWS AMI images.

How to install : (MACOS)

brew tap hashicorp/tap

brew install hashicorp/tap/packer

brew upgrade hashicorp/tap/packer

Now just use packer on CLI and verify

To check version user packer — — version but sometimes it won't work so use packer version

How to install : (Windows)

choco install packer

If you are unable to proceed on windows create a VM(like Ubuntu) and use it for packer.

How to install : (Linux)

curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -

sudo apt-add-repository “deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main”

sudo apt-get update && sudo apt-get install packer

Now just use packer on CLI and verify

To check version user packer — — version but sometimes it won't work so use packer version

You can also Download manually and use it from here

Why do we use packer:

It is useful in automatic deployment and helps us to use Terraform, Chef, Puppet, Ansible etc.

It also helps us to setup the environment for our application with the help of a builder.

As an example Like it helps to up a cluster on AWS/Azure.

Packer template:

$ packer inspect packer.json 
iso_md5 =
iso_path =
switch_name = Default Switch

Builders:

hyperv-iso
parallels-iso
virtualbox-iso
vmware-iso

Provisioners:

powershell
windows-restart

(In next part will brief about the template)

--

--

Shivanand Mishra
Shivanand Mishra

Written by Shivanand Mishra

DevOps | Solution architect | Cloud Engineer | AWS SysOps Admin | Automation | Product enthu | Ex: Amazon, Airtel, Simplilearn, Paytm

No responses yet