Branch-based deployment platform
  • Rust 69.9%
  • Nix 30.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Anish Pallati 72d28603c6
Some checks failed
kennel/build skipped: no services or static sites defined
CI / checks-1 (push) Failing after 1m7s
CI / checks (push) Failing after 0s
nixbot/nix-build gitea:ScottyLabs/kennel#checks.x86_64-linux.test failed
nixbot/nix-build 1 of 5 attributes failed
nixbot/nix-eval evaluation succeeded in 3m 14s (1 warning)
docs: move the features guide to governance
Signed-off-by: Anish Pallati <i@anish.land>
2026-10-27 22:48:51 -04:00
.forgejo fix: restore the devenv ci workflow and prepare action for unmigrated repos 2026-10-26 00:11:27 -04:00
crates fix: only sweep units in kennel.slice 2026-10-26 05:57:36 -04:00
nix fix: skip kennel.slice units in switch-to-configuration 2026-10-26 05:57:35 -04:00
sites/docs docs: move the features guide to governance 2026-10-27 22:48:51 -04:00
.gitattributes docs: add README and mark generated entity sources 2026-07-16 02:48:30 -04:00
.gitignore feat!: deploy nixbot artifacts and replace devenv with a flake-parts module 2026-10-25 18:26:34 -04:00
Cargo.lock feat!: deploy nixbot artifacts and replace devenv with a flake-parts module 2026-10-25 18:26:34 -04:00
Cargo.toml feat: scaffold v2 crate structure 2026-04-13 18:29:44 -04:00
flake.lock chore: update lockfiles 2026-10-26 00:01:27 +00:00
flake.nix feat!: deploy nixbot artifacts and replace devenv with a flake-parts module 2026-10-25 18:26:34 -04:00
LICENSE feat: scaffold frontend from RFC 0002 2026-02-24 13:51:18 -05:00
osv-scanner.toml fix: make security scans pass 2026-08-09 20:38:13 -04:00
README.md feat!: deploy nixbot artifacts and replace devenv with a flake-parts module 2026-10-25 18:26:34 -04:00
secretspec.toml feat!: deploy nixbot artifacts and replace devenv with a flake-parts module 2026-10-25 18:26:34 -04:00

kennel

Kennel is the deployment platform for ScottyLabs. On every push it deploys what nixbot built and pushed to the binary cache, runs its services as systemd units and static sites through Caddy, provisions per-deployment resources, resolves secrets from OpenBao, manages DNS through Cloudflare, and serves it over HTTPS.

Every branch and open pull request gets its own deployment at {project}-{branch}.scottylabs.net, redeployed on every push and torn down when the branch or PR closes.

A project's flake.nix, built on the shared flake-parts module in this repo (nix/flake-module), defines its dev shell, its local services, its checks, and the services and sites kennel deploys. The daemon and the module are versioned together.

Internally, kennel is a single daemon that takes git webhooks and nixbot's build reports, substitutes each commit's artifact from the binary cache, deploys it, and reconciles running state against declared intent. It keeps intent in SQLite and leaves runtime state to systemd, Caddy, and Nix.

Kennel can also publish the hosts of its live deployments to a file. ricochet, a stateless OAuth2 callback relay, reads that file as its allowlist, so ephemeral previews can complete logins that identity providers won't issue wildcard redirect URIs for.

Layout

  • crates/kennel: the daemon
  • crates/kennel-config: shared types and the kennel.json contract
  • crates/kennel-provision: resource provisioning (PostgreSQL, SQLite, Valkey, Garage)
  • crates/entity, crates/migration: SQLite schema and SeaORM entities
  • nix/flake-module: the flake-parts module projects build on
  • nix/lib: the build helpers projects get as the helpers module argument
  • nix/nixos.nix: NixOS module to run the daemon on a host
  • sites/docs: documentation (mdBook)

Adding options, checks, or build helpers is documented in nix/README.md.

License

Licensed under the GNU Affero General Public License v3.0.