You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3889b86
Browse filesBrowse the repository at this point in the historyBrowse files
feat(infra): autoscale services and verify backups and rollouts
Add CPU target tracking for web and api (2 to 6 tasks). scale.sh moves
the autoscaling floor and ceiling so stop.sh stays stopped.
Deploy now waits for services-stable and fails when the PRIMARY
deployment is not the revision it registered, so a circuit-breaker
rollback fails the run.
Add backup-db.sh and restore-db.sh (pg_restore via SSM into a scratch
database by default), host s3:GetObject on dumps, and an alarm when no
pg_dump lands for 26 hours. Add saved Logs Insights queries, more
dashboard widgets, an infra runbook, and requirement scores.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Terraform for every cell in `var.cells` (today: `node-3tier`, env `prod`, `us-east-1`).
4
+
State: S3 backend in `versions.tf`. Apply: the `Cell apply` workflow, or `terraform apply` here.
5
+
6
+
## Runtime scripts
7
+
8
+
All take the cell name. `AWS_REGION` and `ENVIRONMENT` override `us-east-1` and `prod`.
9
+
10
+
| Script | Does |
11
+
| --- | --- |
12
+
|`scripts/start.sh <cell>`|`web` and `api` to 2 tasks, autoscaling floor 2, ceiling 6. |
13
+
|`scripts/stop.sh <cell>`|`web` and `api` to 0 tasks, floor and ceiling 0. |
14
+
|`scripts/scale.sh <cell> <web\|api\|all> <n>`| Desired count and floor to `n`. Ceiling `MAX_COUNT` (6) or `n` if higher. |
15
+
|`scripts/backup-db.sh <cell>`|`pg_dump` to S3 now, then an AWS Backup job for the data volume. |
16
+
|`scripts/restore-db.sh <cell> [stamp\|latest] [db]`|`pg_restore` a dump on the host via SSM. Default target is the scratch DB `<db>_restore`. Over the live DB needs `RESTORE_LIVE=yes`. |
17
+
18
+
The next apply resets the autoscaling floor and ceiling to the cell config (`runtime.desired_count`, `runtime.max_count`).
0 commit comments