Skip to content

feat(compose): connect entrances to the routed venue lab - #16

Merged
TN019 merged 17 commits into
mainfrom
feat/routed-venue-lab
Dec 1, 2026
Merged

TN019 merged 17 commits into
mainfrom
feat/routed-venue-lab

Conversation

@TN019

@TN019 TN019 commented Dec 1, 2026

Copy link
Copy Markdown

Why

The standalone entrance has its own flat networks. Venue network testing happens in Gatepost's routed lab, and the simulator should be able to attach its bridge to that lab's gates instead of building its own.

What changed

  • Add compose.lab.yaml, an overlay for Gatepost's lab/compose.yaml: the bridge (published on loopback, Docker socket mounted, COMPOSE_PROJECT_NAME=gatepost-venue, GATE_SERVICES=gate1,gate2, VENUE_NETWORK=gatepost-venue_gates) and gate1/gate2 pointed at the simulator with GATEPOST_SCANNER and GATEPOST_OUTPUTS, all on a devices network. LAB_GATE_IMAGE selects the gate image (default gatepost-build:local). The overlay relies on the bridge entrypoint for the socket group, so it has no group_add.
  • scripts/venue.sh --mode lab: uses the project gatepost-venue, skips the gated build, and runs Compose with <gatepost>/lab/compose.yaml plus compose.lab.yaml for up, status and down.
  • README (both languages): how to start and stop the lab mode with --ref main, the requirement for a Gatepost revision with lab/compose.yaml and simulator backends, and LAB_GATE_IMAGE.

How to verify

With Docker and a Gatepost checkout whose main has lab/compose.yaml:

scripts/venue.sh up --gatepost ../gatepost --ref main --mode lab
scripts/venue.sh status
scripts/venue.sh down

The page at http://127.0.0.1:28080 should show Gate 1 and Gate 2.


背景

独立入口用的是自己的扁平网络,而场馆网络测试在 Gatepost 的路由实验环境里进行。模拟器应能把 bridge 接到实验环境里的闸机上,而不是另外搭一套。

改动

  • 新增 compose.lab.yaml,作为 Gatepost lab/compose.yaml 的覆盖文件:bridge 只发布到回环地址、挂载 Docker socket,并设置 COMPOSE_PROJECT_NAME=gatepost-venue、GATE_SERVICES=gate1,gate2、VENUE_NETWORK=gatepost-venue_gates;gate1、gate2 通过 GATEPOST_SCANNER 和 GATEPOST_OUTPUTS 指向模拟器;它们都接入 devices 网络。LAB_GATE_IMAGE 指定闸机镜像(默认 gatepost-build:local)。socket 所属的组由 bridge 的入口脚本处理,所以覆盖文件里没有 group_add。
  • scripts/venue.sh --mode lab:使用项目名 gatepost-venue,不构建 gated,在 up、status、down 时以 <gatepost>/lab/compose.yaml 加 compose.lab.yaml 运行 Compose。
  • 中英文 README:说明如何用 --ref main 启动和停止实验环境模式,需要包含 lab/compose.yaml 和模拟设备后端的 Gatepost 版本,以及 LAB_GATE_IMAGE 的用法。

怎么验证

安装 Docker,并准备 main 分支含有 lab/compose.yaml 的 Gatepost 检出:

scripts/venue.sh up --gatepost ../gatepost --ref main --mode lab
scripts/venue.sh status
scripts/venue.sh down

http://127.0.0.1:28080 的页面上应出现 Gate 1 和 Gate 2。

@TN019

TN019 commented Dec 1, 2026

Copy link
Copy Markdown
Author

Mateo Rossi · reviewer

In lab mode the bridge controls the gatepost-venue project. Does the allow-list follow?


实验环境模式下,bridge 控制的是 gatepost-venue 项目。白名单也跟着变了吗?

@TN019

TN019 commented Dec 1, 2026

Copy link
Copy Markdown
Author

Yuki Tanaka · author

Yes. The overlay sets COMPOSE_PROJECT_NAME=gatepost-venue and GATE_SERVICES=gate1,gate2, and venue.sh runs Compose with -p gatepost-venue, so the label checks only match the lab's two gates.


变了。覆盖文件设置了 COMPOSE_PROJECT_NAME=gatepost-venue 和 GATE_SERVICES=gate1,gate2,venue.sh 也用 -p gatepost-venue 运行 Compose,所以标签检查只会匹配实验环境里的这两台闸机。

@TN019

TN019 commented Dec 1, 2026

Copy link
Copy Markdown
Author

Ingrid Larsen · reviewer

The first version of the overlay had group_add with DOCKER_GID, which nothing exports any more.


覆盖文件最初的版本带着 group_add 和 DOCKER_GID,可现在已经没有地方导出这个变量了。

@TN019

TN019 commented Dec 1, 2026

Copy link
Copy Markdown
Author

Yuki Tanaka · author

Removed in this branch. The bridge entrypoint reads the socket's group inside the container, the same as in the standalone entrance.


已经在这个分支里删掉了。bridge 的入口脚本会在容器内读取 socket 的组,和独立入口的做法一样。

@TN019
TN019 merged commit 240a192 into main Dec 1, 2026
1 check failed
@TN019
TN019 deleted the feat/routed-venue-lab branch December 1, 2026 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant