From 4935e5beae8c44db0b69eb3fc02a4d6420387175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ullrich=20Sch=C3=A4fer?= Date: Sun, 12 Jul 2026 23:29:45 +0200 Subject: [PATCH] poi-index: generalize poi-extract docs/units (drop host/username specifics) Remove ullrich.is / 1.8 TB / hardcoded 'trails' username assumptions from the poi-extract README and service unit; refer to 'the pipeline user' and $USER / %h instead so the docs serve self-hosters too. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../brouter-host/poi-extract/README.md | 18 +++++++++--------- .../poi-extract/poi-extract.service | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/infrastructure/brouter-host/poi-extract/README.md b/infrastructure/brouter-host/poi-extract/README.md index 05396ff..095a66b 100644 --- a/infrastructure/brouter-host/poi-extract/README.md +++ b/infrastructure/brouter-host/poi-extract/README.md @@ -5,9 +5,9 @@ Monthly job that turns an OSM PBF into the compact POI artifact the flagship's half of the [`poi-index`](../../../openspec/changes/poi-index/) change — it replaces the third-party Overpass dependency for the Planner's POI overlays. -Runs on the dedicated BRouter host (`ullrich.is`, the box with 1.8 TB free) -under the non-root `trails` user. The flagship import job -(`infrastructure/scripts/poi-import.sh`) pulls the result over the vSwitch. +Runs on the BRouter host as a non-root user (docker-group rights, no sudo). The +flagship import job (`infrastructure/scripts/poi-import.sh`) pulls the result +over the vSwitch. ## Files @@ -49,18 +49,18 @@ artifact is unreachable from the public internet. ## Prerequisites - **Docker** — osmium runs in a container (`osmium.Dockerfile`, built on first - use as `trails-osmium:local`). The BRouter host's `trails` user is non-root - with no sudo, so osmium can't be apt-installed; docker-group rights cover it. - On Linux this adds no meaningful overhead — big files are bind-mounted, so I/O - is native. + use as `trails-osmium:local`). The pipeline's user is non-root with no sudo, + so osmium can't be apt-installed; docker-group rights cover it. On Linux this + adds no meaningful overhead — big files are bind-mounted, so I/O is native. - **On the host** (already present): `python3`, `curl`, `gzip`, `sha256sum`. ## Install the timer -Deployed under `~trails/brouter/poi-extract/`. As a user unit with lingering: +Deployed under the pipeline user's `~/brouter/poi-extract/`. As a user unit with +lingering (so the timer runs even when nobody is logged in): ```bash -loginctl enable-linger trails +loginctl enable-linger "$USER" mkdir -p ~/.config/systemd/user cp poi-extract.service poi-extract.timer ~/.config/systemd/user/ systemctl --user daemon-reload diff --git a/infrastructure/brouter-host/poi-extract/poi-extract.service b/infrastructure/brouter-host/poi-extract/poi-extract.service index 5b751ce..f194d81 100644 --- a/infrastructure/brouter-host/poi-extract/poi-extract.service +++ b/infrastructure/brouter-host/poi-extract/poi-extract.service @@ -1,8 +1,8 @@ # POI extract — one-shot unit driven by poi-extract.timer. Runs as the -# non-root `trails` user (docker-group, scoped to ~trails/brouter/). Install as -# a user unit: `systemctl --user enable --now poi-extract.timer` with lingering -# enabled (`loginctl enable-linger trails`), or as a system unit with -# User=trails. See README.md. +# non-root pipeline user (docker-group rights, no sudo). Install as a user unit: +# `systemctl --user enable --now poi-extract.timer` with lingering enabled +# (`loginctl enable-linger "$USER"`), or as a system unit with User=. +# See README.md. [Unit] Description=Filter an OSM PBF to trails.cool POI categories and publish the artifact Wants=network-online.target @@ -10,7 +10,7 @@ After=network-online.target [Service] Type=oneshot -# Adjust WorkingDirectory to the deployed path (e.g. /home/trails/brouter/poi-extract). +# %h resolves to the running user's home; adjust if deployed elsewhere. WorkingDirectory=%h/brouter/poi-extract ExecStart=%h/brouter/poi-extract/poi-extract.sh # The planet download + filter is long-running and IO-heavy; give it room and