No description
- Python 79.7%
- Shell 20.3%
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 |
||
|---|---|---|
| backup | ||
| capacity | ||
| cron | ||
| gsds | ||
| healthcheck | ||
| ingest | ||
| .gitignore | ||
| common.sh | ||
| gitignore | ||
| gremlin-backup.sh | ||
| gremlin-doc-flag.sh | ||
| mailcow-poll.py | ||
| README.md | ||
| safe-redeploy.sh | ||
| sanoid-galds-wrapper.sh | ||
| sort_green_clips.py | ||
| Test.md | ||
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 bashshebang - All scripts call
require_envandrequire_cmdfor their dependencies up front - Errors go to stderr; structured output goes to stdout
- ntfy notifications use
ntfy_ok/ntfy_warn/ntfy_errfromcommon.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.