chore(mqtt): use developer's cloudflared tunnel on :7883 - #13
Closed
bkearns wants to merge 1 commit into
Closed
Conversation
The user runs a Cloudflare-tunneled MQTT broker, exposed locally
via cloudflared on 127.0.0.1:7883. The lab no longer needs its
own EMQX in the default path.
docker-compose.yml:
- mqtt: now profile-gated under "internal-broker". `make sim-up`
no longer starts EMQX. Bring it back when needed:
docker compose --profile internal-broker up -d
docker-compose.sim.yml:
- agent: drop the `mqtt` healthcheck dep (service no longer up by
default).
- extra_hosts: ["host.docker.internal:host-gateway"] so the alias
resolves on Docker; podman supplies host.containers.internal +
host.docker.internal automatically.
- BROKER_URL default: tcp://host.docker.internal:7883. Override
with the BROKER_URL env if your tunnel listens elsewhere.
Makefile:
- Header comment: MQTT documented as the host-side cloudflared
tunnel listener, not a lab container.
- lab-status MQTT default already 7883; will probe whatever
listener (cloudflared OR local broker via internal-broker
profile) is on that port.
Verified locally: stopped + removed temporal-hack-lab-mqtt-1;
recreated agent; logs show
"mqtt connected" broker=tcp://host.docker.internal:7883
"ota executor subscribed" topic=cmd/sim-robot-01/ota
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stops running our own EMQX in the lab. The developer's cloudflared exposes the real broker on host 127.0.0.1:7883; the agent now connects there.
mqtt:service is now profile-gated underinternal-broker. Defaultmake sim-upno longer starts EMQX. Bring it back withdocker compose --profile internal-broker up -dfor offline dev.mqtthealthcheck dep, getsextra_hosts: [host.docker.internal:host-gateway]for Docker portability (podman supplies this automatically), defaultsBROKER_URL=tcp://host.docker.internal:7883.BROKER_URLenv override remains.make ci-up/ci-downnow always include--profile internal-brokerbecause CI runners don't have cloudflared. Smoke test stays self-contained.Verified locally
Stopped + removed temporal-hack-lab-mqtt-1; recreated agent. Logs:
Pre-push smoke green (CI cluster came up with internal-broker profile).