Skip to content

Commit bf620a9

Browse files
Merge branch 'main' into feat/helm-nico-machine-a-tron
2 parents 6c688ab + 767c1a7 commit bf620a9

156 files changed

Lines changed: 6307 additions & 3295 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
/helm/ @NVIDIA/dsx-sw-helm
1818
/helm-prereqs/ @NVIDIA/dsx-sw-helm @shayan1995
1919

20-
# Documentation
21-
/docs/ @CoCo-Ben
22-
/fern/ @CoCo-Ben
20+
# Documentation (To be re-enabled once as have a doc reviewer)
21+
#/docs/ @CoCo-Ben
22+
#/fern/ @CoCo-Ben
2323

2424
# Network IP module
2525
/common/network/src/ip/ @DrewBloechl

.github/workflows/rest-build-binaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ defaults:
2323
working-directory: rest-api
2424

2525
env:
26-
GO_VERSION: "1.25.4"
26+
GO_VERSION: "1.25.11"
2727

2828
jobs:
2929
build-binaries:

.github/workflows/rest-lint-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ defaults:
1212
working-directory: rest-api
1313

1414
env:
15-
GO_VERSION: "1.25.4"
15+
GO_VERSION: "1.25.11"
1616

1717
jobs:
1818
style:

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ directly as documented above.
147147

148148
## Coding Conventions
149149

150+
Follow the shared [Engineering Guidelines](CONTRIBUTING.md#engineering-guidelines)
151+
for scope control, reuse-before-new-code, evidence-backed assumptions, and
152+
verification expectations.
153+
150154
See [`STYLE_GUIDE.md`](STYLE_GUIDE.md) for detailed Rust coding conventions.
151155
Make sure to review it to ensure changes meet the expected style of the codebase.
152156

CONTRIBUTING.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ We welcome contributions of all sizes — from fixing a typo in the docs to addi
1717
- [Developer Certificate of Origin (DCO)](#developer-certificate-of-origin-dco)
1818
- [Fork and Setup](#fork-and-setup)
1919
- [Contribution Process](#contribution-process)
20+
- [Engineering Guidelines](#engineering-guidelines)
2021
- [Pull Request Guidelines](#pull-request-guidelines)
2122

2223
## Developer Certificate of Origin (DCO)
@@ -172,6 +173,75 @@ Use descriptive branch names like:
172173
3. **Sign off all your commits** using `git commit -s`.
173174
4. **Submit a pull request** with a clear description of your changes.
174175

176+
## Engineering Guidelines
177+
178+
Apply these guidelines to every code change, whether it is handwritten,
179+
generated, or produced with automation. They are intended to keep changes
180+
reviewable, low risk, and consistent with the existing codebase.
181+
182+
### Scope and ownership
183+
184+
- Make the smallest correct change that solves the problem. Avoid unrelated
185+
refactors, formatting churn, new configuration paths, compatibility layers,
186+
or feature flags unless the change requires them.
187+
- If requirements are unclear, ask before changing scope. Do not silently
188+
simplify, rename, collapse, or replace the requested behavior with an adjacent
189+
improvement or quick win.
190+
- Do not redefine success around an easier path. If the real workflow is
191+
blocked, report the concrete missing input, artifact, tool, permission, or
192+
configuration.
193+
- Work with the current tree. Do not discard, rewrite, or revert someone else's
194+
changes unless the owner explicitly asks for that.
195+
- Keep pull requests focused on one behavioral or documentation outcome. Remove
196+
unused code, temporary logging, skipped assertions, placeholders, and hidden
197+
TODOs before asking for review.
198+
- Do not commit secrets, credentials, local environment files, generated
199+
private keys, or machine-specific artifacts.
200+
201+
### Reuse before adding code
202+
203+
Before introducing code or dependencies, check in this order:
204+
205+
1. Does this code need to exist, or can the caller use an existing behavior?
206+
2. Does the standard library already solve it?
207+
3. Does Rust, Go, Kubernetes, SQL, the OS, or another platform feature solve it
208+
natively?
209+
4. Does an existing workspace dependency or local helper already solve it?
210+
5. Can the change be expressed clearly inline instead of adding an abstraction?
211+
212+
Only add a helper, abstraction, dependency, compatibility path, or migration
213+
when it removes real complexity, matches an established pattern, or is required
214+
for the requested behavior.
215+
216+
### Evidence and assumptions
217+
218+
- Treat implementation claims as assumptions until they are backed by code,
219+
generated types, route registration, service definitions, schema, tests,
220+
documentation, or runtime output.
221+
- Do not infer contracts from similar names or nearby code alone. Prove data
222+
flow, ownership, authorization, persistence, API shape, and deployment
223+
behavior before relying on them.
224+
- Back claims with concrete evidence: diffs, generated output, logs, test
225+
results, API responses, screenshots, or direct observations from the relevant
226+
system.
227+
- If an assumption cannot be checked cheaply, state it in the pull request or
228+
review notes instead of presenting it as fact. If new evidence contradicts an
229+
assumption, update the design before continuing.
230+
231+
### Verification
232+
233+
- Verification should exercise the behavior that changed. Do not claim a fix is
234+
covered by an unrelated build, a nearby test, generated examples, or a mocked
235+
path that avoids the real integration being changed.
236+
- Use the real service, repository, dataset, device, workflow, command, and
237+
integration path that the change affects whenever practical. Call out any
238+
lower-fidelity substitute instead of treating it as equivalent coverage.
239+
- Add or update focused tests for bug fixes, shared behavior, API contracts,
240+
migrations, and cross-module changes. For narrow documentation-only changes,
241+
a diff review is usually sufficient.
242+
- Keep OpenAPI specs, protobufs, database migrations, Helm manifests, generated
243+
code, and documentation in sync with the behavior they describe.
244+
175245
## Pull Request Guidelines
176246

177247
- Provide a clear description of the problem and solution.

Cargo.lock

Lines changed: 15 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ authors = ["NVIDIA Carbide Engineering <carbide-dev@exchange.nvidia.com>"]
2626

2727
[workspace.dependencies]
2828
clap = { version = "4", features = ["derive", "env"] }
29-
libredfish = { git = "https://github.com/NVIDIA/libredfish.git", tag = "v0.44.11" }
29+
libredfish = { git = "https://github.com/NVIDIA/libredfish.git", tag = "v0.44.12" }
3030
librms = { git = "https://github.com/NVIDIA/nv-rms-client.git", tag = "v0.9.0-rc1" }
3131
ansi-to-html = "0.2.2"
3232

Makefile

Lines changed: 99 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,107 @@ SHELL := /bin/bash
3232

3333
.PHONY: help
3434
help: ## Show this help and exit (default goal)
35+
@echo "Getting started (fresh build host):"
36+
@grep -E '^bootstrap:.*## ' $(MAKEFILE_LIST) | awk 'BEGIN{FS=":.*?## "} {printf " %-26s %s\n", $$1, $$2}'
37+
@echo ""
38+
@echo "Container images (build from a clean clone):"
39+
@grep -E '^images[a-zA-Z0-9_-]*:.*## ' $(MAKEFILE_LIST) | awk 'BEGIN{FS=":.*?## "} {printf " %-26s %s\n", $$1, $$2}'
40+
@echo ""
3541
@echo "Rest (Go services in rest-api/):"
36-
@grep -E '^rest-[a-zA-Z0-9_-]+:.*## ' $(MAKEFILE_LIST) | awk 'BEGIN{FS=":.*?## "} {printf " %-22s %s\n", $$1, $$2}'
37-
@echo " rest-api/<target> Pass any target through to rest-api/Makefile"
42+
@grep -E '^rest-[a-zA-Z0-9_-]+:.*## ' $(MAKEFILE_LIST) | awk 'BEGIN{FS=":.*?## "} {printf " %-26s %s\n", $$1, $$2}'
43+
@echo " rest-api/<target> Pass any target through to rest-api/Makefile"
44+
@echo ""
45+
@echo " cat rest-api/Makefile See all rest-api/ targets directly"
46+
47+
# =============================================================================
48+
# Getting started (build host setup)
49+
# =============================================================================
50+
51+
.PHONY: bootstrap
52+
53+
bootstrap: ## Set up an Ubuntu/Debian build host: apt deps, rustup, submodules, docker, cargo tooling (run once)
54+
./scripts/setup-build-host.sh
55+
56+
# =============================================================================
57+
# Container images (single onboarding build)
58+
# =============================================================================
59+
# Build NICo container images from a clean clone. Run from the repo root on an
60+
# Ubuntu build host (see docs/manuals/building_nico_containers.md for the host
61+
# prerequisites: docker, mkosi, rust, cargo-make, ...). Every base image is
62+
# public (rust / debian / golang + nvcr.io/nvidia/distroless), so no internal
63+
# registry access is required.
64+
#
65+
# make images Build the deployable service stack: NICo Core + REST images
66+
# make images-all Build everything: the stack plus machine-validation and
67+
# boot-artifact images (needs the full mkosi build host)
68+
# make images-core NICo Core image (nico) only
69+
# make images-rest REST service images only
70+
#
71+
# Images are tagged $(IMAGE_REGISTRY)/<name>:$(IMAGE_TAG). Override IMAGE_REGISTRY
72+
# and IMAGE_TAG to build under your own registry/tag (defaults match rest-api/).
73+
74+
IMAGE_REGISTRY ?= localhost:5000
75+
IMAGE_TAG ?= latest
76+
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo dev)
77+
CI_COMMIT_SHORT_SHA ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo unknown)
78+
79+
# Intermediate base containers the Core and machine-validation images build FROM.
80+
CORE_BUILD_CONTAINER ?= nico-buildcontainer-x86_64
81+
CORE_RUNTIME_CONTAINER ?= nico-runtime-container-x86_64
82+
83+
# Target platform for the deployable images. The NICo Dockerfiles are x86_64, so
84+
# this defaults to linux/amd64; on an arm64 host (e.g. Apple Silicon) the build
85+
# runs under emulation. Override PLATFORM=linux/arm64 to build native arm64.
86+
PLATFORM ?= linux/amd64
87+
88+
.PHONY: images images-all images-base images-core images-rest \
89+
images-machine-validation images-boot-artifacts images-bfb
90+
91+
images: images-core images-rest ## Build the deployable service stack (NICo Core + REST images)
3892
@echo ""
39-
@echo " cat rest-api/Makefile See all rest-api/ targets directly"
93+
@echo "Deployable images built under $(IMAGE_REGISTRY) (tag: $(IMAGE_TAG)):"
94+
@echo " $(IMAGE_REGISTRY)/nico:$(IMAGE_TAG) (NICo Core)"
95+
@echo " $(IMAGE_REGISTRY)/nico-rest-*:$(IMAGE_TAG) (REST services)"
96+
97+
images-all: images images-machine-validation images-boot-artifacts images-bfb ## Build every image (stack + machine validation + boot artifacts; needs an mkosi build host)
98+
99+
images-base: ## Build the x86 build + runtime base containers (prerequisite for core / machine validation)
100+
docker build --platform $(PLATFORM) --file dev/docker/Dockerfile.build-container-x86_64 -t $(CORE_BUILD_CONTAINER) .
101+
docker build --platform $(PLATFORM) --file dev/docker/Dockerfile.runtime-container-x86_64 -t $(CORE_RUNTIME_CONTAINER) .
102+
103+
images-core: images-base ## Build the NICo Core image (nico)
104+
docker build --platform $(PLATFORM) \
105+
--build-arg CONTAINER_BUILD_X86_64=$(CORE_BUILD_CONTAINER) \
106+
--build-arg CONTAINER_RUNTIME_X86_64=$(CORE_RUNTIME_CONTAINER) \
107+
--build-arg VERSION=$(VERSION) \
108+
--build-arg CI_COMMIT_SHORT_SHA=$(CI_COMMIT_SHORT_SHA) \
109+
--file dev/docker/Dockerfile.release-container-sa-x86_64 \
110+
-t $(IMAGE_REGISTRY)/nico:$(IMAGE_TAG) .
111+
112+
images-rest: ## Build the REST service images (api, workflow, site-manager, site-agent, db, cert-manager, flow, psm, nsm)
113+
$(MAKE) -C rest-api docker-build IMAGE_REGISTRY=$(IMAGE_REGISTRY) IMAGE_TAG=$(IMAGE_TAG)
114+
115+
images-machine-validation: images-base ## Build the machine-validation runner + config images
116+
docker build --platform $(PLATFORM) --build-arg CONTAINER_RUNTIME_X86_64=$(CORE_RUNTIME_CONTAINER) \
117+
-t machine-validation-runner:$(IMAGE_TAG) \
118+
--file dev/docker/Dockerfile.machine-validation-runner .
119+
mkdir -p crates/machine-validation/images
120+
docker save --output crates/machine-validation/images/machine-validation-runner.tar machine-validation-runner:$(IMAGE_TAG)
121+
docker build --platform $(PLATFORM) --build-arg CONTAINER_RUNTIME_X86_64=$(CORE_RUNTIME_CONTAINER) \
122+
-t $(IMAGE_REGISTRY)/machine-validation:$(IMAGE_TAG) \
123+
--file dev/docker/Dockerfile.machine-validation-config .
124+
125+
images-boot-artifacts: ## Build the x86 boot-artifact image (requires mkosi + rust toolchain on the host)
126+
cargo make --cwd pxe --env SA_ENABLEMENT=1 build-boot-artifacts-x86-host-sa
127+
docker build --platform $(PLATFORM) --build-arg CONTAINER_RUNTIME_X86_64=alpine:latest \
128+
-t $(IMAGE_REGISTRY)/boot-artifacts-x86_64:$(IMAGE_TAG) \
129+
--file dev/docker/Dockerfile.release-artifacts-x86_64 .
130+
131+
images-bfb: ## Build the aarch64 DPU BFB boot-artifact image (cross-arch; requires mkosi + aarch64 toolchain)
132+
cargo make --cwd pxe --env SA_ENABLEMENT=1 build-boot-artifacts-bfb-sa
133+
docker build --platform $(PLATFORM) --build-arg CONTAINER_RUNTIME_AARCH64=alpine:latest \
134+
-t $(IMAGE_REGISTRY)/boot-artifacts-aarch64:$(IMAGE_TAG) \
135+
--file dev/docker/Dockerfile.release-artifacts-aarch64 .
40136

41137
# =============================================================================
42138
# Rest (delegate to rest-api/Makefile)

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,19 @@ of the bare-metal lifecycle to fast-track building next generation AI Cloud offe
3232
### Quick start
3333

3434
```bash
35-
# 1. Build and push images to your registry
36-
# NICo Core image: <your-registry>/nvmetal-nico:<tag> (this repo)
37-
# NICo REST images: <your-registry>/nico-rest-api:<tag>, etc.
35+
# 1. Build all container images from this clone, then push them to your registry.
36+
# See docs/manuals/building_nico_containers.md for the build-host prerequisites.
37+
export IMAGE_REGISTRY=my-registry.example.com/infra-controller
38+
make images IMAGE_REGISTRY="${IMAGE_REGISTRY}" # NICo Core (nico) + REST service images
39+
# Then: docker push "${IMAGE_REGISTRY}/nico:latest"
40+
# docker push "${IMAGE_REGISTRY}/nico-rest-api:latest" # ...and the other nico-rest-* images
3841

3942
# 2. Set environment variables
4043
export KUBECONFIG=/path/to/kubeconfig
41-
export NICO_IMAGE_REGISTRY=<your-registry> # e.g. my-registry.example.com/infra-controller
42-
export NICO_CORE_IMAGE_TAG=<nico-core-tag> # e.g. 2.0.0-pr-58-g38a54a3f
43-
export NICO_REST_IMAGE_TAG=<nico-rest-tag> # e.g. 2.0.0-pr-58-g38a54a3f
44-
# export REGISTRY_PULL_SECRET=<raw API key> # optional; raw key for authenticated registries
44+
export NICO_IMAGE_REGISTRY="${IMAGE_REGISTRY}"
45+
export NICO_CORE_IMAGE_TAG=NICO_CORE_TAG # e.g. 2.0.0-pr-58-g38a54a3f
46+
export NICO_REST_IMAGE_TAG=NICO_REST_TAG # e.g. 2.0.0-pr-58-g38a54a3f
47+
# export REGISTRY_PULL_SECRET=RAW_API_KEY # optional; raw key for authenticated registries
4548

4649
# 3. Customize site-specific values
4750
# Edit helm-prereqs/values/nico-core.yaml:

0 commit comments

Comments
 (0)