Building RMS
Make sure you have the build prerequisites installed first.
Cloning the RMS repo
The librms gRPC definitions are fetched automatically by Cargo (pinned by rev
in Cargo.toml) on the first build - there is no submodule to initialize.
Building the binaries
The workspace produces two binaries: rackmanagementservice (the service) and
nvfwupd (the bundled firmware-update CLI, used for operator diagnostics).
Release build
Recommended, via the Justfile:
Or directly with Cargo:
Optimized binaries land under target/release/ and match what the container
image ships:
Debug build
For faster iteration during development:
Unoptimized binaries with debug symbols land under target/debug/.
Code quality checks
Container images
RMS ships a multi-stage Dockerfile:
- Stage 1 -
builder(rust:1.96-bookworm): the full build environment (Rust toolchain,protoc, linkers). Produces the workspace release binaries and pre-compiled test binaries. This stage is the base for CI lint, test, and coverage jobs. - Stage 2 -
release(debian:bookworm-slim): a minimal runtime image containing only therackmanagementserviceandnvfwupdbinaries plusca-certificatesandipmitool. It excludes the Rust toolchain and is the artifact for production deployments. It exposes port8801and its entrypoint israckmanagementservice.
Build with the Justfile (recommended)
The Justfile injects git version metadata so the binary reports a real version
(the image is tagged rms-api:<git-describe>):
The .git directory is excluded from the Docker build context, so vergen
cannot read it at compile time. The Justfile passes VERGEN_GIT_SHA and
VERGEN_GIT_DESCRIBE as build args to compensate.
Build with raw docker
The raw commands work too, but without the --build-arg VERGEN_* values the
binary’s git version fields show VERGEN_IDEMPOTENT_OUTPUT:
Standalone nvfwupd binaries
The nvfwupd CLI can be built on its own - convenient for distributing a
diagnostics tool. A plain cargo build --release -p nvfwupd inherits the host
sysroot glibc baseline; the docker/nvfwupd-standalone/ Dockerfiles produce
portable x86-64 and arm64 binaries with a glibc 2.17 baseline. See the
Development reference
for the full set of cross-build and verification commands.
Next steps
- Testing RMS - run the unit, integration, and persistence suites
- Running RMS - start the binary locally