run-demo.sh opens a 2x2 tmux grid: egress-IP table looping in a netshoot pod, kubectl get px watch, and both create scripts running with COUNT (default 4) proxies. show-egress-ips-table.sh is the pane-sized one-line-per-proxy variant used by the driver. Co-Authored-By: Claude <noreply@anthropic.com>
2.7 KiB
Execution: Demo scripts
Plan: 2026-08-11-2220-demo-scripts.md
- Step 0 — Branch
feat/demo-scripts+ plan commit - Step 1 —
docs/demo/show-egress-ips.sh - Extra (added iteratively, not in the original plan) — proxy-creation scripts
Step 0 + Step 1
Branched off main, committed the plan alone, then wrote
docs/demo/show-egress-ips.sh: takes BASE_URL as its argument, lists
/v1/proxies (bearer auth via optional TOKEN env), probes each healthy
proxy with curl -x http://ip:port against an IP-echo site
(IP_ECHO_URL, default ipify JSON), banners which proxy each request goes
through, skips unhealthy ones, and ends with a probed/skipped/failed
summary. Per user request the script was left uncommitted for iteration
and no verification beyond bash -n was run.
Extra — create-kubernetes-proxies.sh, create-gcp-proxies.sh
Added on the same branch before the first commit:
create-kubernetes-proxies.sh <count>— createsproxy-kubernetes-demo-1..Nwith the kubernetes provider, spec taken fromconfig/samples/proxy_kubernetes.yaml, applied viakubectl apply -f -heredocs. OptionalNAMESPACEenv.create-gcp-proxies.sh <count>— createsproxy-gcp-demo-1..Nfrom the user-supplied gcp-eu manifest (e2-micro, Ubuntu 24.04, Squid cloud-init), each with a zone picked randomly from a hardcoded list of 27 EU zones so the fleet gets egress IPs from different locations. Env overrides:ZONES,GCP_PROVIDER(defaultgcp-eu),NAMESPACE.
Extra — run-demo.sh, show-egress-ips-table.sh
Second round of iterative additions:
run-demo.sh— tmux demo driver: 2x2 tiled grid with the egress-IP table looping every 10s inside a netshoot pod (scriptkubectl cp'd into the pod,BASE_URLset to the in-cluster Service FQDN),watch -n3 kubectl get px, and both create scripts auto-running withCOUNTproxies each (default 4). Env knobs:COUNT,SESSION,NETSHOOT_POD,DEMO_DIR(defaults to the script's own dir).show-egress-ips-table.sh— condensed one-line-per-proxy variant ofshow-egress-ips.shsized for a tmux pane: PROXY / ENDPOINT / LOCATION (zone→geo attribute fallback) / EGRESS-IP columns, with(unhealthy)andFAILEDinline instead of verbose output. The verbose script stays for standalone use; the demo driver uses the table variant.
Worth noting: beyond the user's sample manifest, the gcp script also
writes the picked zone into attributes.zone, so the discovery API
exposes each proxy's location and leases can select on it. The zone list
is static — if a project lacks quota in some region, ZONES narrows the
pool; nothing validates zones against the live project.