Development Setup
Development Setup
Prerequisites
- Go 1.26+
- Docker Engine 28.0+, a rootful daemon without
userns-remap - Linux host with cgroupv2 and
nsdelegatemount option - firejail, which sandboxes
make test - golangci-lint v2 for
make lint, and Node.js 22+ (npx) formake lint-docs
Clone and build
git clone https://github.com/GSI-HPC/sind.git
cd sind
make buildThe binary is built at ./sind-<os>-<arch>, e.g. ./sind-linux-amd64.
Run
./sind-linux-amd64 version
./sind-linux-amd64 create clusterMake targets
All common tasks are available via make:
| Target | Description |
|---|---|
make build |
Build the sind binary |
make install |
Install sind to GOPATH/bin |
make test |
Run unit tests with race detector, sandboxed with firejail |
make test-integration |
Run integration tests (requires Docker) |
make coverage |
Generate HTML coverage report |
make check-coverage |
Run the unit tests like make test and check the coverage thresholds in .testcoverage.yml (requires go-test-coverage) |
make lint |
Run golangci-lint |
make lint-docs |
Lint documentation markdown files |
make docs-shots |
Take the sind ui screenshots of the docs into docs/static/ui-shots (needs Chromium; not committed) |
make image |
Build the node images (one per Slurm release line) for the host platform via docker buildx bake |
make clean |
Remove build artifacts and coverage files |
make help |
Show all available targets |
The build version defaults to git describe --tags --always --dirty and can be overridden:
make build VERSION=v1.0.0A binary built without a version reports dev, except one installed with go install github.com/GSI-HPC/sind/cmd/sind@<version>, which reports the module version the Go toolchain recorded.
Dependencies
sind uses a minimal set of dependencies:
| Dependency | Purpose |
|---|---|
github.com/spf13/cobra |
CLI framework |
go.yaml.in/yaml/v3 |
YAML configuration parsing (YAML 1.2) |
github.com/charmbracelet/log |
Colorized log output (slog handler) |
github.com/charmbracelet/lipgloss |
Style of the TRACE level in the log output, and the colour profile of stderr for the log lines |
github.com/muesli/termenv |
The colour profiles lipgloss reports |
github.com/GSI-HPC/go-clikit |
Progress spans, their displays and the event log, and TTY detection; the pools of the power commands and delete cluster --all; escaping of the text sind prints from docker and containers; the strict command tree and the usage errors that exit 2; the output of get and doctor; whole-file writes; the server of sind ui and its reading of the activity log; MCP progress notifications |
github.com/creack/pty |
The pseudo-terminal of docker pull, which writes its byte counts only to a terminal (cmdexec.WithTerminal) |
github.com/njayp/ophis |
MCP server framework, and the flag filter of the MCP tools |
github.com/tailscale/hujson |
sind mcp <editor> enable and disable: edits an editor’s MCP configuration (JSON with comments and trailing commas) in place, keeping its other settings, comments and formatting |
github.com/modelcontextprotocol/go-sdk |
MCP request and result types for the ophis tool middleware; the bearer-token check and HTTP server of sind mcp stream |
github.com/spf13/afero |
Filesystem abstraction for testability |
golang.org/x/crypto |
The OpenSSH encoding of the SSH relay’s ed25519 keypair (ssh) |
golang.org/x/sync |
Errgroup for concurrent operations |
golang.org/x/sys |
Advisory file locking (flock) of the realm lock and of the activity log’s rotation, and the check whether a lock holder still runs (kill) |
github.com/GSI-HPC/go-nodeset |
Node arguments: ClusterShell node set expressions |
github.com/stretchr/testify |
Test assertions (test only) |
Run tests
Unit tests (no Docker required). firejail breaks DNS inside the sandbox, so download the modules first:
go mod download
make testIntegration tests (requires Docker):
make test-integrationSee Testing for details on the test infrastructure.
Last updated on