About dynamic provisioning in bootc by using Ignition

Ignition is a first-boot provisioning system that configures Linux systems during the initramfs phase. You can use Ignition to dynamically configure bootc systems without maintaining multiple image variants.

Ignition runs only once, during the first boot of a system. It reads a declarative configuration file and applies the specified changes before the system transitions to the real root file system.

Ignition can perform the following configuration tasks:

  • Create users and groups
  • Add SSH authorized keys
  • Write files and directories
  • Configure systemd units
  • Set up disk partitions and file systems
  • Configure network settings
    How Ignition works with bootc

    bootc images use OSTree for atomic updates and rollbacks. Ignition integrates with OSTree by mounting the /var directory writable during the initramfs phase, enabling configuration changes to persist.

    The following sequence describes the Ignition boot process:

    1. The boot loader passes the ignition.firstboot kernel parameter.
    2. The initramfs loads and starts Ignition services.
    3. Ignition fetches the configuration from the platform-specific data source.
    4. Ignition mounts /var writable and applies the configuration.
    5. The initramfs transitions to the real root file system.
    6. After the first boot completes, the system removes the firstboot marker.
    Benefits of using Ignition
    To keep your core operating system image generic and reusable across your entire infrastructure, you can use Ignition to inject environment-specific configuration during boot, which enables a "build once, configure at runtime" approach. This approach has the following benefits:
  • Reduced image sprawl: Maintain a small set of base images instead of dozens of variants.
  • Dynamic configuration: Apply environment-specific settings such as DNS resolvers, NTP servers, and network parameters at boot time.
  • Declarative provisioning: Define the required system state in a JSON configuration file.
  • Runs on first boot only: Ignition executes a single time during initial provisioning. This prevents accidental re-configurations on subsequent restarts.