No description
  • Python 79.7%
  • Shell 20.3%
Find a file
gremlin 939b7d55d5 capacity: run entirely from gremlin-execution, not znas host cron
Per Phil: run everything on the execution node when possible, only
touch a physical host when absolutely necessary. Reworked both scripts
to run inside gremlin-execution (this fleet's automation-runner
container, same venue as ingest_forgejo.py/gremlin-healthcheck.py):

- SERVICES_REPO -> /home/gremlin/git/services (already mounted there)
- GALDS_ENDPOINT -> loopback 127.0.0.1:8000, matching every other
  in-container producer
- gremlin-proxy reached directly via overlay DNS (gremlin-proxy:8080),
  no host-port publish needed -- that was solving the wrong problem
- LLM calls go through gremlin-proxy's /v1/chat/completions with an
  '@mistral ' prefix override (checked before anything else in its
  router) + no_rag:true, instead of direct-to-Ollama on docker4's
  CPU-only qwen2.5:14b (measured 8+ minutes for this prompt size in
  testing vs. gremlin-proxy's own fast-cloud-with-local-fallback path)
- The one thing that can't be done from inside a plain container --
  Swarm API calls (docker service ps/node ls/inspect) -- goes over SSH
  to znas via a new run_docker_cmd() helper, same pattern gremlin-worker
  itself already uses for every docker command, not a new dependency
- capacity_deep_audit_thursday.py takes --manual for on-demand Command
  Bus triggering; every run always creates a fresh report, scheduled or
  manual alike, per Phil: never dedupe an on-demand audit
2026-08-04 13:48:37 +00:00
backup ntfy-from-GALDS: retire mailcow-backup.sh + radarr-pre-backup.sh direct ntfy calls 2026-07-14 02:47:12 +00:00
capacity capacity: run entirely from gremlin-execution, not znas host cron 2026-08-04 13:48:37 +00:00
cron cron: add nightly mailcow backup at 3am on docker4 2026-06-29 19:58:36 +00:00
gsds GSDS: add retrieval-injection hook script (backup copy) 2026-07-17 22:42:40 +00:00
healthcheck healthcheck: rework GRDS bridge to per-dependency fingerprinted dedup 2026-07-17 17:08:20 +00:00
ingest GSDS: add ingest_skills.py -- near-dup check (hybrid pre-filter + LLM judgment) + embed/upsert + supersede handling 2026-07-17 22:38:42 +00:00
.gitignore add .gitignore for __pycache__ 2026-07-14 01:31:16 +00:00
common.sh GALDS v1.2: migrate bash/Python write sites to centralized /galds endpoint 2026-07-14 00:41:57 +00:00
gitignore feat: initial repo structure 2026-05-12 02:21:35 +00:00
gremlin-backup.sh revert(calibre): remove hardcoded sqlite staging; db backup now via directive 2026-06-28 18:17:05 +00:00
gremlin-doc-flag.sh GALDS v1.2: migrate bash/Python write sites to centralized /galds endpoint 2026-07-14 00:41:57 +00:00
mailcow-poll.py GALDS v1.2: migrate bash/Python write sites to centralized /galds endpoint 2026-07-14 00:41:57 +00:00
README.md feat: initial repo structure 2026-05-12 02:21:35 +00:00
safe-redeploy.sh fix(safe-redeploy): use --autostash on git pull to handle unstaged checkpoint files 2026-06-30 13:04:30 +00:00
sanoid-galds-wrapper.sh add sanoid-galds-wrapper.sh -- routes ZFS snapshot runs through GALDS 2026-07-31 22:24:11 +00:00
sort_green_clips.py GALDS v1.2: migrate bash/Python write sites to centralized /galds endpoint 2026-07-14 00:41:57 +00:00
Test.md hjgj 2026-06-06 23:31:24 -05:00

grimoire

Gremlin's operational scripts for NetGrimoire infrastructure. One repo, all the things that run (as opposed to services, which is what declares).

Structure

grimoire/
├── lib/
│   └── common.sh       # Shared logging, ntfy helpers, utilities
├── pocket/             # Pocket Grimoire pre-trip and sync scripts
├── zfs/                # ZFS pool checks, snapshot management
├── network/            # Network diagnostics, OPNsense helpers
└── maintenance/        # General housekeeping scripts

Usage

All scripts source lib/common.sh for consistent logging and ntfy integration:

source "$(dirname "$0")/../lib/common.sh"

Environment

Scripts rely on environment variables for site-specific config. Required vars are documented per-script. Common ones:

Variable Default Purpose
NTFY_URL https://ntfy.netgrimoire.com ntfy server
NTFY_TOPIC gremlin-alerts Default notification topic

Conventions

  • Scripts are executable (chmod +x) and have a #!/usr/bin/env bash shebang
  • All scripts call require_env and require_cmd for their dependencies up front
  • Errors go to stderr; structured output goes to stdout
  • ntfy notifications use ntfy_ok / ntfy_warn / ntfy_err from common.sh
  • Scripts exit non-zero on failure; callers (n8n, cron) can act on exit codes

Owner

All automated commits attributed to the gremlin service account.