Build Hadron Images
Hadron is Spectro Cloud's minimal, immutable Edge operating system, built on the CNCF Kairos project. Like other Kairos-based images, Hadron uses an A/B partitioning scheme for atomic upgrades and rollback. With Palette Edge, you can build Hadron-based images for your connected Edge hosts using the EdgeForge workflow.
In this guide, you use the CanvOS utility to build a Hadron-based Edge installer ISO and provider images for a connected cluster deployment.
The supported Hadron version is v0.5.1.
Limitations
-
Hadron support applies to connected Edge clusters only. Air-gapped and appliance deployments are a separate effort and are not covered by this workflow.
-
Hadron supports all Palette Edge Kubernetes distributions except Canonical Kubernetes, which is available only on Ubuntu.
-
Unified Kernel Image (UKI) is not supported with Hadron.
-
Two-node clusters are not supported with Hadron.
Prerequisites
-
A Palette registration token for pairing Edge hosts with Palette. You need Tenant Admin access to Palette to generate a new registration token. For detailed instructions, refer to the Create Registration Token guide.
-
A physical or virtual Linux machine with an AMD64 (also known as
x86_64) processor architecture and the following minimum hardware configuration:- 4 CPUs
- 8 GB of memory
- 150 GB of storage
-
A user account with permission to run commands using
sudoprivileges. -
Access to a public or private image registry and permissions to push images. This page uses a public Docker Hub registry as an example. If you need to use a private registry, refer to the Deploy Cluster with a Private Provider Registry guide for instructions on how to configure the credentials.
-
The following software installed on the Linux machine:
-
Docker Engine installed from the official Docker repository with BuildKit enabled. Default in Docker 23+; set
DOCKER_BUILDKIT=1for older versions.warningDo not use the snap-packaged Docker. The snap confinement causes GPG signature verification failures during the Earthly build.
Build Hadron-based Images
-
Check out the CanvOS GitHub repository, which contains the starter code.
git clone https://github.com/spectrocloud/CanvOS.git -
Navigate to the
CanvOSdirectory.cd CanvOS -
Fetch the list of git tags and check out the newest available tag.
git fetch --tags
git checkout "$(git tag --sort=-v:refname | head --lines=1)" -
Issue the command below to create an
.argfile. Configure the Hadron OS (OS_DISTRIBUTION=hadron), versionv0.5.1(OS_VERSION=v0.5.1), and the AMD64 architecture (ARCH=amd64). Replace the remaining placeholders with the necessary values. When you setOS_DISTRIBUTION=hadronandOS_VERSION=v0.5.1, the build resolves the published Kairos Hadron base image, so you do not need to build a base image first. Refer to Edge Artifact Build Configurations for more information on.argparameters.cat << EOF > .arg
IMAGE_REGISTRY=<image-registry>
OS_DISTRIBUTION=hadron
OS_VERSION=v0.5.1
IMAGE_REPO=<image-repository>
K8S_DISTRIBUTION=<k8s-distribution>
K8S_VERSION=<k8s-version>
ARCH=amd64
EOFThe supported
K8S_DISTRIBUTIONvalues for Hadron arekubeadm,kubeadm-fips,rke2, andk3s. Refer to Edge Artifact Build Configurations for more information on.argparameters. -
Prepare the
user-datafile. Refer to Prepare User Data and Argument Files for instructions. -
After the
user-datafile is ready, issue the following command to build the ISO image.sudo ./earthly.sh +isoThe build process takes some time to finish.
# Output condensed for readability
===================== Earthly Build SUCCESS =====================The ISO image is found in the
buildfolder.
Validate
You can validate that the ISO image has not been corrupted by attempting to flash a bootable device. Most software that creates a bootable device will validate the ISO image before the flash process.