Helix air-gapped installer: shipping an AI platform to sites with no internet
I built this as a senior engineer, as part of the Helix team. It is the installer for Helix, the multi-tenant AI platform I worked on. It takes the whole platform, about a dozen services plus their databases, and puts it on a customer's own Kubernetes cluster at a site that has no internet connection at all.
Why air-gapped
The companies that buy Helix want an AI assistant that works on their own documents and data, but they don't want any of it leaving their building. Their documents, their chats and even the AI models run inside their own network. Many of these sites are fully disconnected on purpose: no outbound internet, no vendor VPN, no remote shell for us. Their security team decides what comes in, and everything that comes in gets reviewed.
That rules out the usual way of installing software, where the cluster pulls images and charts from the internet and the vendor logs in to fix things. So the platform has to arrive as one self-contained package. Nothing in the install downloads anything, and nothing reaches out once it is running. If something goes wrong, the customer's own operator has to be able to see what happened and go back, without calling us.
Why I built a new one
A first version already shipped to air-gapped customers, so the idea worked. But it had grown into seventeen loose shell scripts, separate copies of the same steps for each platform that drifted apart, and a Helm chart split into five sub-charts that always shipped together anyway. Almost nothing could be tested, and every change was risky. I kept what the product needed and rebuilt the structure from scratch, writing down each decision and the options I turned down.
The options I weighed
- Language: Bash, not Python. Python would have been easier to test, but it means shipping a runtime and its packages onto a locked-down admin machine, which is the hardest place to add anything. I kept Bash and made it testable instead: all logic lives in sourced library files, the commands only call them, and ShellCheck and bats keep that honest.
- Getting images onto the cluster: a registry inside the air gap, not copying onto each node. The first design walked every node over SSH and loaded images into each one. That needs SSH and passwordless sudo on every node, which is exactly the access a security team least wants to give. Worse, it breaks months later: a replaced or newly added node has no images, can't pull them, and the pods fail with nothing pointing back to the cause. I looked at how Red Hat's disconnected OpenShift, Replicated, Carvel and Zarf do it. All of them rely on a registry inside the network, so that is what I chose. The installer pushes to the customer's registry and never touches a node.
- Platforms: one set of commands, with the differences behind an adapter. Instead of separate scripts per platform, every platform implements the same small set of functions. A test checks that every adapter has all of them, so a new platform can't be half-added, and no file outside the adapters is allowed to check which platform it is on.
- Identity: bundled, not an outside service. Treating the sign-in service as something the customer already runs would make the install depend on a service outside the bundle, which defeats the point. It ships inside.
- Gateway: Traefik, not Kong. I first picked Kong, then found that my main reason for it was wrong. Traefik also wins on things that matter offline: a single small binary means fewer security findings to review every release, and it needs less memory. Its plugin system downloads modules at startup, which can't work air-gapped, so I allow only its built-in features, and the chart enforces that.
What's in the bundle
Every customer gets the same tarball and a checksum file. Inside:
config.yaml, the only file they edit. Five values are required.- The commands, plus two helpers: one reads the settings back from a running install, and one collects logs and state for support.
- The packaged Helm chart, with one small overlay per platform.
- Every container image as a tarball, with checksums.
- Security evidence for every image: SBOMs, our rulings on each known flaw, and one spreadsheet listing everything the scanners found.
- The install, upgrade, hardening and troubleshooting guides, as web pages generated from the same Markdown we maintain.
- A checksum of every file in the bundle.
How it works
The operator verifies the checksum, unpacks the bundle, edits config.yaml and runs five commands:
- preflight checks everything before anything changes: tools on the admin machine, cluster access and permissions, storage, the database operator, the config file and a dry run of the chart. It reports every problem it finds, not just the first. It also catches registry traps that would only show up weeks later, such as an OpenShift registry that is switched off or keeps images in temporary storage that vanishes on restart.
- images pushes every image into the customer's registry and checks that each one arrived.
- install installs the platform.
- upgrade runs in two steps. The plan step saves the live settings, takes a database snapshot and shows a readable diff of what will change, without changing anything. If the snapshot fails, it stops. The apply step upgrades and keeps every generated secret.
- rollback goes back to an earlier release and can restore the database from the snapshot taken before the upgrade. It asks for confirmation and says exactly what will be lost.
An air-gapped customer can't ring the vendor halfway through an upgrade, so a one-way upgrade was never acceptable.
One installer, many Kubernetes platforms
The same bundle runs on any conformant Kubernetes 1.28+ (RKE2 is the main platform and the one we test on) and on OpenShift 4.x. The site picks its platform in config.yaml, and the commands, guides and steps are the same either way. Moving to a single bundle for every platform means one build, one scan and one file to hand over, so nobody can download the wrong one.
From a plain VM to a ready RKE2 node
Not every customer already has a cluster. Setting up RKE2 by hand took eight steps, and three of them were easy to miss: the registry mirror, the registry login and the storage class. So I wrote a separate tool that turns a plain Linux VM into an RKE2 node ready for the platform, and can join more VMs as workers or extra servers. Every setting has a default, a flag, a settings-file entry and a prompt, and it can print the settings it would use before it does anything. On an offline site it takes local files instead of downloading.
A Helm chart that checks its own settings
The chart refuses a bad configuration when it is rendered and names the setting to fix: an empty hostname, a missing password, a password with characters that would break the database connection string, an invalid vector store choice. At a customer site, the alternative is a service stuck restarting with no clear reason. The chart also generates the gateway's routes from the services that are actually turned on, so a disabled service can't leave a dead route behind and an enabled one can't end up unreachable. After a penetration test, I added the fixes into the chart so they are on by default: security headers, an allow-list of HTTP methods, rate limits on sign-in, and the admin consoles kept off the public routes.
Supply-chain security
A security team that can't download anything needs to know exactly what it is letting in.
- Every image is listed in one file and pinned by digest, and a pull that doesn't match its digest fails.
- Every image is scanned with both Trivy and Grype.
- Every image gets an SBOM in both SPDX and CycloneDX.
- Every finding gets a written ruling in OpenVEX: whether it affects the product, and why or what we are doing about it.
- The build stops on any critical finding without a ruling, so an unreviewed critical can't ship.
All of this ships inside the bundle, so the customer can check it without network access or a scanner database.
Testing without a network
The whole test suite runs with no network, no cluster and no credentials, so it runs before every commit instead of after. It is bats for behaviour and ShellCheck for the scripts, plus rendered "golden" manifests for eight configurations that are compared on every change. The one thing that can't be proven offline is that generated secrets survive an upgrade, so that gets its own install-then-upgrade test on a disposable cluster, and I wrote down why rather than pretending the offline tests cover it.
Outcome
Helix is in production at customer sites, installed from this bundle on their own clusters with no internet access. A customer's operator can install, upgrade and roll back on their own, with a recovery point before every change and a clear report when something isn't ready. Their security team gets a full list of what is inside every image and our decision on every known flaw. I'm the top committer on the installer, with 256 of its 323 commits.
Contract work. The code is private, and details that identify customers or internal systems are left out.