Allow passing cloud-init user-data on deployment and power-on via UI

Currently it is only possible to specify cloudinit-userdata via API and not via the UI which hides this functionality from a user. It would be good to have this functionality exposed to provide similar experience to private and public cloud platforms (e.g. OpenStack or AWS allow you to specify userdata before deployment).

Various ways to provide userdata:

  1. enlistment time (via preseed files in /etc/maas);
  2. deployment time (api call);
    https://github.com/maas/maas/blob/2.4.2/src/maasserver/api/machines.py#L509-L515
  3. power-on (api call).
    https://github.com/maas/maas/blob/2.4.2/src/maasserver/api/nodes.py#L745-L751
maas maas machine deploy <system_id> user_data=<b64-encoded userdata>
maas maas machine power-on <system_id> user_data=<b64-encoded userdata>

Other community feedback from the old LP entry: https://bugs.launchpad.net/maas/+bug/1794080/comments/2

4 Likes

I second this proposal. It could also include some useful examples.

1 Like

Hi igor, any examples will be highly appreciated! :slight_smile:

I think having a drop down to specify user_data in the deployment dialog would be an excellent idea. We could also allow user_data to be stored in MAAS to make it easy to do multiple deployments without having to reupload it.

+1 on that, we already had several requests from the customers asking for that feature to let them have full control over node deployment flow without referring to CLI and/or API queries.

From my perspective, I can see the following options:

  1. (quick-fix) Just add an input somewhere around “Deploy” dialog to supply arbitrary user_data (as a shellscript)
  2. (more nicer) Add a possibility to upload custom user-data scripts and let user choose from dropdown, if he wants to apply one
  3. (the cherry on the cake) Add a possibility to select user-data scripts from the above list as a default for the whole resource pool/rack controller/for the whole MAAS-controlled nodes/whatever else.
4 Likes

any update on this request?

I can’t believe this wasn’t the first time
like vlgrevtsev mention at least the 2nd point should be an option if we can assign cloud-inits depending on tags that will be the best!

Thanks in advance

The “quick-fix” that @vlgrevtsev mentioned, i.e. allowing to pass a raw cloud-init script at deploy time, is currently targeted to be released in 2.9.

We realize that making it possible to upload scripts that you can either select at deploy time, or having them automatically selected based on tag/machine would be more useful, but we weren’t able to fit it into the current roadmap.

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.