Packer is an open source tool for creating identical machine images for multiple platforms from a single source configuration. Packer is lightweight, runs on every major operating system, and is highly performant, creating machine images for multiple platforms in parallel.
This project demonstrates how to use Packer, Ansible, and Terraform to automate the creation and deployment of a custom image on Azure. The custom image is built using Packer with Ansible provisioner for configuration management, and then deployed on Azure using Terraform.
- Azure subscription
- Azure CLI
- Packer
- Ansible
- Terraform
Follow the steps below to use this project:
-
Clone the repository:
git clone https://github.com/IHEEB22/HashicorpPacker.git
-
Navigate to the packer templates directory:
cd packer_templates
-
Run packer format :
packer fmt <file_name>
-
validate the pakcer template file :
packer validate <file_name>
-
Build the packer template file :
packer build <file_name>
-
Inspect the template file :
packer inspect <file_name>