|
1 | 1 | # EPIC-10 Tasks: Serverless Infrastructure |
2 | 2 |
|
3 | | -**Status**: ~30% — Design complete, Hetzner client + provisioner + migration created, not yet functional end-to-end. |
| 3 | +**Status**: ~65% — Backend mostly complete (Hetzner client, provisioner, SQLC, config, Swarm constraints, admin API). Frontend dashboard done. Remaining: container executor full integration, lifecycle automation, platform admin frontend. |
4 | 4 |
|
5 | 5 | **Created**: 2026-03-19 |
6 | 6 |
|
|
40 | 40 | - [x] EnsureCapacity(ctx, workspaceID, needed) → error |
41 | 41 | - [x] MarkServerReady(ctx, serverID) → error |
42 | 42 | - [x] DestroyServer(ctx, serverID) → error |
43 | | -- [ ] checkIdleServers loop (every 5 min) |
44 | | -- [ ] Grace period: configurable idle timeout (default 1h) |
45 | | -- [ ] Server naming: `cc-{workspace_short}-{ulid}` |
| 43 | +- [x] checkIdleServers loop (every 5 min) — with idle state marking before destroy |
| 44 | +- [x] Grace period: configurable idle timeout (default 1h) |
| 45 | +- [x] Server naming: `cc-{workspace_short}-{ulid}` |
46 | 46 |
|
47 | 47 | ### T10.5: Container Executor Integration |
48 | 48 | - [ ] Container executor checks workspace servers before dispatching |
49 | 49 | - [ ] If no server with capacity → call EnsureCapacity, wait up to 3 min |
50 | | -- [ ] Swarm placement constraint: `node.labels.workspace == <ID>` |
| 50 | +- [x] Swarm placement constraint: `node.labels.workspace == <ID>` |
51 | 51 | - [ ] Increment/decrement container count on server record |
52 | 52 | - [ ] Handle server becoming unavailable mid-execution |
53 | 53 |
|
|
70 | 70 | ### T10.7: Config |
71 | 71 | - [x] Add infra section to config.yaml: enabled, provider, hetzner_api_token, datacenter, server_type, ssh_key_name, swarm_manager_ip, swarm_join_token, grace_period, max_servers_per_workspace, infra_secret |
72 | 72 | - [x] Environment variable overrides (CC_INFRA_*) — via viper AutomaticEnv |
73 | | -- [ ] Validate config on startup when infra.enabled = true |
| 73 | +- [x] Validate config on startup when infra.enabled = true |
74 | 74 |
|
75 | 75 | --- |
76 | 76 |
|
|
84 | 84 | - [x] Empty state when infra not enabled |
85 | 85 |
|
86 | 86 | ### T10.9: Platform Admin > Infrastructure |
87 | | -- [ ] All servers across all workspaces |
88 | | -- [ ] Total cost, total capacity |
89 | | -- [ ] Utilization percentage |
90 | | -- [ ] Filter by workspace |
| 87 | +- [x] All servers across all workspaces — GET /admin/infra/servers |
| 88 | +- [ ] Total cost, total capacity (frontend) |
| 89 | +- [ ] Utilization percentage (frontend) |
| 90 | +- [ ] Filter by workspace (frontend) |
91 | 91 |
|
92 | 92 | --- |
93 | 93 |
|
|
0 commit comments