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
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.
- Build reproducible machine images for AWS, Azure, and GCP using a single Packer HCL2 template
- Integrate Ansible as a Packer provisioner for complex multi-step image configuration
- Test images automatically with InSpec or Goss before publishing to cloud image catalogs
- Build images in CI pipelines with GitHub Actions or GitLab CI using OIDC for credential-free cloud auth
- Manage image lifecycle with versioned tags and Terraform data sources for downstream consumption
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