Files
automations/deployments/kanrisha/README.md
T
57_WolveandClaude Opus 4.8 70d3019a1c feat(kanrisha): add two-phase deployment scaffold (host prep + ScoutFS)
Add deployments/kanrisha: a phased, self-contained deploy.sh for a custom
app that runs on a ScoutFS filesystem. Alma/Rocky (RHEL family) only for now.

Phase 1 (host prep) is complete and automated: EPEL + the host package set
(git tar sparse mt-st mtx sg3_utils pciutils mbuffer wget curl zstd jq
bash-completion sos lsof), Docker, and ScoutFS via setup-scoutfs.sh with a
prompted-or-globals license key. It then prints a handoff: create + mount a
ScoutFS filesystem, then re-run with SCOUTFS_PATH set.

Phase 2 (deploy the stack behind Caddy/TLS) is wired but its compose/Caddyfile
content is a clearly-marked STUB pending the real Kanrisha compose file. The
script auto-selects the phase from whether SCOUTFS_PATH is a live ScoutFS
mount; idempotent and re-runnable.

Wiring: register kanrisha in automations.sh (DEPLOYMENTS + ask_deployment_vars),
add SCOUTFS_LICENSE to globals.env.example, and document it in README
(deployments table + Alma/Rocky-only note). No oslib.sh change needed --
os_detect already folds rocky into the rhel family.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 20:35:37 -05:00

2.8 KiB

kanrisha

Kanrisha (custom application) deployed as a Docker Compose stack behind Caddy, running on a ScoutFS filesystem. Alma / Rocky Linux only for now — it installs ScoutFS (a RHEL-only kernel filesystem) and a host package set via dnf.

Status: the host-prep half (phase 1) is complete; the application stack (phase 2) is scaffolded with a stub docker-compose.yml / Caddyfile pending the real Kanrisha compose file. See the TODOs in those files.

Two-phase deploy

Kanrisha runs on a ScoutFS filesystem you create by hand (it depends on your storage layout), so deploy.sh is split into two phases and runs whichever fits when you invoke it — decided by whether SCOUTFS_PATH points at a live ScoutFS mount.

Phase 1 — host prep (automated):

  1. dnf install epel-release
  2. dnf install git tar sparse mt-st mtx sg3_utils pciutils mbuffer wget curl zstd jq bash-completion sos lsof
  3. Install Docker.
  4. Install ScoutFS: curl -fsSL https://rpm-1.srvno.de/setup-scoutfs.sh | bash -s -- --license <KEY>
  5. Print the steps to create your ScoutFS filesystem, then stop.

You do (manual): create + mount a ScoutFS filesystem, e.g. at /mnt/kanrisha (and add it to /etc/fstab).

Phase 2 — deploy the stack (automated): lay down the compose + Caddyfile, seed .env, open 80/443, pull images, bring the stack up behind Caddy/TLS.

Required values

Variable Phase Notes
SCOUTFS_LICENSE 1 License key for setup-scoutfs.sh. Prompted, or set in globals/globals.env.
SCOUTFS_PATH 2 Absolute path to the mounted ScoutFS filesystem. Its presence is what triggers phase 2.
KANRISHA_DOMAIN 2 Public hostname (e.g. kanrisha.example.com).
ACME_EMAIL 2 Let's Encrypt registration email.

See .env.example for image tags.

Deploy

./automations.sh        # Deploy on this host → deploy: kanrisha

Or build + run the self-contained artifact:

./build.sh
scp deploy.sh root@host:
ssh root@host 'bash deploy.sh'                     # phase 1 (prompts for license)
# ... create + mount your ScoutFS filesystem on the host ...
ssh root@host 'SCOUTFS_PATH=/mnt/kanrisha KANRISHA_DOMAIN=kanrisha.example.com \
  ACME_EMAIL=me@example.com bash deploy.sh'        # phase 2

Unattended provisioning (phase 1): cloud-init.yml.

Notes

  • Rebuild after editing loose files. docker-compose.yml, Caddyfile, and .env.example are embedded into deploy.sh by build.sh; re-run it after any edit or the deploy ships the stale copy.
  • DNS for KANRISHA_DOMAIN must resolve to the host and 80/443 be reachable before phase 2, or the Let's Encrypt cert request fails.
  • The ScoutFS mkfs/mount recipe in the phase-1 handoff is a placeholder — fill in your canonical commands.