Skip to content

Instantly share code, notes, and snippets.

@chenhan1218
Last active October 7, 2019 04:38
Show Gist options
  • Save chenhan1218/f2fbd2a732dbfef989d6462dcd30e584 to your computer and use it in GitHub Desktop.
Save chenhan1218/f2fbd2a732dbfef989d6462dcd30e584 to your computer and use it in GitHub Desktop.
Memo for customize maas (curtin) image

Memo Date: 2018-07-18 MAAS version: 2.3

Curtin’s assumption is that a fairly rich Linux (Ubuntu) environment is booted.

But if your image is not Linux (Ubuntu) based, you could customize the image via:

  1. Understand curtin stages
    http://curtin.readthedocs.io/en/latest/topics/config.html
    Stages:
    [early, partititoning, network, extract, curthooks, hooks, late]

  2. Customize stages via curtin userdata preseed
    https://docs.maas.io/2.3/en/nodes-custom

  3. Custom curtin hooks
    http://curtin.readthedocs.io/en/latest/topics/curthooks.html
    /curtin/curtin-hooks

  4. Maas reporting via /curtin/finalize as a workaround (If cloud-init is not feasible):
    http://curtin.readthedocs.io/en/latest/topics/curthooks.html#finalize-hook
    https://bazaar.launchpad.net/~roadmr/curtinator/trunk/view/head:/curtinator-oem/hooks/finalize

  5. cloud-init and openssh-server in target machine

  • a. Networking initialization
  • b. MAAS reporting "Deployed"
  • c. setup ubuntu user and ssh authorized key.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment