docs(deploy): 记 tier2 P4 服务化部署拓扑(团队共享)——Agent Service @ mini-desktop:8200 + 真落库 MySQL/MinIO + 运行环境
内网开发阶段、明文记端点+凭据(铁律授权)。Agent Service 起法/REST 路由/Redis 后端、BackendStore 的 MySQL 库表+MinIO 桶+key 约定、venv/worktree/装依赖法,全部落档供团队共享。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ce491314c8
commit
1a4c6970b0
@ -49,4 +49,30 @@
|
||||
|
||||
---
|
||||
|
||||
## tier2 P4 服务化部署拓扑(2026-06-24 首次部署成功落档 · 团队共享)
|
||||
|
||||
> 内部开发阶段 · 内网环境;为开发方便,端点 + 凭据明文记录(铁律授权)。下面是「服务跑在哪、怎么起、连什么」。
|
||||
|
||||
**Agent Service(agentscope 2.0.2 `create_app`)—— 跑在 mini-desktop**
|
||||
- 端点:`http://100.64.0.7:8200`(Tailscale;本机 `127.0.0.1:8200`)。`/docs`、`/openapi.json` 返 200。
|
||||
- 起服务:`ssh mini-desktop` → `cd /root/tier2-run/tier2/gen-worker && NEWAPI_KEY=<见 new-api 段> NO_PROXY=100.64.0.8 /root/.venvs/agentscope-tier2/bin/python -m service.app`(无 CLI serve 命令,模块自调 uvicorn;默认 0.0.0.0:8200,`TIER2_SERVICE_PORT` 可改)。
|
||||
- REST 路由:`/credential` `/agent` `/sessions` `/chat` `/sessions/{id}/stream`(SSE 收事件)`/workspace/mcp` `/workspace/skill` `/model` `/schedule`。
|
||||
- 后端:Redis(mini-infra:6379)做 session 状态 storage(db0)+ MessageBus(db1)——见上「基建数据面」。
|
||||
- 代码:dev/2.0.0 `tier2/gen-worker/service/{app,infra_config,bootstrap}.py`;基建配置 `tier2/config/infra.yaml`(运行时读)。
|
||||
|
||||
**第二装载落库 BackendStore(`TIER2_STORE=backend` 切换)**
|
||||
- manifest → MySQL `tier2` 库 · 表 `tier2_source_project_version`(幂等键 `(game_id, source_hash)`;表首次 save 自建,建库 SQL `tier2/config/schema/tier2_source_project_version.sql`)。
|
||||
- 源文件全文 → MinIO 桶 `tier2-src` · key `tier2-src/<game_id>/<version_id>/<工程内相对路径>`。
|
||||
- 已验:save→fetch 往返、main.js 内容字节一致(2026-06-24)。
|
||||
|
||||
**运行环境(mini-desktop · 权威运行机)**
|
||||
- venv:`/root/.venvs/agentscope-tier2`(`agentscope[full]==2.0.2` + `redis`/`pymysql`/`minio`/`httpx`/`esbuild`/`ws`/`phaser`)。
|
||||
- 部署 worktree:`/root/tier2-run`(detached @ dev/2.0.0)。
|
||||
- 装依赖:`/root/.venvs/agentscope-tier2/bin/pip install -r tier2/gen-worker/requirements.txt`(含 pymysql/minio)`+ redis httpx`。
|
||||
- 纪律:真玩门(run_gates / chrome / esbuild)只在 mini-desktop;6c6g 禁 chrome、只做静态校验。
|
||||
|
||||
> 历史 demo 服务:feie-005 富游戏静态服务在 `mini-desktop:4180`(`python -m http.server 4180 --directory /root/tier2-run`),供创始人亲玩;非生产、可随时关。
|
||||
|
||||
---
|
||||
|
||||
> 其余基建密钥(Gitea 等)按需补入本档,**别散落 env var 或只留在对话**。决策同理——拍板进对应 plan / 本档,不留口头。
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user