Packer templates for building AWS AMI and portable OVA virtual machines images.
Useful for AWS EC2 & EKS, IoT edge sites, Kubernetes base servers etc.
Bare metal servers can be installed using each Linux distro's native automated installers.
Virtual Machines as appliances in portable OVA format are 100% automated using the installers above.
The primary templates are for the main Linux distributions:
- Amazon Linux - based off existing AMI
- Ubuntu - using Ubuntu AutoInstaller
- Debian - using Debian Preseeding
- Redhat - using Redhat Kickstart
- Redhat Enterprise Linux (RHEL)
- CentOS (end-of-life)
- Rocky Linux (CentOS replacement)
- Fedora
VM OVA appliances can be created in any number of different virtualization systems supported by Packer.
You must install your virtualization system before running Packer.
The following builds are provided for these combinations of Linux distros, arches and virtualization systems:
Running make <distro>
will build the portable virtual machine OVA for that Linux distribution 100% automated using that distro's native installer's automation method:
make debian
results in:
output-debian/debian-12.ova
output-debian/debian-12.md5
output-debian/debian-12.sha512
You can then just import the debian.ova
file on any virtualization platform such as VMware vSphere or your local VirtualBox.
Tweak the corresponding text files for that distro eg.
*.pkr.hcl
installers/*
scripts/*
and then re-run
make <distro>
or for a specific build:
make <distro>-<major_version>
For more details, tips and tricks including how to debug Packer builds, read the Knowledge-Base - Packer page.
A heavily documented generic Packer template can be found in the HariSekhon/Templates repo:
https://github.com/HariSekhon/Templates/blob/master/template.pkr.hcl
HariSekhon/Templates - template.pkrvars.hcl
The rest of my original source repos are here.
Pre-built Docker images are available on my DockerHub.