Files
nvke/docs/qualification/environments.md
Jayson (Xiaoxi) Du 534e033790 feat(e2e): add a third DSX datahall for the GB300 lane (#2302)
* feat(e2e): run the GB300 datahall through the qualify-e2e lane

Adds datahall-3, the GB300 stream that selects it, and a label to run
it, through stage full. Every machine the datahall owns is an arm64
GB300 NVL72 tray with no DPU, which sets it apart from the other two
DSX datahalls in three ways, and the harness now handles each:

- Its VPC is FLAT. A host with no managed DPU can only be placed in a
  FLAT VPC, which has no prefix; NiCO attaches the instance itself when
  the create carries autoNetwork. dsx.yaml declares `autoNetwork: true`
  in place of `vpcPrefixID`. The site node is created that way and its
  address read from the NiCO machine, and the tenant's control plane
  and workers are NicoMachines with `autoNetwork: true` and no
  interfaces. A pool that names a prefix as well is refused.
- It mints tokens from a Keycloak realm on its own API host, not from
  SSA. `issuerPath` names the realm's issuer base. A realm has no
  `carbide` scope and answers a request for one with 400
  invalid_scope, so a datahall with an issuerPath asks for no scope,
  both when the suite mints and in the client CAPNICo is handed, and
  the nico-credentials template writes `scope` only when there is one.
  A token is reused until a minute before the issuer's expires_in,
  capped at the old five minutes.
- Its API is served under a private CA, DSX_<DATAHALL>_CA_CERT. The
  suite's API and token clients trust it beside the roots they already
  have, and CAPNICo gets it as `ca.crt` in nico-credentials, base64 in
  `data` so the PEM renders on one line through either renderer.
  nvkectl's template context gains the field, left empty.

dsx and dsx-arm64 leave the new stream out, and a new dsx-gb300 scope
names it. The qualify-e2e-dsx-gb300 label runs that scope at the dsx
environment's stage, without changing QUALIFY_E2E_SCOPE.

A datahall that declares none of this behaves exactly as before.

Signed-off-by: Jayson Du <jaydu@nvidia.com>

* fix(ci): withhold the DSX API hosts from artifacts and the job log

A DSX API host names its datahall, which is why the workflow takes it as a
secret. But GitHub masks a secret only in the job log, and only in the form
it was stored in, so the host still reached three places:

- run-inputs.txt, an uploaded artifact, printed the datahall-1 and
  datahall-2 api rows in full. The resolved-inputs table now withholds
  DSX_*_API by shape, as it already does the jump hosts and the join token.
- The withhold step scrubbed only the jump hosts and SSA_ISSUER from the log
  and reports it uploads. It now finds DSX_*_API too, and the suite's own
  redaction of the archives it writes takes the same values.
- An error can name a host without its scheme, as a DNS lookup or a
  certificate mismatch does, and that is not the form the secret was stored
  in. Each withheld value is now also scrubbed as its host alone, and the
  run step masks those hosts in the job log, which a public repository
  publishes.

Matched by shape, so a datahall added later is withheld without editing a
list.

Signed-off-by: Jayson Du <jaydu@nvidia.com>

* build: update CAPNICo to v0.3.0-rc.1

v0.3.0-rc.1 is the first CAPNICo release with NicoMachine autoNetwork
(dsx-ai-factory/cluster-api-provider-nico#279), which a FLAT VPC needs:
without it CAPNICo cannot place a machine there, and a host without a
managed DPU can join no other kind. capnico.yaml's header now says so,
so the pin is not moved below it. NicoMachine and NicoMachineTemplate gain
autoNetwork and phoneHomeEnabled and no longer require interfaces, and
NicoIdentity gains a next-check time. Nothing else in the manifest
changes apart from the image.

Re-vendor capnico.yaml from the v0.3.0-rc.1
infrastructure-components.yaml asset, re-apply the two nvke manager
args, and copy it into the embedded manifests with
`make -C cli capnico-manifest`. The body is the asset byte for byte
apart from those args.

Move the pins that decide what runs: release.yaml, and the bootstrap
manifest's ref and digest. The digest is the multi-architecture
index's (amd64 and arm64), read from GHCR. The tests that pin them and
the docs that name the deployed release move with them. The NicoIdentity
debug page also takes rc.1's token-issuer messages: a 400 other than
invalid_client, such as an unknown scope, is now AuthenticationFailed
rather than ValidationFailed.

controller/go.mod, management-engine/go.mod and the CRD fixtures stay
at v0.1.0, so the lanes that build CAPNICo from go.mod, and gofail,
keep testing v0.1.0 until the Go module follows in its own change.
The clusterctl example in docs/site-bootstrap/infrastructure-providers.md
also stays at v0.1.0: the rc.1 metadata.yaml lists only release series
0.0 and 0.1, so a validated clusterctl init refuses v0.3.0-rc.1.

Signed-off-by: Jayson Du <jaydu@nvidia.com>

* fix(ci): trim a withheld URL before taking its host

host_of stripped a URL's port before its trailing whitespace, so an API
stored as " https://api.example:443 " was masked and scrubbed as
api.example:443, and an error naming api.example alone, such as a DNS
lookup, kept the host. The provider trims the value, so that error is
reachable. All whitespace now goes first: a value wrapped in newlines
used to emit an empty ::add-mask:: and print the bare host on the next
line of the job log.

An IPv6 host also loses its brackets, as URL.Hostname drops them, so an
error naming the bare address is masked and scrubbed too.

Signed-off-by: Jayson Du <jaydu@nvidia.com>

* test(e2e): cover the datahall CA's transport refusal and a missing issuer

With a datahall CA set, New refuses a client whose transport is not an
*http.Transport, because the CA cannot be added to an arbitrary
RoundTripper. Options.HTTPClient now says so, and a test checks the
refusal with a CA and the unchanged client without one.

SSAClientFor and MintToken take the datahall's issuerPath or fall back
to SSA_ISSUER. A test calls both with neither set and checks that each
refuses before any exchange, naming the variable and the datahall.

Signed-off-by: Jayson Du <jaydu@nvidia.com>

* test(release): pin the streams each shipped DSX scope selects

The scope matching tests use synthetic scopes, so nothing failed if a
later DSX stream widened what a hardware label runs. The new test reads
release/policy.yaml and checks exactly what dsx, dsx-amd64, dsx-arm64
and dsx-gb300 select. A DSX stream added later fails it until it is
placed in those scopes on purpose.

Signed-off-by: Jayson Du <jaydu@nvidia.com>

* docs: say the DSX labels run stage full by default

A labelled run takes its stage from QUALIFY_E2E_STAGE and falls back to
full, so "at stage full" read as a pin the workflow does not have. Both
qualify-e2e-dsx-gb300 rows, and the qualify-e2e-dsx row next to one of
them, now say full by default.

Signed-off-by: Jayson Du <jaydu@nvidia.com>

* test(e2e): put the full-stage check back on one line

The variable held the run environment for a CA check that has since
gone, and only its Provider is read now. The line is back to what main
has.

Signed-off-by: Jayson Du <jaydu@nvidia.com>

---------

Signed-off-by: Jayson Du <jaydu@nvidia.com>
2026-11-17 15:48:41 -08:00

12 KiB

Declaring infrastructure

An environment file describes hardware that exists. A qualification run names one, asks it for a machine with certain capabilities, and gets back an instance type the site actually offers.

Read this before adding a site, adding an instance type, or adding a second provider. hardware-qualification-design.md covers what happens after a machine is chosen.

Files live in controller/test/e2e/environments/, one per environment, named by the value of -e2e.environment. There are three: forge.yaml, forge-perf.yaml for the Forge site for performance runs, and dsx.yaml for the DSX datahalls. One file per provider and org: a datahall or site is an entry inside one, not a file of its own, and the perf environment has its own because its site sits in another org.

The shape

Only the top level is common. Everything under infrastructure is the named provider's own vocabulary, passed through the loader undecoded:

provider: forge

infrastructure:          # opaque to the loader; the forge provider decodes it
  org:
    id: "${FORGE_ORG_ID}"
  sites:                 # named for the site, not the role: capabilities choose
    site-1:
      id:            "${FORGE_SITE_ID}"
      vpcID:         "${FORGE_VPC_ID}"
      subnetID:      "${FORGE_SUBNET_ID}"      # this fabric attaches by subnet
      sshKeyGroupID: "${FORGE_SSH_KEY_GROUP_ID}"
      instanceTypes:
        - name: cpu.himem.t1
          id: "${FORGE_INSTANCE_TYPE_CPU_ID}"
          provides: {machineType: cpu, arch: amd64}
        - name: gpu.l40sx8
          id: "${FORGE_INSTANCE_TYPE_GPU_ID}"
          provides: {machineType: gpu, arch: amd64, gpu: l40s}
    site-2:
      id:            "${FORGE_SITE_2_SITE_ID:-}"
      vpcID:         "${FORGE_SITE_2_VPC_ID:-}"
      vpcPrefixID:   "${FORGE_SITE_2_VPC_PREFIX_ID:-}"   # this one attaches by prefix
      sshKeyGroupID: "${FORGE_SITE_2_SSH_KEY_GROUP_ID:-}"
      instanceTypes:
        - name: cpu.arm
          id: "${FORGE_SITE_2_INSTANCE_TYPE_CPU_ARM64_ID:-}"
          provides: {machineType: cpu, arch: arm64}
        - name: gpu.gb200.h05.ibx4.dpux2
          id: "${FORGE_SITE_2_INSTANCE_TYPE_GPU_GB200_ID:-}"
          provides: {machineType: gpu, arch: arm64, gpu: gb200}

That split is the point. A second provider describes its infrastructure in its own terms, with its own field names, and nothing above the provider interface changes. There is no shared schema for it to satisfy.

How a machine gets chosen

A run asks for capabilities, not for a site or an instance type — those are things only the provider knows exist:

-e2e.capabilities gpu=l40s,arch=amd64

MatchInstanceType walks the declared types in order and returns the first whose provides map satisfies every infrastructure capability requested. Three keys are infrastructure and are matched on; anything else in the capability set is ignored here, because it describes the software under test rather than the machine:

Key Meaning
machineType cpu or gpu
arch amd64, arm64
gpu the model, e.g. l40s, gb200

Two consequences worth internalising.

Declaration order is the tie-break, so declare cheapest first. Where several types satisfy a request, the first listed wins.

An empty request matches everything. Asking for nothing is satisfied by every type, so the first declared type wins by default. The Forge lane always passes -e2e.capabilities, built from the arch and gpu of the stream it runs, so this is the shape a hand-run with neither falls back to.

A request nothing satisfies fails rather than falling back. Asking for {gpu: gb200} at a site with no GB200 is an error, not a quiet substitution of an L40. That is correct: the site genuinely cannot host the configuration.

Identifiers, not names

Every field is the identifier the API takes, not the human-facing name. This is a deliberate departure from the original design, which used names and resolved them at run time.

The reason is concrete: two of our sites have a VPC of the same name, and they are different VPCs. A VPC name is unique per site rather than per org, so name-based lookup is ambiguous in exactly the case we would hit. Using identifiers also removes a resolution API call from the hot path of every run.

Where the identifiers come from

Not from the file. Every ${NAME} above is read from the process environment when the environment loads.

A plain ${NAME} is required: unset or empty fails the run before anything is created, and every missing name is reported at once. ${NAME:-} defaults to empty instead, which is why site-2's identifiers take that form. A site missing any of them does not validate, and Resolve skips it rather than failing, so a repository that has not onboarded site-2 still runs against site-1. Set them to qualify at site-2.

CI supplies them from repository variables, which is the same route FORGE_TELEPORT_PROXY and FORGE_TELEPORT_JOIN_TOKEN take -- the latter names a Teleport provision-token resource rather than being a credential itself, so a variable is enough. FORGE_JUMP_HOST is a secret instead, so the job log masks it, and it is scoped to the forge GitHub environment rather than the repository, alongside FORGE_API_KEY and FORGE_SITE_2_JUMP_HOST.

The split is between engineering and account. Which sites exist, which machine shapes they offer, and what those shapes provides is engineering: it is reviewed, it explains why a run matched the machine it did, and it belongs in the file. An org, site, VPC or subnet id is not — it names one organization's real infrastructure, and this repository is the staging ground for a public one.

To run against the site from a laptop, export the variables first:

export FORGE_ORG_ID=… FORGE_SITE_ID=… FORGE_VPC_ID=… FORGE_SUBNET_ID=…
export FORGE_SSH_KEY_GROUP_ID=… FORGE_INSTANCE_TYPE_CPU_ID=… FORGE_INSTANCE_TYPE_GPU_ID=…

Their values are on the repository's Actions variables page. Unit tests need none of this: they substitute synthetic values, so TestCheckedInEnvironmentsParse still checks that this file is well-formed wherever it runs.

For forge-perf.yaml, where FORGE_PERF_INSTANCE_TYPE_CPU_ID is the id of the high memory CPU type cpu.himem.t1. A Forge API key belongs to an org, so this file sets apiKeyEnv: FORGE_PERF_API_KEY and the suite reads the key from that variable. A Forge environment that sets none reads FORGE_API_KEY.

export FORGE_PERF_ORG_ID=… FORGE_PERF_SITE_ID=… FORGE_PERF_VPC_ID=… FORGE_PERF_SUBNET_ID=…
export FORGE_PERF_SSH_KEY_GROUP_ID=… FORGE_PERF_JUMP_HOST=… FORGE_PERF_TELEPORT_LOGIN=…
export FORGE_PERF_INSTANCE_TYPE_CPU_ID=…

What is deliberately absent

Credentials. The Forge API key is a workflow secret, read from the environment and never written to this file, a values file, or a command line. The Teleport join token is a variable, not a secret -- it only names a Teleport provision-token resource; the actual credential is the job's GitHub OIDC token, which Teleport validates server-side.

The jump host. It is a workflow secret rather than a declared field, so the access path is not published alongside the site, and not a repository variable like the org, site, VPC and subnet identifiers -- GitHub prints job-level env in every step's log header, and only a secret is masked there. Keeping them as ${NAME} references rather than literals was raised in review and settled deliberately; a site added later declares its own references under sites: and the variable list grows with it.

The org's human-facing name. Recorded in a comment. The field lands when something reads it, rather than being accepted and silently dropped by a decoder that ignores unknown keys.

What a key group does not give you

sshKeyGroupID governs Serial-over-LAN console access, not authorized_keys. It grants no shell on a node.

Shell access comes from the ed25519 keypair the run generates per provision and injects through cloud-init, reached through the jump host. The key group is what lets you open a console on a node that is not answering ssh — invaluable when triaging, and useless for anything the harness does normally.

When the file changes

Only when the hardware does. A run needing a different Kubernetes version or a different OS image touches nothing here; neither is an infrastructure input. Those arrive as -e2e.versions.

Adding a site

One thing will stop you, and it is worth knowing before you start.

Network attachment differs by site. A fabric attaches an interface by subnet or by VPC prefix, never both, and which one is a property of the fabric rather than a choice. A site declares subnetID or vpcPrefixID accordingly, and declaring both is rejected on lookup. site-1 attaches by subnet, site-2 by prefix. A DSX datahall whose hosts have no managed DPU has neither: its VPC is FLAT, so it declares autoNetwork: true and NiCO attaches each instance itself, the tenant's machines included.

Enumerating instance types is awkward. A Forge instance-type list caps at twenty rows and ignores every filter, so discovering the rest means reading them by id. forge.yaml declares only the two types that have actually carried a workload, rather than everything the site offers.

Adding a provider

A second provider is a second implementation of infra.Provider plus an environment file in its own vocabulary. Nothing above that interface changes, and there is no schema to agree on — the loader only reads provider and hands the rest over.

dsx.yaml is the worked example, and it is worth reading beside forge.yaml for how little the two have in common below provider::

provider: dsx

infrastructure:
  org:
    id: "${DSX_ORG_ID:-ncx}"          # a name, where Forge's is numeric
  sites:
    datahall-1:                       # generic; `api` carries the host
      api:         "${DSX_DATAHALL_1_API:-}"
      id:          "${DSX_DATAHALL_1_SITE_ID:-}"
      tenantID:    "${DSX_DATAHALL_1_TENANT_ID:-}"   # no Forge equivalent
      vpcPrefixID: "${DSX_DATAHALL_1_VPC_PREFIX_ID:-}"
      instanceTypes:
        - name: datahall-1-nvke-tenant
          id: "${DSX_DATAHALL_1_INSTANCE_TYPE_ID:-}"
          provides: {machineType: gpu, arch: amd64}

Three differences are load-bearing rather than cosmetic.

Each datahall declares its own API host. api is required and there is no site-lookup call the way Forge needs one — the host addresses the datahall directly. The key itself is generic, as forge.yaml's site-1 and site-2 are, so which datahall this is stays in a variable. Two datahalls at one site hold completely disjoint UUIDs for the same kinds of object, and nothing in a response says which one an id came from — so a second datahall is a second key, never a reused one.

Credentials are per datahall. The names are derived from the key: DSX_<DATAHALL>_SSA_CLIENT_ID and _SECRET, exchanged for a bearer token at the issuer in SSA_ISSUER. A client scoped to one datahall cannot be picked up by a run against another, and a second datahall needs no code. A datahall that mints elsewhere names the path on its own API host with issuerPath, such as a Keycloak realm's /realms/<realm>/protocol/openid-connect, and one whose API is served under a private CA supplies the PEM as DSX_<DATAHALL>_CA_CERT.

full runs, and picks its own tenant. Every stage runs on DSX: the datahall has its own tenant spec, so a full run builds the site and then a control plane and worker on it. The site lane registers one tenant entry per dialect and each decodes the environment strictly, so the lane excludes the entries belonging to other providers by label --- site-controller && !nico-forge here --- rather than requiring its own, which would also drop every site-level spec. A provider added later needs an exclusion on the other lanes as well as its own; the mapping is one case block in resolve_capabilities in release/hack/qualify-e2e.sh.

Capability matching is the provider's job rather than generic code, which is what makes this work: a provider that has no concept of an "instance type" is free to match a request however it likes.