From 872aab2ff9756fd45596ef60383978d082ab0ce5 Mon Sep 17 00:00:00 2001 From: nathan Date: Thu, 14 May 2026 19:47:48 -0700 Subject: [PATCH] Move MVP tile delivery to dedicated VM --- AGRARIAN_DEVELOPMENT_ROADMAP.md | 3 +- Docs/Ops/MapTileDeliveryServerRunbook.md | 39 +++++++++++++----------- Scripts/verify_tile_delivery_client.sh | 2 +- 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/AGRARIAN_DEVELOPMENT_ROADMAP.md b/AGRARIAN_DEVELOPMENT_ROADMAP.md index a7608d3..8dc7de8 100644 --- a/AGRARIAN_DEVELOPMENT_ROADMAP.md +++ b/AGRARIAN_DEVELOPMENT_ROADMAP.md @@ -341,7 +341,8 @@ redownloaded when a player returns to a region. - [x] Publish a tiny Ground Zero tile manifest and package from the tile server. - [x] Prove client/server tile lookup, download, local cache, and redownload flow with the Ground Zero tile and immediate-neighbor metadata. - [x] Add tile-serving server cost controls and shutdown/runbook notes so MVP testing stays free or near-free. -- [ ] Move the MVP tile server from shared Ubuntu-Codex hosting to a dedicated `Agrarian-TileServer` VM or external cloud host before public testing. +- [x] Move the MVP tile server into a dedicated `Agrarian-TileServer` VM on Unraid. +- [ ] Decide whether public testing uses the LAN-hosted `Agrarian-TileServer` VM or an external cloud host. - [ ] Define client local tile cache layout. - [ ] Define local cache retention policy for old or unused tiles. - [ ] Define local cache redownload/revalidation behavior. diff --git a/Docs/Ops/MapTileDeliveryServerRunbook.md b/Docs/Ops/MapTileDeliveryServerRunbook.md index 0ce9824..0cb5618 100644 --- a/Docs/Ops/MapTileDeliveryServerRunbook.md +++ b/Docs/Ops/MapTileDeliveryServerRunbook.md @@ -51,27 +51,33 @@ and publishes: ## Current MVP VM -The first Unraid-hosted MVP tile server is running on the existing -`Ubuntu-Codex` VM while we keep costs at zero and avoid creating a new paid -cloud host too early. +The first Unraid-hosted MVP tile server is running inside its own dedicated +Ubuntu VM. Unraid is only the hypervisor and VM storage host for this service; +the tile service itself does not run on the Unraid OS. Current endpoint: ```text -http://192.168.5.10:18080 +http://192.168.5.14:18080 ``` -The uncommon port is intentional for this local MVP proof. The server publishes: +VM: -- `http://192.168.5.10:18080/health` -- `http://192.168.5.10:18080/manifest.json` -- `http://192.168.5.10:18080/ground_zero_tiles.json` -- `http://192.168.5.10:18080/tiles/gz_us_ca_pacifica_utm10n_e544_n4160/v0/...` +```text +Agrarian-TileServer +``` -The attempted dedicated `Agrarian-TileServer` VM bootstrap was deferred because -the Ubuntu cloud image download from Unraid was too slow to be practical during -this pass. A dedicated VM remains the next hardening step before exposing the -tile server outside the LAN. +The uncommon port is intentional for this local MVP proof. The server publishes +from `/srv/agrarian/tile-delivery/public`: + +- `http://192.168.5.14:18080/health` +- `http://192.168.5.14:18080/manifest.json` +- `http://192.168.5.14:18080/ground_zero_tiles.json` +- `http://192.168.5.14:18080/tiles/gz_us_ca_pacifica_utm10n_e544_n4160/v0/...` + +The Ubuntu cloud image was downloaded from the workstation and copied to +Unraid's ISO storage because direct download from Unraid was too slow. The VM +was then created from that cloud image with cloud-init. ## Verify Client Lookup And Cache @@ -79,7 +85,7 @@ From a representative Linux client with the repo mounted: ```bash cd /mnt/projects/AgrarianGameBulid -Scripts/verify_tile_delivery_client.sh http://192.168.5.10:18080 +Scripts/verify_tile_delivery_client.sh http://192.168.5.14:18080 ``` The verification script: @@ -115,6 +121,5 @@ Keep the MVP server small: ## Next Proof The current implementation proves static lookup/download/cache/redownload on -the LAN. The next operational hardening step is to move this from shared -`Ubuntu-Codex` hosting to a dedicated `Agrarian-TileServer` VM or external cloud -host when we need public testing. +the LAN. The next operational hardening step is deciding whether this VM stays +LAN-only or is replaced by an external cloud host when we need public testing. diff --git a/Scripts/verify_tile_delivery_client.sh b/Scripts/verify_tile_delivery_client.sh index 703372f..b122cf8 100644 --- a/Scripts/verify_tile_delivery_client.sh +++ b/Scripts/verify_tile_delivery_client.sh @@ -2,7 +2,7 @@ set -Eeuo pipefail PROJECT_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" -ENDPOINT="${1:-${AGRARIAN_TILE_SERVER_URL:-http://192.168.5.10:18080}}" +ENDPOINT="${1:-${AGRARIAN_TILE_SERVER_URL:-http://192.168.5.14:18080}}" ENDPOINT="${ENDPOINT%/}" CACHE_ROOT="${AGRARIAN_TILE_CLIENT_CACHE:-/tmp/agrarian-tile-client-cache-${USER:-user}}" URL_LIST="${CACHE_ROOT}/download-list.txt"