Training Agenda

HashiCorp Packer

Packer automates the creation of machine images — AWS AMIs, Azure VM images, GCP images, VMware templates — from a single source configuration. Instead of manually configuring a server and snapshotting it, Packer defines the image as code: reproducible, version-controlled, and testable. The result is identical, pre-baked images that start faster and require fewer runtime configuration steps.

1 day On-site, remote, or hybrid Up to 20 participants German or English
What We Cover
Reproducible machine images for every major cloud platform — defined as code
Module 1

Core Concepts, HCL2 Templates & Builders

  • HCL2 template syntax: packer block (version constraints, required_plugins), source blocks, build blocks
  • Builder types: amazon-ebs (AMI creation), azure-arm (managed images), googlecompute, qemu, vsphere-iso
  • Communicators: SSH communicator configuration (username, key, timeout), WinRM for Windows images
  • Variables: input variable blocks, variable files (.pkrvars.hcl), PKR_VAR_ environment variables, locals
  • Input validation: validation blocks with condition and error_message for enforcing variable constraints
  • Multi-image builds: building identical images for multiple clouds from a single build block with multiple sources
  • packer init, validate, build: plugin installation, syntax validation, debug mode, machine-readable output
Module 2

Provisioners, Post-Processors & CI/CD Integration

  • Provisioner types: shell (inline and scripts), Ansible (ansible-local vs ansible), Chef Solo, file upload
  • Provisioner ordering and error handling: pause_before, max_retries, override per builder
  • Post-processors: manifest (JSON output of built artifacts), compress, shell-local for custom steps
  • Building images in CI: GitHub Actions and GitLab CI pipelines — credential injection, IAM role assumptions
  • Image testing: InSpec profiles for compliance testing, Goss for fast server spec validation after build
  • Terraform integration: using data sources (aws_ami, azurerm_image) to reference Packer-built images in Terraform
  • Image lifecycle management: versioning AMIs with semantic tags, deregistering old images, cross-region copying
Learning Outcomes
What your team walks away with

Participants can build reproducible, tested machine images for any major cloud platform using Packer HCL2 — and integrate image building as a first-class step in their infrastructure CI/CD pipeline.

Book the Packer training

Reach out to schedule a session for your team — remote, on-site, or hybrid, in German or English.

Get in touch