mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-20 16:07:11 +08:00
feat(ql3): materialize auditable local trial kits
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
|
||||
该实物保存在工作区忽略目录,不进入 Git,也尚未上传 GitHub。公开下载仍需维护者明确授权上传。它只含 headless Application,没有可下载的 `ql3 setup/owner/task/...` 管理制品;因此它足以证明 runtime 工程可用性,但不能独立完成部署用户旅程。此前“单架构内部试运行材料”的表述按 D-408 收紧为“运行时工程候选”。
|
||||
|
||||
ADR-0503 已增加独立的 `qinglong3-local-operator`:它复用现有统一 `ql3` CLI,每次执行一个 command-file 命令后退出,不进入常驻 Application。后续手动 Alpha run 会把 Application 与 operator 通过一次 `docker image save` 写入同一架构的去重 archive;只有原生 Linux amd64/arm64 都完成 fresh setup、首 Owner ceremony、Application active/stop 和 SQLite integrity 后,才能升级为 Local Alpha Trial Kit。
|
||||
ADR-0503 已增加独立的 `qinglong3-local-operator`:它复用现有统一 `ql3` CLI,每次执行一个 command-file 命令后退出,不进入常驻 Application。提交 `2253b99066e0c221e11dc01384f496ec2a50e4bd` 的原生 Linux amd64/arm64 已同时通过 fresh setup、首 Owner ceremony、Application active/stop 和 SQLite integrity,CI run `32918632202` 为 40/40。ADR-0504 又把一次 `docker image save`、manifest、SBOM、README、`SHA256SUMS` 和离线审计收敛为同一个 materializer;下一项未完成的外部里程碑是维护者授权生成并保留两个可下载 archive。
|
||||
|
||||
## 生成
|
||||
|
||||
@@ -40,9 +40,9 @@ ADR-0503 已增加独立的 `qinglong3-local-operator`:它复用现有统一 `
|
||||
Local artifact 含:
|
||||
|
||||
- 一个包含 Application 与短生命周期 operator 的 `qinglong3-local-trial-kit-<arch>.docker.tar`;共享 Node 基础层在 archive 中去重;
|
||||
- schema 为 `qinglong/alpha-local-trial-kit@v1` 的 `manifest.json`,绑定版本、完整 source commit、架构、两个 image tag/image ID、共同 archive SHA-256 与已通过 gate;
|
||||
- schema 为 `qinglong/alpha-local-trial-kit@v1` 的 `manifest.json`,通过 `archive/images/sboms/readme/verification` 绑定版本、完整 source commit、架构、两个 image tag/image ID、文件长度/SHA-256 与已通过 gate;
|
||||
- 与实际只读镜像 inventory 对账过的 CycloneDX SBOM;
|
||||
- 本说明。
|
||||
- 面向 Local 用户的 README 与覆盖全部内容文件的 `SHA256SUMS`。
|
||||
|
||||
Cluster artifact 仍是每个角色一个 native Docker archive 和各自 manifest。
|
||||
|
||||
@@ -53,17 +53,15 @@ Cluster artifact 仍是每个角色一个 native Docker archive 和各自 manife
|
||||
在同架构 Linux Docker 主机上进入解压后的 artifact 目录:
|
||||
|
||||
```sh
|
||||
archive="$(find . -maxdepth 1 -name '*.docker.tar' -type f -print -quit)"
|
||||
expected="$(node -p "require('./manifest.json').archiveSha256")"
|
||||
actual="sha256:$(sha256sum "${archive}" | cut -d ' ' -f 1)"
|
||||
test "${actual}" = "${expected}"
|
||||
sha256sum --check SHA256SUMS
|
||||
|
||||
archive="$(node -p "require('./manifest.json').archive.file")"
|
||||
docker load --input "${archive}"
|
||||
image="$(node -p "require('./manifest.json').image")"
|
||||
expected_id="$(node -p "require('./manifest.json').imageId")"
|
||||
image="$(node -p "require('./manifest.json').images.application.reference")"
|
||||
expected_id="$(node -p "require('./manifest.json').images.application.id")"
|
||||
test "$(docker image inspect --format '{{.Id}}' "${image}")" = "${expected_id}"
|
||||
operator_image="$(node -p "require('./manifest.json').operator.image")"
|
||||
operator_expected_id="$(node -p "require('./manifest.json').operator.imageId")"
|
||||
operator_image="$(node -p "require('./manifest.json').images.operator.reference")"
|
||||
operator_expected_id="$(node -p "require('./manifest.json').images.operator.id")"
|
||||
test "$(docker image inspect --format '{{.Id}}' "${operator_image}")" = "${operator_expected_id}"
|
||||
docker run --rm --read-only --network none --cap-drop ALL \
|
||||
--security-opt no-new-privileges "${image}" --help
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
# QingLong 3.0 Local Alpha Trial Kit
|
||||
|
||||
本目录是绑定一个 QingLong 3.0 源码提交和一个 Linux 架构的阶段试运行套件,不是公开 release 或生产升级承诺。它同时包含常驻 Application 镜像和短生命周期 operator 镜像;两者共享的 OCI layer 只在同一个 Docker archive 中保存一次。
|
||||
|
||||
## 适用范围
|
||||
|
||||
- `amd64` 或 `arm64` Linux Docker 主机;
|
||||
- 低配路由/NAS 的 Edge profile,或资源较充足单机的 Standalone profile;
|
||||
- fresh、隔离的测试数据目录;
|
||||
- 离线导入、设备兼容验证和 3.0 Alpha 用户旅程验证。
|
||||
|
||||
不要把它直接用于生产数据、2.x 唯一数据目录或生产 Secret。Cluster/Kubernetes 节点应使用 Cluster Integration Candidate;本套件不包含 PostgreSQL HA、Worker 或 Cluster Admin。
|
||||
|
||||
## 离线验收
|
||||
|
||||
先在解压目录中执行不依赖 Node.js 的文件校验:
|
||||
|
||||
```sh
|
||||
sha256sum --check SHA256SUMS
|
||||
```
|
||||
|
||||
`manifest.json` 必须满足:
|
||||
|
||||
- `schema` 为 `qinglong/alpha-local-trial-kit@v1`;
|
||||
- `sourceRevision` 是你准备试用的完整 40 位 commit;
|
||||
- `architecture` 与主机相同;
|
||||
- `maturity` 为 `alpha_candidate_not_public_release`。
|
||||
|
||||
如果同时持有 QingLong 源码和 Node.js 24,可执行严格的闭合文件集、manifest、SBOM 和 checksum 审计:
|
||||
|
||||
```sh
|
||||
node scripts/ql3-local-alpha-trial-kit-bundle.cjs \
|
||||
--mode=audit \
|
||||
--bundle=/absolute/path/to/this-directory
|
||||
```
|
||||
|
||||
任一校验失败都不要加载或运行 archive。
|
||||
|
||||
## 加载与最小 smoke
|
||||
|
||||
从 `manifest.json.archive.file` 找到 archive 后加载:
|
||||
|
||||
```sh
|
||||
docker load --input qinglong3-local-trial-kit-<arch>.docker.tar
|
||||
```
|
||||
|
||||
以 manifest 中 `images.application.reference` 和 `images.operator.reference` 为准,分别核对 `docker image inspect` 返回的 image ID。然后执行无网络、只读 smoke:
|
||||
|
||||
```sh
|
||||
docker run --rm --read-only --network none --cap-drop ALL \
|
||||
--security-opt no-new-privileges \
|
||||
<application-image> --help
|
||||
|
||||
docker run --rm --read-only --network none --cap-drop ALL \
|
||||
--security-opt no-new-privileges \
|
||||
<operator-image> --version
|
||||
|
||||
docker run --rm --read-only --network none --cap-drop ALL \
|
||||
--security-opt no-new-privileges \
|
||||
<operator-image> setup --help
|
||||
```
|
||||
|
||||
## Fresh 试运行边界
|
||||
|
||||
完整 fresh setup、首 Owner ceremony、Application active、SIGTERM drain 和 SQLite integrity 已在同一架构的原生 Linux CI 中验证。实际部署时仍必须使用独立目录,并让 operator 以最终数据文件 POSIX owner 的 UID/GID 运行;operator 默认无网络且每次只执行一个命令后退出,不应作为 sidecar 或 daemon 常驻。
|
||||
|
||||
Edge 的验证上限为 Application 128 MiB、0.5 CPU、64 PID;Standalone 为 256 MiB、0.5 CPU、256 PID;operator 为 128 MiB、0.5 CPU、32 PID。这里的数值是试运行门,不是所有 workload 的容量承诺。
|
||||
|
||||
停止并删除 Alpha 容器即可回退 fresh 测试环境。若触碰 2.x 数据或进行迁移,必须使用项目既有 reconciliation/cutover/rollback 流程,不能只替换镜像。
|
||||
Reference in New Issue
Block a user