How to Setup Ignition with Warewulf on Rocky Linux 8.x
Introduction
As specified in the Warewulf Disk Management documentation, packages for ignition are not available for the Rocky Linux 8.x series. They are available for the Rocky Linux 9.x series as part of the Appstream
repository.
Symptoms
When you try to install gdisk
or ignition
on a Rocky Linux 8.x system, you will find it is not possible, due to the packages being unavailable in the repositories:
[root@Rocky-Linux-8-10-Test-Machine ~]# dnf install ignition
Last metadata expiration check: 0:04:50 ago on Fri 27 Dec 2024 05:46:44 AM UTC.
No match for argument: ignition
Error: Unable to find a match: ignition
Resolution
Prerequisites
You will require access to the root
account or a user with escalated privileges.
Build Ignition from source
When creating your container, add the following lines to your configuration:
&& (cd /tmp && git clone https://github.com/coreos/ignition.git) \
&& (cd /tmp/ignition && make all && make install) \
Example container creation with Warewulf and ignition on Rocky Linux 8.10
Current disk structure of the nodes:
[root@Rocky-Linux-8-10-Warewulf-Controller-Node ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 1024M 0 rom
vda 253:0 0 180G 0 disk
├─vda1 253:1 0 260M 0 part /boot/efi
└─vda2 253:2 0 179.8G 0 part /
The Warewulf Rocky Linux 8.10 container was used for testing:
wwctl container import docker://ghcr.io/warewulf/warewulf-rockylinux:8 rockylinux-8 --build
The following commands were all ran from the Controller Node:
Created a 1GB boot
partition for the Compute Node with ext4
and wiped the filesystem at boot:
wwctl node set --diskname /dev/vda --diskwipe --partname boot --partsize=1024 --partnumber 1 --partcreate --fsname boot --fsformat ext4 --fspath /boot --fswipe
Assigned the rest of the disk space to the root filesystem, formatted with btrfs
, and wiped the disk at boot for the Compute Node:
wwctl node set --diskname /dev/vda --partname root --partnumber 2 --partcreate --fsname root --fsformat btrfs --fspath / --fswipe
Output of how the Compute Node was configured:
[root@Rocky-Linux-8-10-Warewulf-Controller-Node ~]# wwctl node list -a warewulf-compute-node-1
NODE FIELD PROFILE VALUE
warewulf-compute-node-1 Id -- warewulf-compute-node-1
warewulf-compute-node-1 Comment default This profile is automatically included for each node
warewulf-compute-node-1 ContainerName default rockylinux-8
warewulf-compute-node-1 Ipxe -- (default)
warewulf-compute-node-1 RuntimeOverlay -- (generic)
warewulf-compute-node-1 SystemOverlay -- (wwinit)
warewulf-compute-node-1 Root -- (initramfs)
warewulf-compute-node-1 Discoverable -- false
warewulf-compute-node-1 Init -- (/sbin/init)
warewulf-compute-node-1 Kernel.Args -- (quiet crashkernel=no vga=791 net.naming-scheme=v238)
warewulf-compute-node-1 Profiles -- default
warewulf-compute-node-1 PrimaryNetDev -- (default)
warewulf-compute-node-1 NetDevs[default].Type -- (ethernet)
warewulf-compute-node-1 NetDevs[default].OnBoot -- (true)
warewulf-compute-node-1 NetDevs[default].Hwaddr -- 5a:00:05:3a:6f:5a
warewulf-compute-node-1 NetDevs[default].Ipaddr -- 10.25.96.4
warewulf-compute-node-1 NetDevs[default].Netmask default 255.255.240.0
warewulf-compute-node-1 NetDevs[default].Gateway default 10.25.96.3
warewulf-compute-node-1 NetDevs[default].Primary -- (true)
warewulf-compute-node-1 Disks[/dev/vda].WipeTable -- true
warewulf-compute-node-1 Disks[/dev/vda].Partitions[boot].Number -- 1
warewulf-compute-node-1 Disks[/dev/vda].Partitions[boot].SizeMiB -- 1024
warewulf-compute-node-1 Disks[/dev/vda].Partitions[boot].ShouldExist -- true
warewulf-compute-node-1 Disks[/dev/vda].Partitions[root].Number -- 3
warewulf-compute-node-1 Disks[/dev/vda].Partitions[root].ShouldExist -- true
warewulf-compute-node-1 FileSystems[/dev/disk/by-partlabel/boot].Format -- ext4
warewulf-compute-node-1 FileSystems[/dev/disk/by-partlabel/boot].Path -- /boot
warewulf-compute-node-1 FileSystems[/dev/disk/by-partlabel/boot].WipeFileSystem -- true
warewulf-compute-node-1 FileSystems[/dev/disk/by-partlabel/root].Format -- btrfs
warewulf-compute-node-1 FileSystems[/dev/disk/by-partlabel/root].Path -- /
warewulf-compute-node-1 FileSystems[/dev/disk/by-partlabel/root].WipeFileSystem -- true
Ran exec
to access the Rocky Linux 8.10 container:
wwctl container exec rockylinux-8 /bin/bash
Set up the environment, then cloned and built the Ignition Partition Management Module
from inside the container:
dnf groupinstall -y "Development Tools"
dnf install -y gdisk git libblkid-devel make
wget https://go.dev/dl/go1.23.4.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.23.4.linux-amd64.tar.gz
- Added the following to the end of the ~/.profile file:
cat << "EOF" | tee ~/.profile
export PATH=$PATH:/usr/local/go/bin
EOF
- Added
~/.profile
to$PATH
:
source ~/.profile
- Installed
ignition
:
cd /tmp && git clone https://github.com/coreos/ignition.git
cd /tmp/ignition && make all && make install
Ran exit
to then leave and rebuild the container.
Deployed the container to the Compute Node by restarting the node.
Notes
The above method is not officially supported by CIQ and is considered a workaround until the gdisk
and ignition
packages are available in the Rocky Linux 8.x repositories.
References & related articles
Ignition Filesystem Documentation: https://coreos.github.io/ignition/operator-notes/#filesystem-reuse-semantics/
Warewulf Disk Management: https://warewulf.org/docs/v4.5.x/contents/disks.html#disk-management/