Distribution packaging (W10-12 / D-101 / FR-P63)
Four install paths for a Kryptkeeper release, all produced by
.github/workflows/release.yml on a v* tag push:
| Format | Built by | Artifact |
|---|---|---|
| deb / rpm | packaging/nfpm/ (nfpm) |
dist/*.deb, dist/*.rpm on the GitHub Release |
| Homebrew | packaging/homebrew/ |
kryptkeeper.rb on the GitHub Release |
| Helm repo | charts/kryptkeeper* published two ways |
see below |
| One-command installer | packaging/install.sh |
run directly from this path in git, not a release asset |
Container-image signing (cosign, keyed vs. keyless) is covered separately in
SIGNING.md — that's the other half of this ticket's
acceptance criteria (D-101).
deb / rpm
packaging/nfpm/nfpm.yaml packages the Hub binary only (not the agent —
see "Scope" below). Built in CI by the package-linux job in
release.yml, one run per linux/{amd64,arm64}, using
nfpm (go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.41.0, pinned per this repo's
convention of pinning CI tool versions).
To build locally:
go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.41.0
GOOS=linux GOARCH=amd64 go build -o /tmp/kryptkeeper-linux-amd64 ./cmd/kryptkeeper/
NFPM_ARCH=amd64 NFPM_VERSION=1.2.3 NFPM_HUB_BINARY=/tmp/kryptkeeper-linux-amd64 \
"$(go env GOPATH)/bin/nfpm" package --config packaging/nfpm/nfpm.yaml --packager deb --target /tmp/
(NFPM_VERSION must not have a leading v — nfpm's version field isn't a Go
module tag. release.yml strips it via ${GITHUB_REF_NAME#v}.)
The package installs /usr/bin/kryptkeeper, a systemd unit
(packaging/nfpm/systemd/kryptkeeper.service), and
/etc/kryptkeeper/env.example. postinstall.sh creates the kryptkeeper
system user/group, seeds /etc/kryptkeeper/env from the example only on
first install (never overwrites an operator's edits), and does not
auto-start the service — matches docs/deployment.md's existing bare-metal
procedure (configure APP_BOOTSTRAP_TOKEN /
KRYPTKEEPER_KEYSTORE_PASSPHRASE first, then systemctl enable --now).
preremove.sh stops/disables the service but never deletes
/var/lib/kryptkeeper or /etc/kryptkeeper — removal isn't destruction.
Verified locally end-to-end (both .deb and .rpm built and their
data.tar/control scripts inspected — see the ticket's commit history for
the exact commands) since neither nfpm nor a target distro is part of this
repo's own gate.
Homebrew
packaging/homebrew/kryptkeeper.rb.tmpl is a template; render-formula.sh
fills in the version, download URLs, and per-arch SHA256 from the two
darwin release binaries. The homebrew-formula job in release.yml runs
it and uploads kryptkeeper.rb as a release asset.
Unreachable from this ticket: actually publishing to a tap. A Homebrew
formula only becomes brew install kryptkeeper-able from a tap repository
(kryptkeeper/homebrew-kryptkeeper or similar) or homebrew-core — both are
separate repositories this environment has no credentials for and this
ticket's write_scope cannot create. What ships here is the correctly
-rendered formula file as a release artifact; wiring a push into a tap repo
is a follow-up that needs a HOMEBREW_TAP_TOKEN-equivalent secret and a
target repo, named here rather than silently assumed done.
Test a rendered formula locally:
brew install --build-from-source ./kryptkeeper.rb
brew test kryptkeeper
Helm repo
Two publish paths, both wired into the helm-publish job:
-
Classic index.yaml repo via GitHub Pages (
helm/chart-releaser-action, targeting this repo's owncharts/dir andgh-pagesbranch) — this is the shapedocs/deployment.mdalready documents (helm repo add kryptkeeper https://...). Requires a one-time manual step no workflow can perform: a repo admin must enable GitHub Pages (Settings → Pages → Source:gh-pagesbranch) before this path serves anything. Until that's done,chart-releaser-actionstill runs (it pushes packaged charts +index.yamlto thegh-pagesbranch) but nothing is reachable at a URL. Known drift: the actual published URL will behttps://kryptkeeper.github.io/kryptkeeper/(this repo's own Pages,<org>.github.io/<repo>) —docs/deployment.mdcurrently sayshttps://kryptkeeper.github.io/helm-charts(a separatehelm-chartsrepo that does not exist and that this ticket cannot create). Fixing that line is a docs-only follow-up outside this ticket'swrite_scope(docs/deployment.mdis not in it); flagging here rather than leaving it to be rediscovered as a broken link. -
OCI repo on GHCR (
helm push ... oci://ghcr.io/bpmforge/charts) — works immediately from CI alone, no manual toggle, using the already-grantedpackages: writepermission. Install with:helm install kryptkeeper oci://ghcr.io/bpmforge/charts/kryptkeeper --version 0.9.0
Both charts/kryptkeeper and charts/kryptkeeper-certmanager-issuer are
published by both paths (chart-releaser walks the whole charts_dir; the
OCI loop packages every chart under charts/*/).
One-command installer
curl -fsSL https://raw.githubusercontent.com/kryptkeeper/kryptkeeper/main/packaging/install.sh | bash
Downloads the Hub binary (or the agent, via KRYPTKEEPER_COMPONENT=agent)
for the host's OS/arch, verifies it against the release's SHA256SUMS.txt,
and installs it — fails closed on any checksum mismatch (nothing is
installed; see install_test.go's
TestInstallSh_FailsClosedOnChecksumMismatch, which reproduces a tampered
checksum against the real script and asserts both the non-zero exit and
that no binary is left behind). Env var overrides are documented in the
script's header comment; install_test.go uses
KRYPTKEEPER_INSTALL_BASE_URL to point the script at a local httptest
fixture instead of GitHub, so the test suite needs no live network.
Linux and macOS (amd64/arm64) only — Windows installs are documented
separately in docs/deployment.md.
Scope notes
- Agent packaging.
packaging/nfpm/covers the Hub only. The agent is already self-contained viakryptkeeper-agent --generate-systemd(docs/deployment.md, "Satellite agent systemd unit") and doesn't need a package manager to install cleanly; adding a.deb/.rpmfor it is a natural follow-up, not required by this ticket's acceptance criteria. ldflagsversion injection is a pre-existing no-op.release.ymlbuilds with-ldflags="-X main.version=...", butcmd/kryptkeeper/main.gohas novar version stringfor that flag to target — it's silently discarded. Out of this ticket'swrite_scope(cmd/isn't in it); noted here because it means neither the Homebrew formula'stest doblock nor any packaged binary can assert a--versionoutput — there isn't one. The formula's test block checks existence/executability only, which is what's actually true of the binary.