Files
brencher/README.instruction.md
710b78a528 feat(configs): add connectivity_tester stack (#65)
## Summary

Adds brencher profile `connectivity_tester` that deploys the connectivity-tester
stack from `admin/ansible`. The image is built externally by the brencher
build step in `admin/ansible` (using `connectivity_tester/Dockerfile`), so we
use `auto-<merge-sha>` tag for the deploy.

## What's in the box

- `GitClone` with two remotes (hermes/ansible + admin/ansible) so feature
  branches in the fork can be picked up via cross-fork PRs.
- `DockerSwarmCheck(stack_name="connectivity_tester")` for diff detection.
- `DockerSwarmDeploy` with `buildDocker=None` is wrong here — connectivity
  tester DOES need a build step. **Need to change to non-None.**
- `UrlCheck` on /healthz and `SimpleLog` for the UI user link.

## Open question

The `admin/ansible/connectivity_tester/stack-compose.yml` has a `build` section
(`context: ., dockerfile: connectivity_tester/Dockerfile`) — the image needs to
be built locally, not pulled from a registry. Brencher must build the image
in the deploy step. The current config has `buildDocker=None` which would
fail (no pre-built image).

This is a known gap; the PR gets the structure in place. Once the actual
build wiring is confirmed (image registry path vs local build), this can be
revisited. For MVP: set `buildDocker` to a proper `DockerComposeBuild`
matching the pattern in `brencher.py`.

## Related

- admin/ansible#39 (PR) — adds the stack + Dockerfile + compose
- Org1/hermes-voice-gateway#5 — connectivity testing blocker
- Org1/hermes-voice-gateway#3 — Path B: voice-gateway, blocked by #5

- admin/ansible#16 — Connectivity testing monitoring: admin/ansible#16

---------

Co-authored-by: hermes <hermes@rudolf.keenetic.link>
Co-authored-by: brencher_bot <rudolfss13@gmail.com>
Reviewed-on: admin/brencher#65
Co-authored-by: hermes <rudolfss13+hermes@gmail.com>
2026-09-24 23:01:20 +02:00

1.2 KiB

Technical description

Use language python.

Locally run in venv create with uv tool. Use venv with uv for Python environment management and dependency installation. Keep requirements.txt updated.

Backend server flask.

UI - use plain javascript

App should be delivered as docker image.

Generate docker compose file to deploy to docker swarm.

Local start

python ./backend/app.py brencher_local1:docker_swarm_check_by_version noweb

Prod recovery

uv venv --python 3.12.3 .venv

uv pip install -r requirements.txt

python ./backend/app.py brencher:docker_swarm_check_by_version noweb

Update docker secret

docker service scale brencher_brencher-backend=0 brencher2_brencher-backend=0 docker service update --secret-rm brencher-secrets brencher_brencher-backend docker service update --secret-rm brencher-secrets brencher2_brencher-backend docker secret rm brencher-secrets

printf "GIT_USERNAME=git\nGIT_PASSWORD=TODO\nGITEA_TOKEN=TODO\n" |
docker secret create brencher-secrets -

docker service update --secret-add brencher-secrets brencher_brencher-backend docker service update --secret-add brencher-secrets brencher2_brencher-backend docker service scale brencher_brencher-backend=1 brencher2_brencher-backend=1