Skip to content

Instantly share code, notes, and snippets.

@kincl
Last active August 15, 2023 12:42
Show Gist options
  • Save kincl/6d0bbf93817806ffea0e47eb9ce0e188 to your computer and use it in GitHub Desktop.
Save kincl/6d0bbf93817806ffea0e47eb9ce0e188 to your computer and use it in GitHub Desktop.
Adding to existing ignition config with butane

step 1: get butane

Butane is a tool for converting our hand-written butane configuration into the "machine-read" ignition configuration.

Get butane from our OCP mirror

step 2: butane config

I pulled the chrony butane config from our docs as a starting place but with some customizations.

This assumes that the ignition file we are adding to is in the current directory and is named bootstrap.ign.

variant: fcos
version: 1.3.0
ignition:
  config:
    merge:
      - local: bootstrap.ign
storage:
  files:
  - path: /etc/chrony.conf
    mode: 0644
    overwrite: true
    contents:
      inline: |
        pool 0.rhel.pool.ntp.org iburst
        driftfile /var/lib/chrony/drift
        makestep 1.0 3
        rtcsync
        logdir /var/log/chrony

Note

This generated valid ignition for 4.13

step 3: run butane

$ butane -d . chrony.bu > bootstrap-with-chrony.ign
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment