cloud-init icon indicating copy to clipboard operation
cloud-init copied to clipboard

[docs]: x-shellscript-per-boot is not properly documented

Open ei-grad opened this issue 6 months ago • 2 comments

Documentation request

Document text/x-shellscript-per-boot / text/x-shellscript-per-instance / text/x-shellscript-per-once in User-data formats.

What’s missing

  • A subsection explaining the three “per-*” script frequencies:
    • per-boot – runs at every boot
    • per-instance – runs once per instance (first boot only)
    • per-once – runs exactly once ever
  • Corresponding rows in the Content-Type table (alongside text/x-shellscript).
  • A minimal multipart example showing all three MIME types.
  • Pointers to the handler (cloudinit/handlers/shell_script_by_frequency.py), the modules (cc_scripts_per_boot, cc_scripts_per_instance, cc_scripts_per_once), and the on-disk script directories under /var/lib/cloud/scripts/.

Where to update

doc/rtd/explanation/format.rst (plus cross-link from doc/rtd/explanation/modules.rst).

Why

The feature is implemented, stable, and surfaced by cloud-init devel make-mime --list-types, yet undocumented. Proper docs will prevent user confusion and support load.

Related

#4197

ei-grad avatar Jul 03 '25 10:07 ei-grad

Thanks for the bug report. These are shown using a custom MIME archive, but agreed that there should be more explanation.

TheRealFalcon avatar Jul 03 '25 14:07 TheRealFalcon

Hello

Thank a lot about this issue. Was useful to understand where to deploy a script. Mime archives page is not very adapted to understand how to set its script.

Thanks

camlafit avatar Nov 04 '25 15:11 camlafit