Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/holger

.nornir/storage-guide.md

Storage — guide

Class: guide · Function: storage. Architecture: storage-design.md. How to point a repo at storage and set the public download URL correctly.

Wire a repo to a storage endpoint

A Repository references a StorageEndpoint by name in ron_out (writable) or ron_in:

StorageEndpoint( ron_name: "znippy", ron_kind: "znippy", ron_path: "/var/lib/holger" ),
StorageEndpoint( ron_name: "disk",   ron_kind: "rocksdb", ron_path: "/var/lib/holger/disk" ),

A read-only znippy repo names its archive with ron_archive_path; a writable dev repo uses ron_writable_archive.

Set the public download URL (ron_base_url) for a disk-backed Rust repo

A file-rust repo must tell cargo where to download crates from. That host is not discoverable server-side (it sits behind the airgap's reverse proxy / service VIP), so set it explicitly:

Repository(
    ron_name: "rust-prod",
    ron_repo_type: "file-rust",
    ron_base_url: "https://holger.example.com",   // public scheme+host, NO trailing slash
    ron_out: Some(RepositoryIO( ron_storage_endpoint: "disk", ron_exposed_endpoint: "default" )),
)

wire_holger() threads ron_base_url into RustRepoFile::new(name, base_dir, base_url); config.json then emits {"dl":"https://holger.example.com/rust-prod/crates","api":null}. Rules:

Smoke test against a running server

# index advertises your public dl URL
curl -s http://localhost:8081/rust-prod/index/config.json
# → {"dl":"https://holger.example.com/rust-prod/crates","api":null}
# per-crate index is text/plain NDJSON with real checksums
curl -si http://localhost:8081/rust-prod/index/se/rd/serde | head

An unknown crate / unparseable sparse path / missing download returns 404 with the shared NOT_FOUND body.

Backups

Writable repos live on one RWO volume → the deployment is single-replica. There is no RWX scale-out; snapshot the PVC for backups. Read-only znippy archives are immutable files — copy them anywhere; blake3-on-read proves a copy wasn't tampered with.