Skip to content

Task Catalog

Every operator command in this repo is a Task target. task --list prints them all; this page groups them and says when to reach for each. Definitions live in Taskfile.yml (docs, CI) and taskfiles/*.yml.

Getting started on a new machine

brew install go-task          # once; other platforms: https://taskfile.dev/installation
task setup                    # CLIs + docs toolchain + ruflo, then setup:doctor
task auth                     # gcloud, GitHub, Tailscale
task kube:auth                # kubeconfig over Tailscale
task setup:doctor             # everything green?

Server tasks log in as your GitHub username, lowercased. If your server login differs (the :<login> suffix in ADMIN_USERS), export it once in your shell profile:

export TOMODA_SSH_USER=<login>

Kubernetes tasks use ~/.kube/tomoda-ovh.yaml unless KUBECONFIG is set.

Setup and logins

Task Does
setup One-time machine setup, then setup:doctor
setup:tools Installs gcloud, gh, kubectl, helm, kustomize, terraform, argocd, kubeconform, shellcheck, rclone, jq, yq, the CloudNativePG kubectl plugin (kubectl cnpg, macOS/Linux) and Tailscale (Homebrew on macOS/Linux, winget on Windows)
setup:ruflo Initialize ruflo (writes gitignored .mcp.json and .claude-flow/)
setup:doctor Checks tools, gcloud and gh logins, your GitHub SSH key, Tailscale, and cluster access; prints the fix for anything missing
auth auth:gcp, auth:gh, auth:tailscale in one go
auth:gcp gcloud auth login, sets the project, and application-default credentials (needed by local Terraform)
auth:gh GitHub CLI login
auth:tailscale Connects to the tailnet
auth:status Who you are logged in as in gcloud, gh, Tailscale and kubectl

Server

All over Tailscale. See Server Access.

Task Does
server:ssh SSH into tomoda-bhs-1
server:status Load, memory, disk, RAID, firewall, Tailscale, k3s, pending reboot
server:logs Follow the k3s service log
server:sync Copy scripts/ovh/ to ~/ovh on the server
server:users Re-apply admin logins (admin-users.sh): refresh GitHub keys, add or lock people
server:ghcr Push the GHCR pull credentials from Secret Manager to the node, restart k3s

Cluster

Task Does
kube:auth Fetch the kubeconfig over Tailscale into ~/.kube/tomoda-ovh.yaml
kube:status Nodes, usage, requested capacity, Argo CD apps, pods not running, unbound volumes, Postgres, unsynced ExternalSecrets, unready certificates, recent warnings
kube:pods / kube:ns / kube:context Quick listings
kube:logs -- prod Follow API logs (default dev)
kube:rollout -- tomoda-api prod Restart a deployment
k8s:validate Render every Helm app and validate against K8s schemas
argo:apps Every app with sync, health and revision
argo:health Only apps that are not Synced and Healthy
argo:refresh -- <app> Hard-refresh an app from git
argo:sync -- <app> Trigger a sync

Argo tasks use kubectl, so they need no argocd login. The UI is at argo-app.tomoda.life.

Data

Task Does
pg:status -- prod CNPG cluster status
pg:console -- prod psql on the current primary
pg:backup:list Prod base backups in R2 (needs an rclone remote named r2)
redis:cli -- prod redis-cli
dr:drill Quarterly restore drill into restore-drill; prod is only read. -- --target-time <time> for PITR, -- --keep to leave it up
dr:latest -- prod / dr:pitr -- prod <time> Restore from R2 into a new cluster; see Disaster Recovery. Only prod has backups
dr:cutover -- prod <cluster> Point git at a recovered cluster; commit and merge to apply

Terraform and secrets

CI plans every stack on PRs; which stacks it applies on merge, and which are applied locally, is in Terraform CI/CD. There is no apply task.

Task Does
tf:init terraform init for the cloudflare stack (needs auth:gcp)
tf:plan Plan the cloudflare stack with the same Secret Manager inputs CI uses
tf:fmt / tf:fmt:check Format infrastructure/, or fail if it needs formatting (what CI runs)
tf:validate Validate the cloudflare and gcp stacks
secrets:empty Secret Manager entries with no enabled version
secrets:setup Create missing entries and fill auto-generated values
secrets:rotate Rotate every auto-generated secret (asks first)

Images, docs and the rest

Task Does
images:build -- <image> Build a devops-owned image in GitHub Actions
images:list -- tomoda-backend Recent GHCR tags (needs gh auth refresh -s read:packages once)
docs / docs:build Serve or strictly build this site
docs:install / docs:clean Install the docs toolchain, remove the built site
ci (alias lint) Pre-push gate: terraform fmt check + validate, docs build
photon:index Build a Photon index (big machine only)