forked from EduCraft/curriculum-project-hub
docs: resolve clean-host deployment audit
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Audit the clean-host deployment and rollback contract
|
||||
|
||||
Type: research
|
||||
Status: open
|
||||
Status: resolved
|
||||
|
||||
## Question
|
||||
|
||||
@@ -9,3 +9,25 @@ What concrete defects prevent a clean, supported Linux host from installing,
|
||||
starting, health-checking, upgrading, and rolling back the current Hub without
|
||||
manual repository knowledge or unsafe partial deployment?
|
||||
|
||||
## Answer
|
||||
|
||||
The current path is a happy-path updater for a manually prepared host, not a
|
||||
production deployment mechanism. The executed audit found an unrunnable seeded
|
||||
configuration, an unprovisioned service identity and storage, a missing `cph`
|
||||
artifact, in-place mutation before build success, liveness-only verification,
|
||||
no coordinated application/schema rollback, and a configured bind host that the
|
||||
server ignores.
|
||||
|
||||
The complete evidence, operational consequences, required release invariants,
|
||||
and verification scenarios are recorded in the
|
||||
[clean-host deployment and rollback audit](../assets/clean-host-deployment-audit.md).
|
||||
|
||||
The accepted single-host topology remains suitable. The route forward is now
|
||||
explicit in these implementation tickets:
|
||||
|
||||
- [Provision a runnable non-root Hub service](10-provision-nonroot-service.md)
|
||||
- [Package and verify cph with every Hub release](11-package-cph-with-release.md)
|
||||
- [Make application releases atomic and rollbackable](12-atomic-releases-and-rollback.md)
|
||||
- [Add real readiness and an accurate service lifecycle](13-real-readiness-and-lifecycle.md)
|
||||
- [Establish migration compatibility and failed-migration recovery](14-migration-compatibility-and-recovery.md)
|
||||
- [Test clean-host deployment and rollback on Linux](15-test-clean-host-deployments-on-linux.md)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Type: task
|
||||
Status: open
|
||||
Blocked by: 01, 02, 03, 04, 05, 06, 07, 09
|
||||
Blocked by: 01, 02, 03, 04, 05, 06, 07, 09, 10, 11, 12, 13, 14, 15
|
||||
|
||||
## Question
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Provision a runnable non-root Hub service
|
||||
|
||||
Type: task
|
||||
Status: open
|
||||
|
||||
## Question
|
||||
|
||||
Make clean-host installation create or validate the dedicated service identity,
|
||||
home/cache/state/workspace paths and ownership, generate a complete production
|
||||
configuration, honor the configured bind host, and fail preflight before unit
|
||||
installation when any required value or prerequisite is invalid.
|
||||
@@ -0,0 +1,10 @@
|
||||
# Package and verify cph with every Hub release
|
||||
|
||||
Type: task
|
||||
Status: open
|
||||
|
||||
## Question
|
||||
|
||||
Deliver the compatible `cph` executable as part of the same immutable release
|
||||
as the Hub, configure its exact path, and make deployment preflight reject a
|
||||
missing, non-executable, or version-incompatible binary before restart.
|
||||
@@ -0,0 +1,12 @@
|
||||
# Make application releases atomic and rollbackable
|
||||
|
||||
Type: task
|
||||
Status: open
|
||||
Blocked by: 10, 11
|
||||
|
||||
## Question
|
||||
|
||||
Replace in-place rsync/build with deployment locking, immutable staged release
|
||||
directories, a revision manifest, atomic current/previous switching, bounded
|
||||
retention, and an explicit application rollback that preserves the live release
|
||||
on build, preflight, switch, or readiness failure.
|
||||
@@ -0,0 +1,12 @@
|
||||
# Add real readiness and an accurate service lifecycle
|
||||
|
||||
Type: task
|
||||
Status: open
|
||||
Blocked by: 03, 04, 10, 11, 12
|
||||
|
||||
## Question
|
||||
|
||||
Separate liveness from readiness, verify every dependency needed to accept Hub
|
||||
work, make deployment wait on readiness, and align systemd shutdown/restart
|
||||
claims with an implemented and observable Fastify, Feishu, Prisma, and in-flight
|
||||
run lifecycle.
|
||||
@@ -0,0 +1,13 @@
|
||||
# Establish migration compatibility and failed-migration recovery
|
||||
|
||||
Type: task
|
||||
Status: open
|
||||
Blocked by: 06
|
||||
|
||||
## Question
|
||||
|
||||
Define and enforce the application/schema compatibility rule for each release,
|
||||
require expand-and-contract sequencing for destructive changes, add migration
|
||||
status and production-like rehearsal gates, and provide an operator procedure
|
||||
for recovering a partially failed Prisma migration without pretending that an
|
||||
application rollback reverses the database.
|
||||
@@ -0,0 +1,12 @@
|
||||
# Test clean-host deployment and rollback on Linux
|
||||
|
||||
Type: task
|
||||
Status: open
|
||||
Blocked by: 10, 11, 12, 13, 14
|
||||
|
||||
## Question
|
||||
|
||||
Add an automated Linux production-like harness that executes the real install,
|
||||
deploy and rollback paths against PostgreSQL and proves first install,
|
||||
idempotence, failure atomicity, readiness failures, application rollback, and
|
||||
deployment serialization.
|
||||
Reference in New Issue
Block a user