Skip to content

Instantly share code, notes, and snippets.

@smoser
Last active May 5, 2021 12:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smoser/e917b2873aff767cb454cb0513a564a4 to your computer and use it in GitHub Desktop.
Save smoser/e917b2873aff767cb454cb0513a564a4 to your computer and use it in GitHub Desktop.
MAAS and curtin: installing with Ubuntu proposed

MAAS and curtin and installing with Ubuntu proposed

The installer used in MAAS is curtin

The Stable Release Updates is the process which controls new packages being accepted into Ubuntu stable releases. In order to test these packages before they are made available to all users, enable the proposed 'pocket' in ubuntu.

To affect configuration of curtin in MAAS the user currently has to change files on the MAAS regional controller system in /etc/maas/preseeds/. Specific nodes or operating systems can be affected as described in MAAS docs. Due to the way that maas selects the template used is beyond the scope of this document. For the sake of simplicity, assume changes below are made to:

/etc/maas/preseeds/curtin_userdata

A feature request has been made (LP: #1719978) to allow providing install config on a per-install basis.

These changes can be done in a few different ways as shown below.

Note: This does not modify the install environment, but rather the installed environment. For info on how to build images with -proposed enabled see this gist

Apply all updates that are in proposed

To enable the proposed archive, and then apply those updates in the installed system before the first boot add the following stanza:

apt:
  sources:
    proposed.list:
       source: deb $MIRROR {{release}}-proposed main universe multiverse

system_upgrade:
  enabled: True

Curtin will enable the proposed pocket and then perform the equivalent of a apt-get dist-upgrade inside the target before rebooting.

Add proposed and install a specific package

Often you might be interested in testing a specific package or list of packages from proposed, but do not want to add all things. To do this we can follow the documentation on enabling proposed.

This relies upon Tempita rendering of '{{release}}' by MAAS.

apt:
  sources:
    proposed.list:
       source: deb $MIRROR {{release}}-proposed main

late_commands:
  99_install_packages: ['curtin', 'in-target', '--',
                        'env', 'DEBIAN_FRONTEND=noninteractive',
                        'apt-get', 'install', '-qy',
                        'cloud-init/{{release}}-proposed']

write_files:
  proposed_pin:
    path: /etc/apt/preferences.d/proposed-updates
    content: |
      Package: *
      Pin: release a={{release}}-proposed
      Pin-Priority: 400
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment