feat(dev-new): move the WoW realm off the portable card #370
No reviewers
Labels
No labels
bug
enhancement
in-progress
needs-info
needs-triage
p0
ready-for-agent
ready-for-human
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/nixos!370
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "afk/wow-server-on-dev-new"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Moves the AzerothCore realm off the portable SD card onto
dev-new, reachable aswow.cloonar.comfrom the LAN and overwg_cloonar. Design and reasoning: ADR-0027. Migration procedure:docs/runbooks/wow-realm-cutover.md.Why
The card ran its own realm on whichever machine held it:
server-up.shcopied the database off the card onto the internal drive, started three rootless podman containers on loopback, andserver-down.shcopied the changed blocks back. All of that exists because the card travels — and it costs a sync protocol (sync tokens, dirty flag, libpod DB resets, orphan sweeps), podman on every play device, and a 200-bot worldserver running on the same machine that renders the game.What this does
hosts/dev-new/modules/wow/— nativemysql84with the fouracore_*databases;authserver/worldserveras the existing prebuilt images from the Forgejo registry, on--network=host.restartIfChanged = falseon both container units plus an 05:00 restart timer. This host switches every five minutes; a channel bump moving the podman paths would otherwise disconnect a session mid-fight.CPUWeight = 20so the permanent bot population yields to builds and agents under contention, and only then.services.mysqlBackupforacore_auth/acore_characters/acore_playerbots.acore_worldis most of the bytes and is regenerated bywow-db-import.wow.cloonar.comin fw's dnsmasq. Bothrealmlist.wtfand therealmdrow use the name.wow-portable.nixdrops podman, fuse-overlayfs and both user units;steam.nixdrops the subuid/subgid FHS-sandbox workaround andWOW_SERVER_VIA_SYSTEMD. Only the card mount machinery stays, since the client still travels.Two findings worth flagging
The card's AzerothCore checkout was dirty. Rev
ceeb3116ebedcarries an uncommitted 60-line fix toboss_valithria_dreamwalker.cppthat makes healing Valithria a valid pull, so a bot raid can do the encounter. It is compiled into the running worldserver and existed nowhere but that SD card. Committed here aspatches/0001-valithria-heal-starts-the-encounter.patch.The configs contained the DB password inline on five
*DatabaseInfolines. Committed scrubbed (__set_via_AC_env__); the real credentials come from sops viaAC_*_DATABASE_INFO, which override the file — a mechanism the current setup already proves (Server.log: Found config value 'PlayerbotsDatabaseInfo' from environment variable).Not done, deliberately
session.shis untouched. Editing it now would point the working setup at a server that does not exist. It is step 6 of the runbook.dev-newneeds a Hetzner Storage Box sub-account that does not exist yet;mysqlBackupwrites daily dumps to/var/backup/mysqllocally in the meantime. The nix snippet is in the runbook prerequisites.Before merging
hosts/dev-new/secrets.sops.yamlneedswow-db-password(alphanumeric — it is interpolated into SQL bywow-provision.service), and the images must be pushed togit.cloonar.com/cloonaras:ceeb3116.Ordering trap: the
mysqldumpandpodman savein runbook phase 2 must happen before this deploys, because the deploy removes podman from nb.Verification
scripts/test-configurationdry-builds clean fordev-new,fwandnb. Nothing is deployed and no data has moved; the card's realm is untouched and still authoritative.Related: #369 (put the card's remaining scripts under version control).
Cutover phases 1–4 are done, so this PR is unblocked. Nothing is deployed and the card is still authoritative — a rollback needs no action beyond not merging.
Captured from the card (
/home/dominik/wow-cutover/on nb):acore-precutover.sql— 363 MB, all four databases, verified complete. Taken with the world and auth servers stopped so characters were flushed and nothing was mid-write.acore-{worldserver,authserver,db-import}.tar— 712 MB / 231 MB / 1.2 GB.The card stack was then stopped cleanly;
server-down.shcopied the database back (41 MB newly written).Staged on dev-new:
/var/lib/wow/data(3.1 GB, dbc/maps/mmaps/vmaps),/var/lib/wow/modules(108 MB), and the dump at/var/lib/wow/acore-precutover.sql.Images pushed to
git.cloonar.com/cloonar/acore-*:ceeb3116and confirmed to pull anonymously from dev-new — no registry credentials are needed on the host. Now digest-pinned in the module as well as tagged, per ADR-0026:wow-db-passwordis inhosts/dev-new/secrets.sops.yaml.Runbook corrections, from actually running it
source bin/common.sh; setup_podman_envfirst. Without it podman uses its default store and reports no containers at all rather than an error — which reads as "the stack isn't running" when it is.acore-worldserverandacore-authserverfirst. 200 bots write continuously, and--single-transactiondoes not cover MyISAM tables./home, not/tmp— nb's root is a 16 GB tmpfs and the pre-cutover dump has to survive a reboot.Cleanup needed (my mistake, needs the web UI)
Three junk container repos exist on fw from a first push where zsh's
$i:cparameter modifier ate the tag separator:acore-worldservereeb3116,acore-authservereeb3116,acore-db-importeeb3116, about 2.1 GB total.teacannot delete packages, so they need removing from the Forgejo packages UI under thecloonarorg.After merge
Runbook phase 5 (import the dump, run
wow-db-import, start the servers, verify the realm row and that 3724/8085 listen), then phase 6 (session.sh: realmlist towow.cloonar.com, drop the server bring-up calls).Still open, unchanged: offsite backups need a Hetzner Storage Box sub-account, and the world tick at 500–1000 bots is unmeasured by design.