Build and publish images
Build the NVIDIA Remediation Orchestrator (NRO) container image from source. Then load it into Docker or push it to a registry. NRO supplies no published image, so each deployment needs an image that you build or one that you already have.
This guide applies to any deployment method. Sections that apply only to Helm say so. To package the image with both Helm charts in one OCI bundle, follow Build and consume artifacts.
Before you begin
You need:
- An application source checkout. Use the
Remediation Orchestrator source
or a module that depends on
nv_maestro. The Helm module alone has no image target. - Bazel at the version in the checkout’s
.bazelversion. Bazelisk selects that version for you. The Helm module’s tool versions apply to Helm tooling only. - A Linux C/C++ toolchain. The build uses cgo (Toolchain and architecture).
- A running Docker daemon to load the image locally.
- Push access to a registry to publish the image.
maestro is NRO’s historical runtime name. It remains in the application binary, Bazel
target names, and the locally loaded image tag. All of these refer to NRO.
Build the NRO image
Skip the build if you already have a compatible image. For Helm deployments on a shared
cluster, put its repository and tag or digest in your state file
(Write your state file).
For the local Helm quick start, make it available in Docker as maestro:latest, for
example with docker pull and docker tag.
A compatible image contains /bin/maestro and the UI assets. For Helm deployments, it
must also contain a /bin/database-ready probe that accepts the retry flags the
bootstrap chart passes. Without that probe, the bootstrap wait-postgres init container
fails. This includes a bare NRO binary and an image built before those flags existed.
Run the build from the application source root, the directory that contains
cmd/maestro/. From a module that depends on the application module, use the
@nv_maestro labels instead:
If you are following a Helm quick start, run this block while you are still in the Helm module root. It records that directory so that you can return to it (Where to keep your state file). Skip it if you do not deploy with Helm:
Change to the application source root. Then build the image and load it into Docker:
Bazel builds the backend and frontend, assembles the image, and loads it into Docker as
maestro:latest. The image includes /bin/maestro and the standalone
/bin/database-ready probe that bootstrap uses. Both binaries use the application’s
pinned pgx dependency. Rebuild this image when you change the probe. PostgreSQL
readiness needs no separate image.
The first build can take several minutes. What comes next depends on how you deploy:
- Local Helm quick start: return to the Helm module root, for example with
cd "$nro_helm_dir". Then continue with Create the cluster and install. - Existing local Helm deployment: after a code change, follow Rebuild and redeploy.
Build and publish your image
A shared cluster pulls the image from a registry. You need permission to push to the repository, and the cluster must be able to pull from it. For Helm deployments with a private registry, configure pull credentials in Create the namespace and Secrets.
The push target builds Linux amd64 and arm64 images, so it needs the
image-build toolchain for both. In the example below,
replace registry.example.invalid with your registry host in both commands,
team/remediation-orchestrator with your repository path, and 1.0.0 with a new
release tag. From the application source root, sign in to your registry and push:
Always supply your registry repository and a new explicit release tag with --tag. Do
not reuse a release tag for different image content. Unless your registry enforces tag
immutability, a later push can overwrite any tag. For production deployments, deploy
the pushed image index by digest.
The target pushes --tag together with two generated tags, 0.0.0 and commit. Every
unstamped push overwrites those two tags, so do not deploy them. A registry that forbids
tag overwrites rejects the generated tags on a later push. The push applies your
explicit tag first, so a failed push can still leave that tag published. Check the
registry before you retry.
With --config=stamp, the generated tags become the Git version identifier and the
commit SHA. tools/workspace_status.sh reports both. The version identifier follows
these rules:
- It starts with the nearest tag that matches
v[0-9]*, annotated or lightweight. - When the commit comes after that tag,
-<commit count>-g<abbreviated hash>follows it, as inv1.2.0-3-gabc1234. - With no matching tag, it is the abbreviated hash alone.
- A
.dirtysuffix marks uncommitted changes to tracked files.
The push target accepts the runtime flags of the pinned rules_oci push implementation.
To deploy the image with Helm, change to the Helm module root. Then set the repository
and your explicit tag in your state file
(Write your state file).
For a digest, set tag: "" and digest: sha256:<64 hex>.
Toolchain and architecture
The image build enables cgo, so it needs a C/C++ toolchain for each target Linux architecture:
The application source module registers hermetic Zig cross-compilers for both Linux architectures. Use the checkout’s toolchain configuration. Do not assume that your host compiler targets Linux. Helm render tests do not check image builds or host-platform compatibility.
The go_binary(name = "maestro", oci = True, ...) macro in cmd/maestro/BUILD.bazel
generates the image targets, so they do not appear there by name. The binary-only
target, //cmd/maestro:maestro, does not package a deployable image.
Bootstrap runtime
This section applies to Helm deployments. The Temporal bootstrap Job runs a POSIX sh
script in the public admin-tools image. The chart inlines the script, so you do not
build or load a separate image for it.
By default, Helmfile uses the locked admin-tools image from the same Temporal release as
the server. To select a mirror or a compatible override, set
upstreamImages.temporalAdminTools. The selected image must meet the bootstrap chart’s
image contract.
PostgreSQL readiness uses /bin/database-ready in the NRO application image. Rebuild
that image to include the retry flags that the bootstrap chart requires.
Next steps
- For the local Helm quick start, install a locally loaded image: Create the cluster and install.
- For a shared Helm deployment, select the pushed image: Write your state file.
- For an existing Helm deployment, roll out a new image: Upgrade.
- For image-build failures, check the Helm troubleshooting guide: Preparation and rendering.
- For Helm deployments, bundle the image with both charts in one OCI bundle: Build and consume artifacts.