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) <noreply@anthropic.com>
This commit is contained in:
parent
9dec68175b
commit
4935e5beae
2 changed files with 14 additions and 14 deletions
|
|
@ -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
|
half of the [`poi-index`](../../../openspec/changes/poi-index/) change — it
|
||||||
replaces the third-party Overpass dependency for the Planner's POI overlays.
|
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)
|
Runs on the BRouter host as a non-root user (docker-group rights, no sudo). The
|
||||||
under the non-root `trails` user. The flagship import job
|
flagship import job (`infrastructure/scripts/poi-import.sh`) pulls the result
|
||||||
(`infrastructure/scripts/poi-import.sh`) pulls the result over the vSwitch.
|
over the vSwitch.
|
||||||
|
|
||||||
## Files
|
## Files
|
||||||
|
|
||||||
|
|
@ -49,18 +49,18 @@ artifact is unreachable from the public internet.
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
- **Docker** — osmium runs in a container (`osmium.Dockerfile`, built on first
|
- **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
|
use as `trails-osmium:local`). The pipeline's user is non-root with no sudo,
|
||||||
with no sudo, so osmium can't be apt-installed; docker-group rights cover it.
|
so osmium can't be apt-installed; docker-group rights cover it. On Linux this
|
||||||
On Linux this adds no meaningful overhead — big files are bind-mounted, so I/O
|
adds no meaningful overhead — big files are bind-mounted, so I/O is native.
|
||||||
is native.
|
|
||||||
- **On the host** (already present): `python3`, `curl`, `gzip`, `sha256sum`.
|
- **On the host** (already present): `python3`, `curl`, `gzip`, `sha256sum`.
|
||||||
|
|
||||||
## Install the timer
|
## 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
|
```bash
|
||||||
loginctl enable-linger trails
|
loginctl enable-linger "$USER"
|
||||||
mkdir -p ~/.config/systemd/user
|
mkdir -p ~/.config/systemd/user
|
||||||
cp poi-extract.service poi-extract.timer ~/.config/systemd/user/
|
cp poi-extract.service poi-extract.timer ~/.config/systemd/user/
|
||||||
systemctl --user daemon-reload
|
systemctl --user daemon-reload
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
# POI extract — one-shot unit driven by poi-extract.timer. Runs as the
|
# 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
|
# non-root pipeline user (docker-group rights, no sudo). Install as a user unit:
|
||||||
# a user unit: `systemctl --user enable --now poi-extract.timer` with lingering
|
# `systemctl --user enable --now poi-extract.timer` with lingering enabled
|
||||||
# enabled (`loginctl enable-linger trails`), or as a system unit with
|
# (`loginctl enable-linger "$USER"`), or as a system unit with User=<that user>.
|
||||||
# User=trails. See README.md.
|
# See README.md.
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Filter an OSM PBF to trails.cool POI categories and publish the artifact
|
Description=Filter an OSM PBF to trails.cool POI categories and publish the artifact
|
||||||
Wants=network-online.target
|
Wants=network-online.target
|
||||||
|
|
@ -10,7 +10,7 @@ After=network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
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
|
WorkingDirectory=%h/brouter/poi-extract
|
||||||
ExecStart=%h/brouter/poi-extract/poi-extract.sh
|
ExecStart=%h/brouter/poi-extract/poi-extract.sh
|
||||||
# The planet download + filter is long-running and IO-heavy; give it room and
|
# The planet download + filter is long-running and IO-heavy; give it room and
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue