Site updates no longer take the site down
Reliability
Why it matters: The site stays up while we ship an update, even during a major, and a bad update is undone automatically.
EyeOnMajors runs on two copies of the app. An update now replaces them one at a time, and each new copy is checked before it takes traffic, so the other copy keeps serving the site throughout.
If a new copy doesn’t come up healthy, the previous version is put back automatically, with no rebuild, while the site keeps running.
Commits (6)
-
578421bRolling deploy: one app container at a time, the old one put back if it fails -
ca49b0fFixes from the code review of the rolling deploy; proof tools -
cbfc2ddRolling deploy: signals during the build and the worker swap; review round 2 -
0d47d0cRolling deploy: stop the whole build on a signal; review round 3 -
7c2774bRolling deploy: refuse while nginx depends on app containers; staging nginx without depends_on -
52f30dedocs/rolling-deploy.md: how the rolling deploy works, with the staging proof
Files Changed (13)
.github/workflows/ci.yml | 9 +- .github/workflows/deploy-staging.yml | 7 +- Makefile | 90 +---- bin/deploy | 181 +++++---- bin/rolling-deploy | 656 ++++++++++++++++++++++++++++--- docs/rolling-deploy.md | 226 +++++++++++ podman-compose.production.yml | 5 +- podman-compose.staging.yml | 8 +- test/deploy/deploy_test.sh | 151 +++++++- test/deploy/proof/poll.sh | 22 ++ test/deploy/proof/snapshot.sh | 20 + test/deploy/rollback_test.sh | 115 ------ test/deploy/rolling_deploy_test.sh | 416 +++++++++++++++++++- 13 files changed, 1542 insertions(+), 364 deletions(-)