Deployment
Topology
| Where | What |
|---|---|
BHS64b (ssh BHS64b, ubuntu@51.161.112.66, OVH Beauharnois, 8 c/16 t, 64 GB) |
Docker Compose infra/compose.yml in /opt/internetpressure: edge Caddy :8350 (bound to wg1 10.67.0.61), web, api, engine, bgp, corroboration, Postgres 17, ClickHouse 25.8, Redis 7 |
| BHS64 gateway | tunnelctl add www.internetpressure.io BHS64b:8350 (+ apex redirect). DNS A www → 51.161.112.61 (GoDaddy). |
| Probes | ca-qc-01 M4M36 · ca-mtl-01 BHS128 · us-atl-01 m2m16b · fr-gra-01 R9128 · ie-dub-01 m1m16 · tr-ist-01 m4mh · tr-usk-01 m4mi · cy-ayn-01 m4mg — LaunchDaemon io.internetpressure.probe (macOS) / ip-probe.service (Linux) |
Secrets: deploy/.env on the server only (copy in ~/.internetpressure/env.bhs64b on the laptop). Probe keys live in
production Postgres; sudo passwords of rented Macs in ~/.internetpressure/sudo.txt.
Commands
bash
deploy/bin/prep-server.sh # once: wg1 peer to BHS64, ufw, /opt/internetpressure, deploy/.env with random secrets
deploy/bin/deploy.sh # rsync → build images on BHS64b → compose up → migrate + seed → health
deploy/bin/deploy.sh route # (re)create the public route on the gateway
deploy/bin/deploy.sh status|logs [svc]|restart [svc]|migrate|up|build
deploy/bin/probes.sh build # cross-compile the Go agent
deploy/bin/probes.sh keys # probe ids + HMAC keys (from production)
deploy/bin/probes.sh install [id…] # push + install/upgrade the agent on the nodes
deploy/bin/probes.sh status # /healthz of every probeAdmin token: grep IP_ADMIN_TOKEN ~/.internetpressure/env.bhs64b → paste in https://www.internetpressure.io/admin.
Operations
- Logs:
deploy/bin/deploy.sh logs engine(orapi,bgp,web,edge). - ClickHouse shell:
ssh BHS64b 'cd /opt/internetpressure && docker compose -f infra/compose.yml --env-file deploy/.env exec clickhouse clickhouse-client -u ip --password "$(grep CLICKHOUSE_PASSWORD deploy/.env | cut -d= -f2)" -d ip'. - Postgres:
… exec postgres psql -U ip ip. - Config changes (weights…) are done in
/admin → Scoring; the filepackages/config/pressure.yamlis the default. - Adding a probe:
POST /api/admin/probes(or add todata/seed/probes.yaml+deploy.sh migrate), thenprobes.sh install <id>. Add the node to~/.internetpressure/sudo.txtif its sudo needs a password. - Adding targets:
/admin → Targetsordata/targets/targets.yaml+deploy.sh migrate(seed is idempotent; it does not delete). - The instrument's own health:
GET /api/v1/status(internal_statusok/degraded/stale) and/admin → Overview.
Backups
ClickHouse and Postgres volumes live on BHS64b's RAID-1 NVMe. deploy/bin/backup.sh (to add) should pg_dump and
BACKUP TABLE … TO Disk to BHS128 nightly; pressure_history and bgp_stats_10s are the irreplaceable tables.