OpenCHAMI Boot Service is a Fabrica-generated REST API for managing node boot
configuration in HPC environments. It exposes modern resource APIs for
BMC, BootConfiguration, and Node objects, plus a legacy BSS-compatible
surface under /boot/v1/.
- Generated CRUD and status endpoints for
/bmcs,/bootconfigurations, and/nodes - Legacy boot endpoints for
/boot/v1/bootparameters,/boot/v1/bootscript, and service metadata - Boot script generation with node matching by XName, NID, or MAC address
- A reusable TokenSmith auth package plus generated AuthZ classifier scaffolding
- Optional HSM-backed node resolution, including TokenSmith service-token exchange
- OpenAPI publishing at
/openapi.jsonand/docs - A generated CLI client with commands such as
./bin/client health
- GNU Make
- A Go toolchain compatible with
go.mod(this branch currently declaresgo 1.26.3) pre-commitif you want local CI-style checks
cp config.example.yaml config.yamlConfiguration precedence is:
- Command-line flags
- Environment variables
config.yaml- Built-in defaults
The server reads BOOT_SERVICE_* environment variables. TokenSmith bootstrap
settings for HSM auth also support the standardized TOKENSMITH_* variables
documented in config.example.yaml.
make buildLocal build artifacts:
bin/serverbin/client
# Run from source
go run ./cmd/server serve
# Run the built server
./bin/server serve
# Optional client smoke test
./bin/client --server http://localhost:8080 healthExample overrides:
./bin/server serve \
--port 8082 \
--enable-auth \
--hsm-url http://localhost:27779 \
--tokensmith_url http://localhost:8080GET /healthreturns a small JSON health responseGET /openapi.jsonserves the generated OpenAPI documentGET /docsserves Swagger UI- When metrics are enabled, Prometheus metrics are exposed at
/metricsand on the separate metrics listener configured bymetrics_port
The generated API supports the current resource set:
/bmcs/bootconfigurations/nodes
The current generated surface includes PATCH support for these resources.
Routes are registered with trailing slashes and normalized by Chi middleware.
When enable_legacy_api: true, legacy routes are available under /boot/v1/.
Important current behavior: the legacy GET /boot/v1/bootscript handler accepts
node identifiers (host, mac, or nid) but ignores the profile query
parameter. It always asks the controller to auto-resolve the best matching boot
configuration by score and priority.
Boot profiles are supported in the boot script controller and modern
BootConfiguration resources. When a requested profile is empty, the controller
selects the best matching configuration across profiles; when a requested
profile has no match, it falls back to the default profile.
See docs/PROFILES.md for the full model and examples.
- The repository includes a reusable
pkg/authpackage for JWT, JWKS, scope, and service-token middleware patterns - The current server binary does not attach
pkg/authrequest middleware incmd/server/main.go enable_auth: truecurrently gates TokenSmith-dependent startup behavior and requirestokensmith_url- Supplying
hsm_urlenables HSM-backed node lookups - If both
enable_auth: trueandtokensmith_urlare set, the server can exchange a bootstrap token for short-lived HSM service tokens
Resource definitions live under apis/boot.openchami.io/v1/ and are wired by
.fabrica.yaml and apis.yaml.
Do not edit *_generated.go files manually.
Regenerate handlers, storage, client code, and OpenAPI after API changes:
make generate
make generate-checkmake generate-check requires a clean git tree and fails if regeneration would
change tracked files.
If you are working against a local Fabrica checkout, point the Makefile at that
directory instead of using the old FABRICA_LOCAL=1 pattern:
(cd ../fabrica && go build -o bin/fabrica ./cmd/fabrica)
make generate LOCAL_FABRICA=../fabrica
make generate-check LOCAL_FABRICA=../fabricamake test
make test-integration
make lint
make pre-commit-runmake test-integration sets BOOT_SERVICE_RUN_INTEGRATION=1 and runs
TestBootLogicWithExistingData.
Useful setup:
make setup-devCHANGELOG.mdtracks release history and the next unreleased entry.github/workflows/Release.yamlpublishes tagged releases with GoReleaser onv*tagsmake release-snapshotcreates a local snapshot release for verification
Dockerfileexpects a prebuilt binary and is used by the release flowDockerfile.standaloneperforms a multi-stage container build- The distroless runtime image does not include
curlorwget; probe/healthexternally instead of using an in-container DockerHEALTHCHECK
- If local Fabrica development hits Go proxy issues, try
GOPROXY=direct go build -o bin/server ./cmd/server - If you want to verify only generated-file drift, start from a clean tree and run
make generate-check - If an integration test seems to assume a running server, use
make test-integrationinstead ofmake test
docs/PROFILES.mdfor boot profile behavior and examplesdocs/API.mdfor the current HTTP endpoint surfacedocs/CONFIGURATION.mdfor configuration detailsdocs/AUTHENTICATION.mdfor TokenSmith JWT integrationdocs/AUTHENTICATION_TESTING.mdfor auth test coverage and examplesCHANGELOG.mdfor release history