Customizing MAAS deployments with cloud-init provides users a standard way to customize deployments, which is similar to any cloud environment out there. Using this path provides a good way to customize deployments across all Operating Systems that support cloud-init, and it is done after the machine has booted into the installed OS for the first time (after it is ‘Deployed’ in MAAS).

But how is this done? Well it’s quite easy. The only thing you need to do is to pass cloud-init user-data to a machine when deploying it over the API.

Examples

In this example we are going to customize the deployment by using cloud-init userdata. This means that the user will describe cloud-init configuration that will then be interpreted by cloud-init and executed upon on first boot.

Write a file that includes your cloud-init userdata (e.g. example.yaml)