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 bootcimages useOSTreefor atomic updates and rollbacks. Ignition integrates withOSTreeby mounting the/vardirectory writable during theinitramfsphase, enabling configuration changes to persist.The following sequence describes the Ignition boot process:
- The boot loader passes the
ignition.firstbootkernel parameter. - The
initramfsloads and starts Ignition services. - Ignition fetches the configuration from the platform-specific data source.
- Ignition mounts
/varwritable and applies the configuration. - The
initramfstransitions to the real root file system. - After the first boot completes, the system removes the firstboot marker.
- The boot loader passes the
- Benefits of using
Ignition - To keep your core operating system image generic and reusable across your entire infrastructure, you can use
Ignitionto inject environment-specific configuration during boot, which enables a "build once, configure at runtime" approach. This approach has the following benefits:
- How Ignition works with
- 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
JSONconfiguration file. - Runs on first boot only: Ignition executes a single time during initial provisioning. This prevents accidental re-configurations on subsequent restarts.