feat: wowmine: map
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
# WorldOfSosal live 3D map
|
||||
|
||||
The website links to `/wowmine/map/` on `store.hectic-lab.com`.
|
||||
BlueMap 5.29 CLI reads the running server's saved world on neuro:
|
||||
|
||||
- `crafting_azeroth:azeroth`, displayed as **Азерот**.
|
||||
- `crafting_azeroth:outland`, displayed as **Запределье**.
|
||||
|
||||
Only these dimensions are published. This is saved block geometry, not a
|
||||
static illustration. Unsaved changes cannot appear until Minecraft writes
|
||||
them. The standalone renderer does not publish live player locations.
|
||||
|
||||
Open **Menu → Maps** to switch dimensions. Drag to move, rotate the camera,
|
||||
and use zoom controls to inspect terrain. Unrendered areas initially remain
|
||||
empty; vertical walls can appear along incomplete coverage boundaries.
|
||||
|
||||
## Services and limits
|
||||
|
||||
`nixos/system/neuro/minecraft/bluemap.nix` defines
|
||||
`worldofsosal-bluemap.service`. It uses Java 25, a pinned CLI JAR, two render
|
||||
threads, a 3 GiB Java heap, 200% CPU quota, low CPU/I/O priority, and a 5 GiB
|
||||
cgroup memory limit. Minecraft's server directory is mounted read-only in
|
||||
the renderer's namespace. Its writable state lives exclusively under
|
||||
`/var/lib/worldofsosal-bluemap`, with separate private data and public web roots.
|
||||
|
||||
The renderer watches region files, with a 60-second update cooldown and a
|
||||
five-minute periodic region check. A full rescan is scheduled every 1440
|
||||
minutes. These settings do not promise a fixed end-to-end delay during the
|
||||
initial render or a large update backlog.
|
||||
|
||||
A separate timer checks free disk space each minute and stops only BlueMap
|
||||
below 20 GiB free. Free space must be restored before manually starting
|
||||
BlueMap again. Minecraft is not stopped by this guard.
|
||||
|
||||
`nixos/system/hectic-lab/worldofsosal-map.nix` defines a persistent private SSH
|
||||
forward using the existing root SSH alias `neuro`:
|
||||
|
||||
```text
|
||||
HTTPS /wowmine/map/
|
||||
→ hectic-lab 127.0.0.1:18100
|
||||
→ existing SSH transport
|
||||
→ neuro 127.0.0.1:8100
|
||||
```
|
||||
|
||||
No new public renderer port is opened. Nginx streams map events without proxy
|
||||
buffering. Only GET/HEAD are permitted. The Minecraft endpoint remains
|
||||
`wowmine.bfs.band:35565`.
|
||||
|
||||
## Initial rollout, November 18, 2026
|
||||
|
||||
Both maps were seeded with actual bounded renders around their starting
|
||||
coordinates, then unrestricted initial rendering was started in the managed
|
||||
service. The initial full render is **not complete**. Its early estimate was
|
||||
several days; the estimate changes with terrain density and server load.
|
||||
The presence of both map names does not establish full-world coverage.
|
||||
|
||||
Scoped runtime units were installed in `/etc/systemd/system.control` on both
|
||||
hosts, with their store dependencies GC-rooted under
|
||||
`/nix/var/nix/gcroots/worldofsosal-bluemap`. The Nix modules reproduce the
|
||||
configuration on a future normal deployment. No system-wide activation or
|
||||
Minecraft restart was performed for this rollout.
|
||||
|
||||
The existing deployed website, including its theme controls, was preserved.
|
||||
Only two links and the map proxy locations were added. The scoped Nginx unit
|
||||
points to `/nix/store/rj30dz9g052fa0044m6ran5wdfjlji8c-nginx.service/nginx.service`.
|
||||
Map state is persistent and intentionally outside Git.
|
||||
|
||||
## Operations and verification
|
||||
|
||||
```sh
|
||||
ssh neuro systemctl status worldofsosal-bluemap --no-pager
|
||||
ssh neuro journalctl -u worldofsosal-bluemap -n 30 --no-pager
|
||||
ssh neuro systemctl status worldofsosal-bluemap-space-guard.timer --no-pager
|
||||
ssh neuro df -h /var/lib/worldofsosal-bluemap
|
||||
ssh neuro du -sh /var/lib/worldofsosal-bluemap/web
|
||||
ssh hectic-lab systemctl status worldofsosal-bluemap-proxy --no-pager
|
||||
curl -fsS https://store.hectic-lab.com/wowmine/map/settings.json
|
||||
```
|
||||
|
||||
Actual geometry for both dimensions was inspected in a WebGL browser at phone
|
||||
and desktop sizes. Automatic updating was tested separately on a copied region:
|
||||
after adding a gold-block section to that isolated copy, the continuously
|
||||
running watcher regenerated mesh geometry within 6.142 seconds with a two-second
|
||||
test cooldown. Vertex count changed from 136368 to 145584 and maximum vertex
|
||||
height from 122 to 144. No manual rerender or process restart triggered it.
|
||||
This demonstrates the mechanism, not production latency with its larger queue.
|
||||
|
||||
Rollout evidence and reproducible isolated test scripts are retained locally
|
||||
under `/tmp/worldofsosal-bluemap/`; raw update evidence is
|
||||
`update-artifacts.tar.gz`. These temporary artifacts are not needed to run
|
||||
the persistent services.
|
||||
@@ -69,6 +69,7 @@ in {
|
||||
(import ./containers.nix { inherit flake self inputs; })
|
||||
./experimental-sshd.nix
|
||||
./minecraft-wow-proxy.nix
|
||||
./worldofsosal-map.nix
|
||||
(import ./ente.nix { inherit domain; })
|
||||
(import ./immich.nix { inherit domain inputs; })
|
||||
(import ./mechabellum.nix { inherit flake self inputs domain; })
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
</a>
|
||||
<nav class="main-nav" aria-label="Основная навигация">
|
||||
<a class="nav-world" href="#world">Мир сервера</a>
|
||||
<a class="nav-world" href="/wowmine/map/#azeroth:3742:80:8891:220:0.7:0.9:0:0:perspective">3D-карта</a>
|
||||
<a href="#start">Как начать</a>
|
||||
<a class="nav-help" href="#help">Вопросы</a>
|
||||
</nav>
|
||||
@@ -62,6 +63,7 @@
|
||||
Скачать сборку
|
||||
</a>
|
||||
<a class="hero-guide" href="#start">Как установить <svg class="icon" aria-hidden="true"><use href="#arrow"/></svg></a>
|
||||
<a class="hero-guide" href="/wowmine/map/#azeroth:3742:80:8891:220:0.7:0.9:0:0:perspective"><svg class="icon" aria-hidden="true"><use href="#map"/></svg> 3D-карта</a>
|
||||
</div>
|
||||
<p class="hero-note">Для Prism Launcher · с автообновлениями</p>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
systemd.services.worldofsosal-bluemap-proxy = {
|
||||
description = "Private BlueMap HTTP transport from neuro";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" ];
|
||||
serviceConfig = {
|
||||
User = "root";
|
||||
ExecStart = "${pkgs.openssh}/bin/ssh -NT -o BatchMode=yes -o IdentityAgent=none -o IdentitiesOnly=yes -o StrictHostKeyChecking=yes -o ExitOnForwardFailure=yes -o ConnectTimeout=10 -o ServerAliveInterval=15 -o ServerAliveCountMax=3 -L 127.0.0.1:18100:127.0.0.1:8100 neuro";
|
||||
Restart = "always";
|
||||
RestartSec = 10;
|
||||
NoNewPrivileges = true;
|
||||
ProtectSystem = "strict";
|
||||
ProtectHome = "read-only";
|
||||
PrivateTmp = true;
|
||||
CapabilityBoundingSet = "";
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."store.hectic-lab.com".locations = {
|
||||
"= /wowmine/map" = {
|
||||
extraConfig = "return 302 /wowmine/map/;";
|
||||
};
|
||||
"^~ /wowmine/map/" = {
|
||||
proxyPass = "http://127.0.0.1:18100/";
|
||||
extraConfig = ''
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header Connection "";
|
||||
proxy_buffering off;
|
||||
proxy_read_timeout 3600s;
|
||||
limit_except GET {
|
||||
deny all;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
serverDir = "${config.services.minecraft-servers.dataDir}/wowMineMap";
|
||||
stateDir = "/var/lib/worldofsosal-bluemap";
|
||||
diskCheck = "${pkgs.coreutils}/bin/test $(${pkgs.coreutils}/bin/df -B1 --output=avail ${stateDir} | ${pkgs.coreutils}/bin/tail -n1) -ge 21474836480";
|
||||
jar = pkgs.fetchurl {
|
||||
url = "https://github.com/BlueMap-Minecraft/BlueMap/releases/download/v5.29/bluemap-5.29-cli.jar";
|
||||
sha256 = "e830767fa6364b52b9310fb598508ebde7eec5ebe8360a989e240d991af89a3a";
|
||||
};
|
||||
in {
|
||||
systemd.services.worldofsosal-bluemap = {
|
||||
description = "WorldOfSosal live Azeroth and Outland 3D maps";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "network-online.target" "minecraft-server-wowMineMap.service" ];
|
||||
unitConfig.ConditionPathIsDirectory = "${serverDir}/world";
|
||||
preStart = ''
|
||||
${pkgs.coreutils}/bin/mkdir -p "${stateDir}/config"
|
||||
${pkgs.coreutils}/bin/cp -r --no-preserve=mode ${./bluemap}/. "${stateDir}/config/"
|
||||
'';
|
||||
serviceConfig = {
|
||||
User = "minecraft";
|
||||
Group = "minecraft";
|
||||
StateDirectory = "worldofsosal-bluemap";
|
||||
StateDirectoryMode = "0750";
|
||||
WorkingDirectory = stateDir;
|
||||
ExecCondition = "${pkgs.runtimeShell} -ec '${builtins.replaceStrings [ "$" ] [ "$$" ] diskCheck}'";
|
||||
ExecStart = "${pkgs.jdk25}/bin/java -Xms512m -Xmx3g -XX:ActiveProcessorCount=2 -Djava.awt.headless=true -jar ${jar} -c ${stateDir}/config -n ${serverDir}/mods -v 1.21.1 -r -u -w -g -s";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 15;
|
||||
CPUQuota = "200%";
|
||||
CPUWeight = 10;
|
||||
MemoryHigh = "4G";
|
||||
MemoryMax = "5G";
|
||||
Nice = 10;
|
||||
IOSchedulingClass = "idle";
|
||||
NoNewPrivileges = true;
|
||||
ProtectSystem = "strict";
|
||||
ProtectHome = true;
|
||||
PrivateTmp = true;
|
||||
ReadOnlyPaths = [ serverDir ];
|
||||
InaccessiblePaths = [ "${serverDir}/server.properties" "${serverDir}/config" ];
|
||||
RestrictSUIDSGID = true;
|
||||
LockPersonality = true;
|
||||
CapabilityBoundingSet = "";
|
||||
UMask = "0027";
|
||||
TimeoutStopSec = 120;
|
||||
};
|
||||
};
|
||||
systemd.services.worldofsosal-bluemap-space-guard = {
|
||||
description = "Keep 20 GiB free for Minecraft while rendering maps";
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
if ! ${diskCheck}; then
|
||||
echo "Stopping only BlueMap: less than 20 GiB free on map filesystem"
|
||||
${pkgs.systemd}/bin/systemctl stop worldofsosal-bluemap.service
|
||||
fi
|
||||
'';
|
||||
};
|
||||
systemd.timers.worldofsosal-bluemap-space-guard = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnBootSec = "1min";
|
||||
OnUnitActiveSec = "1min";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
accept-download: true
|
||||
data: "/var/lib/worldofsosal-bluemap/data"
|
||||
render-thread-count: 2
|
||||
update-cooldown: 60
|
||||
full-update-interval: 1440
|
||||
region-file-check-interval: 5
|
||||
scan-for-mod-resources: true
|
||||
metrics: false
|
||||
log: {
|
||||
file: "/var/lib/worldofsosal-bluemap/data/logs/debug.log"
|
||||
append: true
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
world: "/srv/minecraft/wowMineMap/world"
|
||||
dimension: "crafting_azeroth:azeroth"
|
||||
name: "Азерот"
|
||||
sorting: 0
|
||||
start-pos: { x: 3742, z: 8891 }
|
||||
sky-color: "#7dabff"
|
||||
void-color: "#000000"
|
||||
sky-light: 1
|
||||
ambient-light: 0.1
|
||||
remove-caves-below-y: -10000
|
||||
render-mask: []
|
||||
storage: "file"
|
||||
@@ -0,0 +1,12 @@
|
||||
world: "/srv/minecraft/wowMineMap/world"
|
||||
dimension: "crafting_azeroth:outland"
|
||||
name: "Запределье"
|
||||
sorting: 1
|
||||
start-pos: { x: -54520, z: -2296 }
|
||||
sky-color: "#281c46"
|
||||
void-color: "#080010"
|
||||
sky-light: 1
|
||||
ambient-light: 0.6
|
||||
remove-caves-below-y: -10000
|
||||
render-mask: []
|
||||
storage: "file"
|
||||
@@ -0,0 +1,3 @@
|
||||
storage-type: file
|
||||
root: "/var/lib/worldofsosal-bluemap/web/maps"
|
||||
compression: gzip
|
||||
@@ -0,0 +1,14 @@
|
||||
enabled: true
|
||||
webroot: "/var/lib/worldofsosal-bluemap/web"
|
||||
update-settings-file: true
|
||||
use-cookies: true
|
||||
default-to-flat-view: false
|
||||
min-zoom-distance: 5
|
||||
max-zoom-distance: 100000
|
||||
resolution-default: 1
|
||||
hires-slider-max: 500
|
||||
hires-slider-default: 100
|
||||
hires-slider-min: 0
|
||||
lowres-slider-max: 7000
|
||||
lowres-slider-default: 2000
|
||||
lowres-slider-min: 500
|
||||
@@ -0,0 +1,13 @@
|
||||
enabled: true
|
||||
webroot: "/var/lib/worldofsosal-bluemap/web"
|
||||
ip: "127.0.0.1"
|
||||
port: 8100
|
||||
sse-enabled: true
|
||||
additional-headers: {
|
||||
"Cache-Control": "no-cache"
|
||||
"X-Content-Type-Options": "nosniff"
|
||||
}
|
||||
log: {
|
||||
file: "/var/lib/worldofsosal-bluemap/data/logs/webserver.log"
|
||||
append: true
|
||||
}
|
||||
@@ -5,6 +5,7 @@
|
||||
./create-aeronautics.nix
|
||||
./wow-mine-map.nix
|
||||
./world-of-sosal.nix
|
||||
./bluemap.nix
|
||||
./backup-restore-test.nix
|
||||
./public-tunnel.nix
|
||||
./world-import.nix
|
||||
|
||||
Reference in New Issue
Block a user