fix: sync spacetimedb binaries during provision
This commit is contained in:
@@ -387,10 +387,11 @@ WASM_SOURCE="${CARGO_TARGET_DIR}/wasm32-unknown-unknown/release/spacetime_module
|
||||
- 创建 `spacetimedb`、`genarrative` 等系统用户。
|
||||
- 创建 `/stdb`、`/opt/genarrative`、`/srv/genarrative`、`/etc/genarrative`、`/var/lib/genarrative/maintenance`。
|
||||
- 安装或更新 SpacetimeDB。
|
||||
- 安装 SpacetimeDB 时不能只复制 `/usr/local/bin/spacetime` wrapper,还必须把 `spacetimedb-cli` 与 `spacetimedb-standalone` 同步到 `<SPACETIME_ROOT>/bin/current/`。否则 `spacetime --root-dir=<SPACETIME_ROOT> start` 会回调缺失的 `<SPACETIME_ROOT>/bin/current/spacetimedb-cli`,导致 `spacetimedb.service` 循环重启但 provision 表面已经执行过 `systemctl restart`。
|
||||
- 安装 systemd unit。
|
||||
- 可选安装 Nginx 配置和维护模式 snippet。
|
||||
- 安装 Nginx 配置时执行 `nginx -t`,通过后必须执行 `nginx -s reload`,确保新配置对当前 Nginx master/worker 生效。
|
||||
- 启用并启动 `spacetimedb.service` 与 `genarrative-api.service`。
|
||||
- 启用并启动 `spacetimedb.service` 与 `genarrative-api.service`;重启 `spacetimedb.service` 后必须等待 `http://127.0.0.1:3101/v1/ping` 或 `spacetime server ping` 确认就绪,不能只依赖 `systemctl restart` 的返回码。
|
||||
|
||||
该流水线属于高风险操作,默认要求人工确认后执行。
|
||||
已落地的 Jenkinsfile 为 `jenkins/Jenkinsfile.production-server-provision`。该流水线默认 `DRY_RUN=true`,只打印将执行的初始化动作;真正写入系统用户、目录、systemd、环境文件并启动服务时,必须设置 `DRY_RUN=false` 且勾选 `CONFIRM_PROVISION`。当 `DEPLOY_TARGET=release` 时,还必须勾选 `CONFIRM_RELEASE_DEPLOY_AGENT`,并通过 `linux && genarrative-release-deploy` 调度到独立 release 部署 agent。
|
||||
|
||||
Reference in New Issue
Block a user