Hello MAAS Community!
I’ve been exploring the capabilities of MAAS and have found it to be an incredibly powerful tool for managing and provisioning machines. However, during my exploration, I’ve come across a potential area for enhancement that I’d like to discuss.
Currently, MAAS supports running custom scripts during the Commissioning stage. This is a powerful feature that allows for a wide range of tasks to be performed, such as firmware updates or RAID configuration. However, these tasks are performed as part of the existing Commissioning stage, and there’s no built-in way to add completely new stages to the MAAS machine lifecycle (right?).
I propose the idea of a “two-staged commissioning” process, or more broadly, the ability to add custom stages to the MAAS machine lifecycle. The idea behind this is to allow for more granular control over the machine setup process and to accommodate tasks that might not fit neatly into the existing Commissioning, Testing, or Deployment stages.
For instance, in the “two-staged commissioning” process, the first stage could be a standard commissioning stage, and the second stage could be used for tasks like upgrading all firmware and configuring hardware RAID according to different use cases (KVM host, DB, Ceph OSD, DRBD, CMDB, etc). This would ensure that the machine is truly “Ready” to be deployed with a pre-configured RAID array that Linux “doesn’t see the individual SSDs and HDDs”, simplifying the storage layout setup we see in the MaaS UI for the final Deployment stage.
Another potential use case for custom stages could be to “live-run” scripts against “Deployed” machines, similar to a Live CD running in memory. This could be used to keep the firmware up-to-date without requiring a full “Release->Re-Commission->Deploy” cycle just to upgrade firmware.
I understand that some of these tasks can potentially be achieved using the conventional scripts in MAAS, but this also involves MaaS’ Ephemeral OS, which might not fully support all the diverse tools from different vendors. A custom stage could potentially provide a more flexible solution.
I’m interested to hear what the community thinks about this idea. Does it make sense? Are there better ways of achieving this with MAAS today, if not, are there plans for similar features in the future?
Looking forward to your thoughts and feedback.