Skip to main content

Build Steps Reference

Purpose: For operators, provides each build phase with inputs, outputs, duration, and failure modes.

Overview

opencenter-airgap build executes phases sequentially. Each phase checkpoints on completion, enabling --resume after failures.

Build Phases

Phase 1: Generate Manifest

FieldValue
Inputconfig/versions.env
Outputconfig/components.yaml
Duration< 5 seconds
Skipped whencomponents.yaml exists and versions.env unchanged (unless --force-regenerate)

Reads versions.env and produces components.yaml with resolved URLs, versions, and checksum references. Manual additions in components.yaml are preserved unless --force-regenerate is passed.

Failure mode: invalid variable in versions.env → exits with parse error and line number.

Phase 2: Clone Repositories

FieldValue
Inputrepositories section of components.yaml
Outputbuild/kubespray/, build/openCenter-gitops-base/
Duration1–5 minutes (depends on network and repo size)
Skipped whenRepos already cloned at the pinned commit SHA

Clones Git repositories at the commit SHA specified in versions.env. If KUBESPRAY_COMMIT_SHA=HEAD, clones the branch tip (not recommended for reproducibility).

Failure mode: network timeout or invalid SHA → retry with --resume.

Phase 3: Scan for Images

FieldValue
InputCloned repositories in build/
OutputUpdated images section in components.yaml
Duration10–30 seconds
Skipped whenNo repositories configured for auto-discovery

Parses YAML files in Kubespray roles (roles/*/defaults/main.yml) and gitops-base manifests for image: references. Merges discovered images into components.yaml, deduplicating by reference.

Failure mode: malformed YAML in scanned file → logs warning, continues scanning.

Phase 4: Download Kubernetes Binaries

FieldValue
Inputkubernetes.binaries in components.yaml
Outputassets/k8s-binaries/ (kubectl, kubelet, kubeadm)
Duration1–3 minutes
Skipped whenBinaries exist with matching checksums

Downloads each binary and verifies against the upstream .sha256 checksum file.

Failure mode: checksum mismatch → deletes partial download, retries on --resume.

Phase 5: Download Tools

FieldValue
Inputtools section of components.yaml
Outputassets/tools/ (helm, k9s, stern, yq, jq)
Duration1–2 minutes
Skipped whenTools exist at expected versions

Downloads and extracts (where extract: true) CLI tools.

Failure mode: 404 or connection error → logs the failed URL, continues with remaining tools.

Phase 6: Download Container Images

FieldValue
Inputimages section of components.yaml
Outputassets/images/ (OCI tarballs)
Duration10–60 minutes (depends on image count and network)
Skipped whenImage tarballs exist with matching tags

Pulls each image and saves as an OCI tarball. This is typically the longest phase.

Failure mode: registry rate limit (HTTP 429) → backs off and retries. Use --resume if the build is interrupted.

Phase 7: Download Helm Charts

FieldValue
Inputcharts section of components.yaml
Outputassets/charts/
Duration1–2 minutes
Skipped whenCharts exist at expected versions

Pulls chart archives from Helm repositories.

Failure mode: chart version not found → exits with error naming the chart and repo URL.

Phase 8: Collect OS Packages and Python Wheels

FieldValue
InputKubespray requirements, versions.env
Outputassets/repos/, assets/python-wheels/
Duration5–15 minutes
Skipped whenPackage directories populated

Downloads Ubuntu packages and Python wheels needed by Kubespray and Ansible.

Failure mode: missing package in upstream repo → logs error with package name.

Phase 9: Mirror Terraform Providers

FieldValue
InputProvider versions in versions.env
Outputassets/terraform-mirror/
Duration1–3 minutes
Skipped whenDEPLOYMENT_MODE=baremetal (no Terraform needed)

Creates a filesystem mirror for Terraform providers (OpenStack, local, null, random, TLS).

Failure mode: provider version not found in registry → exits with error.

Phase 10: Generate Zarf Package

FieldValue
Inputzarf.yaml.template, all assets/ directories
Outputdist/zarf-package-opencenter-airgap-amd64-*.tar.zst
Duration5–15 minutes (compression time)
Skipped whenNever (always runs as final step)

Generates zarf.yaml from the template, then runs zarf package create to produce the compressed, signed artifact with SBOM.

Failure mode: Zarf CLI not installed → exits with instructions to install Zarf.

Checkpoint File

Build state is stored in build/.state.json. Each phase records:

{
"phase": "download_images",
"status": "complete",
"started_at": "2026-02-05T08:20:00Z",
"completed_at": "2026-02-05T08:45:12Z",
"artifact_count": 47,
"versions_env_hash": "sha256:abc123..."
}

Delete build/.state.json to force a full rebuild.