Announcing Packer-MAAS for creating custom MAAS images

Introduction

Packer is a tool for building operating system images. Packer accepts a template which describes how an image should be built. The installation is done by the operating system vendor’s own tools. Canonical has created templates for CentOS, RHEL, and VMware ESXi. These templates contain post-processing hooks to convert the image into either a tar.gz or dd.gz which can be used by MAAS.

Images can be customized by making changes to the kickstart files. See README.md in the operating system’s directory for more information.

Getting Started

  1. Install Packer on Ubuntu 18.04+
  2. Checkout Packer MAAS
    git clone --recurse-submodules git@github.com:canonical/packer-maas.git
  3. cd into the directory of the template you wish to use
  4. Run Packer as specified in README.md
4 Likes

Why is there no template for building Ubuntu images using Packer?

We suggest using the official Ubuntu images from Canonical and customizing them with cloud-init, as is done with other clouds, or Curtin preseeds.

Is this vmware ESXi vcenter autoregistration working for you ? I’m getting:

/vmfs/volumes/f571cf7d-1a1a9f99-ddee-38c33bfa02f3/maas/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.9.1) or chardet (3.0.4) doesn't match a supported version!
  RequestsDependencyWarning)
Traceback (most recent call last):
  File "/altbootbank/maas/vcenter", line 23, in <module>
    from requests.exceptions import (
  File "/vmfs/volumes/f571cf7d-1a1a9f99-ddee-38c33bfa02f3/maas/requests/__init__.py", line 105, in <module>
    from urllib3.exceptions import DependencyWarning
ImportError: cannot import name 'DependencyWarning'

seems like issue in a versions of a libraries.