How does curtin, cloud-init and the ephemeral image work?

Hi, I wanted to understand how dos cloud-init, curtin and the ephemeral image work together.
I’m trying to write the role of each in the MAAS architecture.

Cloud-init has two configuration sources:

  1. Cloud provider-supplied metadata: this stage happens before the image installation.
    Is this where curtin goes? it’s the configuration defined in curtin that goes in this stage?

  2. User-supply configuration runs after the machine has Deployed.
    Here it’s the files that the user can run when they deploy a machine correct?

Ephemeral images, use cloud-init to discover the node’s hardware (e.g., number of CPUs,RAM, disk, etc.) and send that information to the MAAS Region controller.

So ephemeral images also use cloud-init.

Curtin

Curtin applies customization during operating system (OS) image installation. System parameterssuch as the type of kernel, disk partitioning, network configuration, swap memory configura-tion, among others, can be preconfigured in a preseed file that will automatically configureimages during the installation process

What I wanted to understand is the chronology of these events, what calls what and when.
And what are the differences between them.

Thanks for the help

@jbacelo

@jbacelo, just noticed this one. do you still need the answer? don’t know off the top of my heat, but i can probably play with MAAS and figure it out – if you still need to know.

If this information is even loosely documented somewhere (or a set of somewheres here and elsewhere) I’d like to read it. Can you recommend any links? What little we’ve achieved with Curtin configuratio, for example, has been from patchy material we have found over the years, plus a bit of trial and error.

https://curtin.readthedocs.io/en/latest/topics/overview.html
curtin 22.1 documentation

I’d also like some more info on this if anyone comes across it. I’m attempting to fully manage a raspberry pi cluster from MaaS. Following some pcaps I did while MaaS was commissioning an a generic amd64 server, I was able to create a dhcp snippet that allows MaaS to PXE boot and mount the squashfs image provided by MaaS but I’m unable to get MaaS to commission the machine and I suspect it has to do with the initial scripts passed by curtain.

https://curtin.readthedocs.io/en/latest/topics/overview.html#stages-1
Stages for curtin.
Check your network config.
https://curtin.readthedocs.io/en/latest/topics/networking.html#networking-1
“Currently curtin only supports network config version=1.”

1 Like

Well, a while back I came up with this diagram, which is part of this document. Dunno if this helps.

1 Like

Yes it helps! I wrote up a machine lifecycle document on our internal pages a while back and included a link to that page for user edification.

1 Like