feat(deploy): add guarded existing-ECS broker migration tooling

Discover the current Compose project and all override files from container
labels. Add read-only preflight plus prepare/check/build/activate/rollback
commands without editing the running .env, CA, database volumes or unrelated
services. Preserve heterogeneous application image identities for rollback.

Prepare a private keyring, independent router credential, pinned source
snapshot and additive connector/router overlay. Refuse key overwrite and
configuration/image drift. Build offline from the exact existing ARM64
runtime, smoke import and validate role settings through stdin-only inputs.
Require explicit v2 client readiness before activation and recreate only
connector/router with --no-deps. Document actual backup/image evidence,
current client limitation and token-lifecycle rollback boundaries.

Validation: 239 passed, 3 skipped (real PostgreSQL absent), 30 existing
dependency deprecation warnings. Add 26 mocked Docker policy tests; host
script parses as Python 3.7, CLI help/docs/diff checks pass. Docker policy
mocks are not actual Compose or ARM64 build validation.

No remote files, keys, credentials, containers or live configuration were
changed. Stage 5 operational acceptance remains pending actual ECS build,
real databases/platform, v2 client, key recovery and controlled rollout.
This commit is contained in:
ex_tianzy
2026-11-04 12:18:43 +08:00
parent d1ab834ecb
commit da1b4230b9
6 changed files with 778 additions and 1 deletions
+2
View File
@@ -4,6 +4,8 @@
阶段4新增[权威解绑、连接准入和任务生命周期](BINDING_TASK_LIFECYCLE.md),broker模式要求router独立准入凭据及PC v2握手。默认legacy不变;部署接线和客户端适配未完成前不要直接切换生产模式。
已有ECS升级请使用[保留现有部署的broker迁移指导](EXISTING_ECS_BROKER_DEPLOY.md),先运行只读preflight;工具可生成独立密钥和Compose叠加,构建候选但不自动启用。新客户端未就绪时不要使用activate,也不要重新init已有CA/数据库。
2026-10-28 新增[客户端主动消息与授权卡片](NOTIFICATIONS.md),本地代码已实现,现网部署和卡片验收待完成。
本目录用于新环境部署,源码对应 2026-10-27 ECS connector/router/longconn 导出版本。协议和业务源码保持原样。仓库其他快照目录用于追溯,不需要手工合并。