How to include cloud-config files from removable devices
Elemental Teal supports loading cloud-config files from specific block devices.
In particular supports loading cloud-config files from an ISO having
CIDATA as the volume ID or any vFAT formatted
device labeled with
CIDATA. If a device matching this criteria is found on early boot the Elemental client will
read it and look for a
user-data file in its root.
As an example an ISO including a cloud-config file can be created on a Linux host with the procedure below.
user-data file with the cloud-config data in it. In the example below we just set a
- path: /etc/sysconfig/proxy
user-data file exists create an ISO including only this file by using the
mkisofs Linux utility:
mkisof -o cidata.iso -V CIDATA -J -r user-data
The result is an ISO labeled with
CIDATA including the
At boot the
user-data file will be copied as is to
/oem/user-data and in case it contains cloud-config data
an extra copy will be added as
/oem/user-data.yaml. The file
/oem/user-data.yaml will be parsed
on any later cloud-init stage.
Since the data is copied to
/oem it will be persistent, hence on follow up reboots the removable device is
not required to be present any more. If still present on follow up reboots, it just overwrites any
aleady pre-existing data.
Include non cloud-config data
user-data is not containing cloud-config data the Elemental client will just copy it as
*.yaml files are parsed when executing cloud-init stages, so in that
case the file will be ignored by cloud-init services.
user-data contains a script the Elemental client will, in addition, try to execute it. The way
Elemental client determines if
user-data is a script or not is by the presence of a Shebang in the
first line. For example, the previous
user-data file could be rewritten as:
cat <<EOF >> /etc/sysconfig/proxy