ops: GOA vanilla landings stats wdGet + collect greening

This commit is contained in:
Hernâni Marques 2026-09-16 23:55:47 +02:00
parent 0d881cd726
commit 337d253691
No known key found for this signature in database
GPG key ID: CB5738652768F7E9
24 changed files with 1074 additions and 107 deletions

View file

@ -38,24 +38,48 @@ Details + JSON schema: `configs/bank-landing/README.md`.
## Demo withdraw + auto-account API
`demo-withdraw-api.py` listens on **127.0.0.1:19096** (proxied by nginx on the landing):
**FP reference SoT:** `$HOME/git/admin-logs/taler/francpaysan-admin-log`
(`files/testpaysan/demo-withdraw-api.py`, `files/caddy/Caddyfile` `@wdGet`).
GOA ports that pattern: mint `amount`+`exchange_url`, and GET Integration
injects `suggested_exchange` / `required_exchange` (Android/iOS).
`demo-withdraw-api.py` listens on **127.0.0.1:19096** (in bank CTR; nginx on :9013):
| Path | Behaviour |
|------|-----------|
| `GET /demo-withdraw.json` | Mint one-shot withdraw from shared **`explorer`** pool; write `withdraw.uri` + watch ids |
| `GET /auto-account.json` | Public `POST /accounts` with generated **`goa-account-<random>`** user + password containing **pleasechangeme**; **balance GOA:0**; return credentials once |
| `GET /taler-integration/withdrawal-operation/*` | Proxy libeufin + inject `suggested_exchange`/`required_exchange` |
Install / restart:
**Public path (Android):** Caddy `@wdGet` (GET only) → landing **:9013** → nginx → **:19096**.
POST / other Integration stays Caddy → **:9012** (raw libeufin).
FP stage proxies `@wdGet` straight to host `:19096`; GOA keeps 19096 CTR-only
and routes via published 9013 instead.
Install / restart (host, podman → `taler-hacktivism-bank`):
```bash
./install-demo-withdraw-api.sh
# Public checks:
curl -sS https://bank.hacktivism.ch/intro/demo-withdraw.json | head
curl -sS https://bank.hacktivism.ch/intro/auto-account.json | head # creates a real account
# After Caddy @wdGet + nginx Integration are live:
WID=… # from demo-withdraw.json
curl -sS "https://bank.hacktivism.ch/taler-integration/withdrawal-operation/$WID" \
| python3 -c 'import sys,json; d=json.load(sys.stdin); print(d.get("suggested_exchange"), d.get("required_exchange"))'
```
Requires **python3** in the bank container. Env: `BANK_URL`, `BANK_USER`/`BANK_PASS`
(or `/root/bank-explorer-password.txt`), `AMOUNT` (default `GOA:10` for shared withdraws).
(or `/root/bank-explorer-password.txt`), `AMOUNT` (default `GOA:10`),
`EXCHANGE_URL` (default `https://exchange.hacktivism.ch/`).
**Caddy (root on koopa — you apply):** insert `@wdGet` before the bank catch-all
`reverse_proxy 127.0.0.1:9012` in `~/koopa-caddy/Caddyfile` (SoT:
`configs/caddy/Caddyfile` / `host/caddy/Caddyfile`; paste-ready snippet:
`scripts/caddy/wdGet-bank-snippet.caddy`, also copied live as
`~/koopa-caddy/wdGet-bank-snippet.caddy`), then `sudo ~/bin/caddy-apply`.
Caddy alone is not enough — demo-api + nginx Integration must be installed
via `./install-demo-withdraw-api.sh` first.
### Auto-confirm (explorer only)