Skip to main content

Common Operations (Makefile)

The root Makefile in the automation repo wraps every Terraform and Ansible command. All secrets are pulled at runtime from Bitwarden (bw get password '<item name>') — never stored in the repo — so the item name is noted next to each target below.

First-time bootstrap / full-fleet

make setup-all      # terraform apply + wait for cloud-init + configure every VM
make update-all # re-run Ansible (update tag) across every VM, no Terraform

Infrastructure (Terraform)

make provision      # terraform apply — creates/resizes VMs, rarely needed directly
make wait # provision, then wait for cloud-init/SSH to come up

Per-server targets

AreaSetup / UpdateBitwarden secrets used
Docker Buildmake setup-docker-build / update-docker-buildDocker Registry Password
Gitea runner (on Docker Build)make setup-gitea-runner / update-gitea-runner— (needs a Gitea registration token)
Synthesis Testmake setup-synthesis-test / update-synthesis-testGithub Synthesis PAT, Docker Registry Password
Webservermake setup-webserver / update-webserverCloudflare DNS Token, Webserver htpasswd admin
Observabilitymake setup-observability / update-observabilityGrafana Admin Password
API Gatewaymake setup-api-gateway / update-api-gatewayAPI Gateway Admin Secret, Docker Registry Password
Services Usermake setup-services-user / update-services-userDocker Registry Password
Services User apps onlymake deploy-services-user-apps
Services Staffmake setup-services-staff / update-services-staffDocker Registry Password
Services Staff apps onlymake deploy-services-staff-apps
Giteamake deploy-giteaGitea DB Password, Gitea Admin Password
Rocket.Chatmake deploy-rocketchatRocket.Chat Admin Password

Amergin

make setup-amergin               # base host bring-up (Huggingface Token Amergin)
make update-amergin # re-apply Alloy/observability config only

make setup-fotheidil-api # (Fotheidil Supabase Key) — requires the vSwitch
make setup-fotheidil-recognition # (Huggingface Token Amergin) — requires the vSwitch + models on HF
make setup-batch-recognition # (Huggingface Token Amergin) — requires the vSwitch + models on HF

make setup-qomhra-llm # (Huggingface Token Amergin, Qomhra LLM API Key)
make update-qomhra-llm # re-apply vLLM config (tuning/key changes)

Puca

make setup-puca PUCA_PAT=github_pat_...   # generic: pass your own GitHub PAT
make setup-puca-john # (Github Puca PAT, Webserver htpasswd admin)
Known gap

setup-puca-joey is declared in the Makefile (with a PUCA_PAT_JOEY variable) but has no target body yet — it currently does nothing if invoked. Use make setup-puca PUCA_PAT=... instead until this is fixed.

Modifying infrastructure

  • Changing VM specs: edit the .tf files in terraform/hetzner-main/ — note the resize gotcha for webserver/services-staff described on their server pages.
  • Adding software/packages: edit the relevant playbook .yml in ansible/.
  • Adding or changing a public site: edit the vhost in networking/nginx-config/ and run make update-webserver.

See Modifying Infrastructure for the full walkthroughs.