Skip to main content

Air-Gap CLI Commands

Purpose: For operators, provides every opencenter-airgap command with flags, options, and examples.

Command Overview

CommandDescription
initCreate project directory structure and config
addAdd a component (tool, repo, image, chart) to the manifest
scanDiscover images and charts from cloned repos
buildBuild the air-gap Zarf package
verifyVerify a built package against its manifest
statusShow build state and component counts
validateValidate versions.env and manifest consistency
cleanRemove build artifacts and temporary files
serveStart local registry and package server
versionPrint CLI version

opencenter-airgap init

Creates the directory structure (config/, build/, dist/, assets/) and a default config/versions.env.

FlagDefaultDescription
--templatebaremetalTemplate type: baremetal, openstack
--configconfig/versions.envConfiguration file path
# Baremetal (default)
opencenter-airgap init

# OpenStack template
opencenter-airgap init --template openstack

opencenter-airgap add

Adds a component to config/components.yaml. Accepts a positional component_type (tool, repo, image, chart) and a name.

FlagRequired forDescription
--versiontool, chartComponent version
--urltool, repoDownload URL or Git URL
--refrepoGit ref (branch, tag, commit)
--repochartHelm repository URL
--extractExtract archive after download (tools)
--binaryPath to binary inside archive
--manifestManifest path (default: config/components.yaml)
opencenter-airgap add tool helm --version 3.14.0 \
--url https://get.helm.sh/helm-v3.14.0-linux-amd64.tar.gz \
--extract --binary linux-amd64/helm

opencenter-airgap add image nginx:1.27.3

opencenter-airgap add chart cert-manager --version v1.16.2 \
--repo https://charts.jetstack.io

opencenter-airgap scan

Discovers container images and Helm charts from repositories listed in versions.env.

FlagDescription
--repo <path>Scan a local repo path (repeatable)
--reposClone repos from versions.env before scanning
--discover-imagesDiscover images from component manifest repos
--concurrencyNumber of worker processes
opencenter-airgap scan --repos --discover-images

opencenter-airgap build

Builds the Zarf package from versions.env and the component manifest. Outputs a zarf-package-*.tar.zst file in dist/.

opencenter-airgap verify

Checks a built package against its manifest. Validates image digests, chart versions, and tool checksums.

opencenter-airgap validate

Validates versions.env syntax and cross-references the component manifest for missing or conflicting entries.

opencenter-airgap status

Prints current build state: component counts, last build timestamp, and package size.

opencenter-airgap clean

Removes build/ and dist/ directories. Does not touch config/.

opencenter-airgap serve

Starts a local container registry (port 5000) and an Nginx-based package server (port 8080) from a built package. Used on bastion hosts in air-gapped sites.

Exit Codes

CodeMeaning
0Success
1General error (see stderr)
2Validation failure