Giter VIP home page Giter VIP logo

packer-ubuntu-zfs's Introduction

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 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 focal template is the most complete, and includes the following changes compared to other versions:

  • Support for AWS NVME device rules
  • Support for expanding the ZFS root filesystem via Cloud-Init
  • Clearing of the apt-cache as part of the build

These changes could likely be backported to other distributions, but they are mostly there for information only since I personally only use (and test) the latest LTS distribution for new images.

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:

packer-ubuntu-zfs's People

Contributors

fred-vogt avatar jen20 avatar rnctx avatar tomerpaz76 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.