Skip to content

Packer templates for Ubuntu AMIs with a ZFS Root filesystem.

License

Notifications You must be signed in to change notification settings

jpr5/packer-ubuntu-zfs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Packer Templates for Ubuntu with ZFS Root

This repository contains Packer templates for building Amazon Machine Images for Ubuntu with a ZFS root filesystem. Currently the following distributions are supported:

  • Ubuntu 24.04 ("Noble") LTS with AWS-Optimized Kernel
  • Ubuntu 20.04 ("Focal") LTS with AWS-Optimized Kernel
  • Ubuntu 18.04 ("Bionic") LTS with AWS-Optimized Kernel
  • Ubuntu 16.04 ("Xenial") LTS with AWS-Optimized Kernel

The template is easily modified for Debian and other Ubuntu distributions.

You can read about how this template works on the jen20.dev blog. Some relevant posts:

Differences between versions

As well as installing different versions of the Ubuntu distribution, the templates in this repository have evolved at different rates. The noble template is the most complete.

Running a build (Noble)

Use the noble target of the Makefile in the root of the repository to build an AMI in us-west-2. If you wish to copy the AMI to other regions, edit the template to specify aws_regions in the amazon-ebssurrogate.source source.

AWS credentials are sourced from the environment using the standard AWS chain exposed by Packer. SSH auth sock is also passed through, to enable accessing otherwise private GIT repos if you so wish.

The template has been tested using v1.9.4 of Packer.

Running a build (Focal)

Use the focal target of the Makefile in the root of the repository to build an AMI in us-west-2. If you wish to copy the AMI to other regions, edit the template to specify aws_regions in the amazon-ebssurrogate.source source. It is also possible to change the region in which the AMI is built directly, though editing files/sources-us-west-2.list is necessary if the initial packages must be obtained from a region other than us-west-2.

AWS credentials are sourced from the environment using the standard AWS chain exposed by Packer. The template has only been tested using v1.6.0 of Packer - the latest available at the time of writing.

Running a build (Bionic and Xenial)

Use the bionic or xenial targets of the Makefile in root of the repository to build an AMI in us-west-2, and copy it to all regions. Use a recent version of Packer - version 1.3.1 has been tested.

The following environment variables must be set in order for the build to succeed:

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY

Credits

Thanks to:

About

Packer templates for Ubuntu AMIs with a ZFS Root filesystem.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 46.5%
  • Python 32.3%
  • HCL 19.5%
  • Makefile 1.7%