Remove outdated edge gateway object classes, add new agent implementation

Transitioned from obsolete gateway object classes (`edge_gateway_shell_action_jobs_o`, `edge_gateway_shell_events_o`, `edge_gateway_shell_sessions_o`, `edge_gateway_update_jobs_o`) to the new agent implementation (`edge-gateway-agent/agent.php`).
This commit is contained in:
Jeppe Bundgaard
2026-04-21 14:13:17 +02:00
parent d30a006457
commit 7d450e285e
90 changed files with 11811 additions and 2760 deletions
+45
View File
@@ -26,6 +26,32 @@ The API is accessible at:
- `https://localhost` (using Traefik default cert)
- `http(s)://localhost/api/` (proxied with `/api` prefix stripped)
### Test Gateway Container
To run a real PHP edge agent as a disposable Dockerized test gateway against the local stack, first create an install token from the edge gateway admin UI, then start the helper:
```powershell
.\scripts\test-gateway.ps1 start --install-token <token>
```
```bash
./scripts/test-gateway.sh start --install-token <token>
```
The helper will:
- start the local compose dependencies if needed
- claim a gateway through `http://localhost/api/edge-agent/claim`
- write the generated config to `.tmp/test-gateway/test-gateway.json`
- build `services/edge-agent/Dockerfile.test-gateway`
- run the PHP agent container on the local compose network
Useful follow-up commands:
```powershell
.\scripts\test-gateway.ps1 logs
.\scripts\test-gateway.ps1 status
.\scripts\test-gateway.ps1 stop
```
To start all services including multiple PHP workers and development tools (Jaeger, Portainer):
```powershell
docker compose --profile dev up -d
@@ -74,6 +100,25 @@ $env:RUN_INTEGRATION_TESTS='1'
composer test:integration
```
### Public Staging Edge-Gateway Smoke
`api.truckwash.io:4433` is the public staging ingress. For Edge Gateways v2, the router must serve the canonical artifacts from `services/nginx/app/resources/edge-gateway-agent`, not from the legacy `dist/agent.mjs` output or a separate runtime mount.
To verify the public staging stack after a deploy, use a real installer token and run:
```powershell
node .\scripts\staging-edge-gateway-smoke.mjs --install-token <token>
```
```bash
node ./scripts/staging-edge-gateway-smoke.mjs --install-token <token>
```
The smoke check fails unless all of these return `200` from the public domain:
- `/ping`
- `/edge-agent/artifacts/agent.php`
- `/edge-agent/artifacts/truckwash-edge-agent.service`
- `/edge-agent/install.sh?token=<real token>`
### API Test Suite
The `Api` suite exercises real HTTP endpoints instead of calling route handlers in-process.