feat(deploy): start_all.sh 编排生信服务(存在则启动/重启)

2026-09-12 陷阱 6:176 整机重启后 start_all 只拉五服务,独立树
bioflow_service(8098)掉进程无告警——生信 TAB 静默消失
(TAB 显隐由 /api/bioflow/health 轮询驱动)。

- start_all 模板新增生信编排段:探测 install 同级
  bioflow/bioflow_service/restart.sh,存在则启动/重启并
  8098 探活(restart.sh 自带旧进程 kill+重启语义),不存在
  跳过;失败不阻断主服务。
- DEPLOY_FLOW §5.1 同步:生信首次部署与新机自动拉起区分。

验证:build_all.sh bash -n OK;生成的 start_all.sh 从 heredoc
提取后 bash -n OK。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-12 16:55:47 +08:00
co-authored by Claude Fable 5
parent f74b27daa1
commit 9d7ed1bdd3
2 changed files with 18 additions and 2 deletions
+2 -2
View File
@@ -158,8 +158,8 @@ sudo bash qa-db/replace_db.sh neo4j <新data目录>
cd /srv/plantai/install
bash ollama_restart.sh # 本地嵌入模型(已运行则跳过;缺失模型会提示 ollama pull bge-m3:567m)
bash start_all.sh # 五服务(QA/methodology/legacy/vstore/BFF);start_all.sh 内先拉 ollama、BFF 前 source sdk/.env
# 生信(可选):
bash start_all.sh # 五服务 + 生信自动编排(2026-09-12 起):先拉 ollama → QA/methodology/legacy/vstore → 探测同级 bioflow/bioflow_service/restart.sh(存在则启动/重启+8098 探活,不存在跳过)→ BFF
# 生信首次部署(仅新装;此后 start_all 自动拉起):
docker load -i /tmp/plantai-bioflow-images.tar
# 创建 bioflow_service 部署树 + .env(DOCGEN_LLM_*、BIOFLOW_IMAGE_MAP_PATH 指向 bioflow_kernel/assets 内的 stage_image_map.json)+ bash bioflow_service/restart.sh
```
+16
View File
@@ -147,6 +147,22 @@ bash "$ROOT/qa/scripts/start.sh" 8091 || true
bash "$ROOT/methodology/scripts/start.sh" 8092 || true
bash "$ROOT/legacy-rag/scripts/start.sh" 8093 app || true
bash "$ROOT/vstore_restart.sh" || echo "[vstore] 拉起失败,向量化不可用(不阻断其余服务)"
# 生信服务(可选编排,2026-09-12 陷阱 6):主动探测独立生信部署树是否存在,
# 存在则启动/重启(restart.sh 自带「有旧进程先 kill、无则直接起」语义),
# 不存在则跳过——未部署生信的机器无此树,不应报错。失败不阻断主服务。
# 布局约定:生信树在 install 同级 bioflow/(176: /srv/plantai/bioflow/)。
BIOFLOW_RESTART="$ROOT/../bioflow/bioflow_service/restart.sh"
if [ -x "$BIOFLOW_RESTART" ]; then
echo "[bioflow] 探测到生信服务,启动/重启中"
if ( bash "$BIOFLOW_RESTART" >/dev/null 2>&1 && sleep 3 \
&& curl -s --max-time 8 http://127.0.0.1:8098/api/bioflow/health >/dev/null ); then
echo "[bioflow] 8098 health ok"
else
echo "[bioflow] 拉起/探活失败,生信不可用(不阻断主服务;日志 bioflow_service/bioflow.log)"
fi
else
echo "[bioflow] 未部署生信服务,跳过"
fi
sleep 3
# BFF env:sdk/.env 含 DOCGEN_LLM_*、VSTORE_BASE_URL、BFF_NEO4J_*(无此 env BFF 上游不可用)
set -a