SPB Git
2.9 KB · 44 lines markdown
1# Deployment23## Topology45| Where | What |6|---|---|7| **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 |8| **BHS64** gateway | `tunnelctl add www.internetpressure.io BHS64b:8350` (+ apex redirect). DNS `A www → 51.161.112.61` (GoDaddy). |9| 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) |1011Secrets: `deploy/.env` on the server only (copy in `~/.internetpressure/env.bhs64b` on the laptop). Probe keys live in12production Postgres; sudo passwords of rented Macs in `~/.internetpressure/sudo.txt`.1314## Commands1516```bash17deploy/bin/prep-server.sh            # once: wg1 peer to BHS64, ufw, /opt/internetpressure, deploy/.env with random secrets18deploy/bin/deploy.sh                 # rsync → build images on BHS64b → compose up → migrate + seed → health19deploy/bin/deploy.sh route           # (re)create the public route on the gateway20deploy/bin/deploy.sh status|logs [svc]|restart [svc]|migrate|up|build21deploy/bin/probes.sh build           # cross-compile the Go agent22deploy/bin/probes.sh keys            # probe ids + HMAC keys (from production)23deploy/bin/probes.sh install [id…]   # push + install/upgrade the agent on the nodes24deploy/bin/probes.sh status          # /healthz of every probe25```2627Admin token: `grep IP_ADMIN_TOKEN ~/.internetpressure/env.bhs64b` → paste in https://www.internetpressure.io/admin.2829## Operations3031- Logs: `deploy/bin/deploy.sh logs engine` (or `api`, `bgp`, `web`, `edge`).32- 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'`.33- Postgres: `… exec postgres psql -U ip ip`.34- Config changes (weights…) are done in `/admin → Scoring`; the file `packages/config/pressure.yaml` is the default.35- Adding a probe: `POST /api/admin/probes` (or add to `data/seed/probes.yaml` + `deploy.sh migrate`), then `probes.sh install <id>`.36  Add the node to `~/.internetpressure/sudo.txt` if its sudo needs a password.37- Adding targets: `/admin → Targets` or `data/targets/targets.yaml` + `deploy.sh migrate` (seed is idempotent; it does not delete).38- The instrument's own health: `GET /api/v1/status` (`internal_status` ok/degraded/stale) and `/admin → Overview`.3940## Backups4142ClickHouse and Postgres volumes live on BHS64b's RAID-1 NVMe. `deploy/bin/backup.sh` (to add) should `pg_dump` and43`BACKUP TABLE … TO Disk` to BHS128 nightly; `pressure_history` and `bgp_stats_10s` are the irreplaceable tables.44
Files · e36455ea6a19cb6b1073fe73ccd48e5587c52258
Menu

Theme