Skip to content

additional_cloud_init.yml Reference

File path: /opt/omnia/input/additional_cloud_init.yml

This file provides additional cloud-init configuration for stateless node provisioning. It allows writing files and running commands on nodes during the cloud-init final stage.

Additional cloud-init Configuration Parameters

Parameter

Details

common

dict

Cloud-init configuration applied to ALL nodes. Entries here are merged into every node's cloud-init payload.

Default: {}.

write_files

list / elements=dict

List of files to write on all nodes. Each entry follows the cloud-init write_files module format (path, content, permissions, etc.).

runcmd

list / elements=string

List of commands to run at the final cloud-init stage on all nodes. Commands are appended to platform-defined runcmd lists.

groups

dict

Per-functional-group cloud-init overrides. Each key must match a functional group name defined in pxe_mapping_file.csv. Group-specific entries are merged after common entries.

Default: {}.

<group_name>

dict

Cloud-init overrides for a specific functional group. Key must match a group name from pxe_mapping_file.csv (e.g., slurm_node_x86_64, os_x86_64).

write_files

list / elements=dict

List of files to write on nodes belonging to this functional group.

runcmd

list / elements=string

List of commands to run at the final cloud-init stage on nodes belonging to this functional group.

Usage example

File: /opt/omnia/input/additional_cloud_init.yml
---
# Common cloud-init applied to ALL nodes
common:
  write_files:
    - path: /etc/motd
      content: "Welcome to the HPC cluster\n"
      permissions: '0644'
  runcmd:
    - echo "Custom node setup complete" >> /var/log/custom_setup.log

# Per-functional-group cloud-init overrides
groups:
  slurm_node_x86_64:
    runcmd:
      - echo "Slurm node setup" >> /var/log/custom.log
  os_x86_64:
    write_files:
      - path: /etc/profile.d/cluster.sh
        content: |
          export CLUSTER_NAME=mycluster
        permissions: '0644'

Prohibited keys

The following keys are platform-managed and must not be used in this file: bootcmd, network, network-config, packages. Validation will fail if any of these are present.

Note

  • Platform-defined defaults always take precedence (merge_how: no_replace).
  • User entries are appended to platform lists (write_files, runcmd).
  • Group-specific entries are merged after common entries.
  • Group names must match functional groups defined in pxe_mapping_file.csv.

Info

  • This file is optional and can be used to add custom cloud-init configuration to the platform.
  • Refer official cloud-init documentation for write_files and runcmd for more details.