Skip to content

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.

Set additional_cloud_init_config_file in orchestrator_config.yml to the absolute path of this file. Orchestrator validates the file and publishes its common and per-functional-group directives through the OpenCHAMI provisioning workflow. Leave the setting empty to disable additional cloud-init.

Parameter Reference

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. The key must exactly match a FUNCTIONAL_GROUP_NAME from pxe_mapping_file.csv (for example, slurm_node_rhel_10_0_aarch64 or os_rhel_10_0_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: $OMNIA_DATA_PATH/orchestrator/input/$OMNIA_PROJECT_NAME/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_rhel_10_0_aarch64:
    runcmd:
      - echo "Slurm node setup" >> /var/log/custom.log
  os_rhel_10_0_x86_64:
    write_files:
      - path: /etc/profile.d/cluster.sh
        content: |
          export CLUSTER_NAME=mycluster
        permissions: '0644'

Unsupported keys

The following keys are platform-managed and must not be used in this file: bootcmd, network, network-config, packages. Orchestrator input validation rejects these keys before provisioning.

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 exactly match FUNCTIONAL_GROUP_NAME values in pxe_mapping_file.csv; copy the value from the active project rather than deriving or shortening it.

Validation

The Orchestrator validate phase checks that the configured file exists, is readable YAML, and contains only common and groups at the top level. It validates write_files entries, runcmd strings, permissions, encodings, boolean append values, prohibited keys, and functional-group names against the active PXE mapping file.

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.