Packer — understand how it works in couple minutes

What exactly is packer ?

How start with Packer ?

packer build -var "version=$VAGRANT_BOX_VERSION.$NOW" -var box-config.json

Packer Installation

How to use Packer to build Azure ARM Image

az ad sp create-for-rbac --query "{ client_id: appId, client_secret: password, tenant_id: tenant }"
"client_id": "xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"client_secret": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"tenant_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
packer validate ubuntu.json
Template validated successfully.
packer build ubuntu.json

How to use Packer to build Vagrant Box

packer build -var "version=1.0.0" -var "cloud_token=xxxxxxxxxxxxxxxxxxxxxx.yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" box-config.json


DevOps Consultant. I’m strongly focused on automation, security, and reliability.