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:

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?

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 image

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 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

  1. The user triggers MaaS to deploy by telling MaaS a) which bare metal to use, a.k.a. the target bare metal b) which image and kernel you want to deploy to.
  2. MaaS controls the target bare metal (usually via BMC) to power reset
  3. The target bare metal netboots via PXE service provided by MaaS
  4. The target bare metal boots into the ephemeral image provide by MaaS (via the previous PXE service)
  5. cloud-init in the system (booted by the ephemeral image on the target bare metal) is triggered to talk to MaaS when the previous boot process completes.
  6. MaaS offers the target bare metal more information and data because of the inquiry triggered by cloud-init previously.
  7. cloud-init triggers curtin to write data according to the information provided in the previous step. For example, curtin knows which disk of the target bare metal should be written with the target image.
  8. curtin completes to write the target image to the target disk of the target bare metal.
  9. cloud-init gets the return status of curtin's writing mission, and reports the execution status and log to MaaS.
  10. MaaS confirmed what cloud-init reported. If everything is ok, the target bare metal is rebooted by cloud-init, and MaaS chages the status of the target bare metal (the node) from "Deploying" to "Deployed" so MaaS will disable its PXE service for this deployed node.
  • Thanks a lot, that is a great explanation. – jbacelo Feb 2 at 14:18
  • @jbacelo if the answer helps, would you mind up-voting the answer, so we could help others to identify useful information more efficiently in the future? – tai271828 Feb 3 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.