Building Packages
Purpose: For operators, shows how to configure versions.env, add components, and run opencenter-airgap build.
Prerequisites
- Ubuntu 24.04 build host with internet access (Zone A)
- Python 3.10+ and Git 2.30+
- 100 GB+ free disk space
opencenter-airgapCLI installed (pip install -e .from the repo root)- Optional: Zarf CLI for final package creation
Steps
1. Initialize the build environment
opencenter-airgap init
This creates config/versions.env with default version pins and a config/ directory structure. Use --template openstack if the target environment uses OpenStack (includes Terraform providers):
opencenter-airgap init --template openstack
2. Pin versions in versions.env
Open config/versions.env and set every version explicitly. This file is the single source of truth for the build:
# config/versions.env (excerpt)
KUBERNETES_VERSION="v1.34.3"
CONTAINERD_VERSION="2.1.5"
RUNC_VERSION="1.3.4"
CALICO_VERSION="v3.31.3"
FLUXCD_VERSION="v2.7.5"
CERT_MANAGER_VERSION="v1.16.2"
Every version referenced in the build comes from this file. Changing a version here and re-running build regenerates components.yaml automatically.
3. Build the package
opencenter-airgap build
The build command:
- Reads
config/versions.envand generatesconfig/components.yaml. - Downloads Kubernetes binaries, Helm charts, container images, OS packages, and Python wheels.
- Clones and scans repositories (Kubespray, gitops-base) for image references.
- Collects everything into
assets/directories. - Generates
zarf.yamlfrom the template. - Produces the final
zarf-package-opencenter-airgap-amd64-*.tar.zstindist/.
Useful flags:
| Flag | Effect |
|---|---|
--clean | Remove previous build artifacts before starting |
--resume | Resume from last successful checkpoint |
--force-regenerate | Regenerate components.yaml from scratch (loses manual edits) |
4. Add custom components (optional)
After the initial build, add components that aren't covered by the default manifest:
# Add a custom container image
opencenter-airgap add image custom-registry.io/myapp:v2.1.0
# Add a CLI tool
opencenter-airgap add tool --name mytool --version v1.0 --url https://example.com/mytool-linux-amd64
# Rebuild (preserves manual additions)
opencenter-airgap build
5. Validate before transfer
opencenter-airgap validate
This checks that all declared components exist in the build output and that zarf.yaml references match the collected assets.
6. Record the checksum
sha256sum dist/zarf-package-opencenter-airgap-amd64-*.tar.zst > dist/package.sha256
Copy both the .tar.zst and package.sha256 to your transfer media.
Verification
# Check build status and component counts
opencenter-airgap status
# Verify artifact integrity
opencenter-airgap verify dist/zarf-package-opencenter-airgap-amd64-*.tar.zst
The status command shows each build phase, its state (complete/pending/failed), and the number of collected artifacts.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
| Build fails downloading images | Registry rate limit or network issue | Re-run with --resume to continue from checkpoint |
components.yaml missing entries | versions.env not updated | Edit versions.env, then opencenter-airgap build |
| Disk full during build | Insufficient space for images + packages | Free space or mount a larger volume at the build root |
zarf.yaml out of sync | Template not regenerated | Run opencenter-airgap build (regenerates from template) |