packer

Packer Templates

Packer GitHub Pages MIT License Packer AWS Buy Me A Coffee

HashiCorp Packer templates for building AWS AMIs and machine images with automated provisioning.

Templates

Template Description Provider
ami-aws.json Base AWS AMI with custom provisioning AWS EBS
aws-1.json AWS machine image configuration #1 AWS EBS
aws-2.json AWS machine image configuration #2 AWS EBS
redis-ami.json Redis server AMI template AWS EBS
redis-ami-digitalocean.json Redis server image for DigitalOcean DigitalOcean

Prerequisites

Quick Start

# Clone the repo
git clone https://github.com/hammadhaqqani/packer.git
cd packer

# Validate a template
packer validate ami-aws.json

# Build an AMI
packer build ami-aws.json

Project Structure

.
├── ami-aws.json                    # Base AWS AMI template
├── aws-1.json                      # AWS image config #1
├── aws-2.json                      # AWS image config #2
├── redis-ami.json                  # Redis AMI for AWS
├── redis-ami-digitalocean.json     # Redis image for DigitalOcean
├── first.sh                        # Provisioning shell script
├── welcome.txt                     # Welcome message for instances
└── .github/workflows/
    ├── packer.yml                  # CI: packer validate + fmt check
    └── pages.yml                   # GitHub Pages deployment

CI/CD

Every push runs automated validation via GitHub Actions:

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Author

Hammad Haqqani — DevOps Architect & Cloud Engineer


If you find this useful, consider buying me a coffee!

Buy Me A Coffee