This commit is contained in:
2026-03-05 03:13:45 -08:00
parent 692d3fbad9
commit 810b9743f6
6 changed files with 61 additions and 9 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/bin/bash -e
if [ "${ENABLE_CLOUD_INIT}" != "1" ]; then
log "Skipping cloud-init stage"
exit 0
fi
SEED_DIR="${ROOTFS_DIR}/var/lib/cloud/seed/nocloud"
mkdir -p "${SEED_DIR}"
install -v -m 644 files/meta-data-amd64 "${SEED_DIR}/meta-data"
install -v -m 644 files/user-data "${SEED_DIR}/user-data"
install -v -m 644 files/network-config "${SEED_DIR}/network-config"
+15
View File
@@ -0,0 +1,15 @@
Cloud-Init support for amd64 (PC/Desktop)
Reference: https://cloudinit.readthedocs.io/
Config files are installed to /var/lib/cloud/seed/nocloud/ which is the
standard NoCloud datasource seed directory for non-RPi systems.
- files/network-config Network configuration template (netplan format)
- files/user-data Example user-data configuration
- files/meta-data-amd64 Cloud-init instance config (instance_id: chillcraftos-image)
The NoCloud datasource is used so cloud-init picks up config from the local
seed directory on first boot without requiring a network metadata service.
+15
View File
@@ -0,0 +1,15 @@
Cloud-Init support for Raspberry Pi (ARM)
Reference for Raspberry Pi custom cloud-init config module: https://cloudinit.readthedocs.io/en/latest/reference/modules.html#raspberry-pi-configuration
Config files are installed to /boot/firmware/ so they are accessible from the
boot partition before the root filesystem is fully mounted.
- files/network-config Network configuration template (netplan format)
- files/user-data Example user-data configuration
- files/meta-data Cloud-init instance config (instance_id: rpios-image)
The rpi-cloud-init-mods package (from 00-packages-arm-only) provides additional
Raspberry Pi specific cloud-init modules.
-9
View File
@@ -1,9 +0,0 @@
Cloud-Init support for Raspberry Pi OS
Reference for Raspberry Pi custom cloud-init config module: https://cloudinit.readthedocs.io/en/latest/reference/modules.html#raspberry-pi-configuration
- files/network-config is required because otherwise imager would fail to create the correct filesystem entry
- files/user-data same reason and to include some example configurations
- files/meta-data Cloud-init instance configuration
@@ -0,0 +1,18 @@
# This is the meta-data configuration file for cloud-init. Please refer to the
# cloud-init documentation for more information:
#
# https://cloudinit.readthedocs.io/
# Set the datasource mode to "local". This ensures that user-data is acted upon
# prior to bringing up the network (because everything about the datasource is
# assumed to be local). If you wish to use an HTTP datasource instead, you can
# change this to "net" or override it on the kernel cmdline (see README).
dsmode: local
# Specifies the "unique" identifier of the instance. Typically in cloud-init
# this is generated by the owning cloud and is actually unique (to some
# degree). Here our data-source is local, so this is just a fixed string.
# Warning: changing this will cause cloud-init to assume it is running on a
# "new" instance, and to go through first time setup again (the value is
# compared to a cached copy).
instance_id: chillcraftos-image