docker: start simulator with compose, bind published ports to localhost - #51
Open
clement-igonet wants to merge 1 commit into
Open
docker: start simulator with compose, bind published ports to localhost#51clement-igonet wants to merge 1 commit into
clement-igonet wants to merge 1 commit into
Conversation
The compose started Yamcs but never the simulator, so the udp-in link stayed at dataInCount 0 and no parameter received a value (yamcs#50). Run simulator.py in a companion container sharing the yamcs network namespace: the simulator's default 127.0.0.1 targets reach the udp-in link, and the udp-out link (host: localhost) reaches the simulator's TC port, so both telemetry and commanding work out of the box. Also bind the published ports (8090, 10015/udp) to 127.0.0.1: the quickstart runs without authentication and should not be exposed to the host network by default.
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.
Closes #50.
docker compose upstarted Yamcs but never the simulator, so theudp-inlink stayed atdataInCount 0and no parameter ever received a value.Changes
simulatorservice (python:3.12-alpine, mounting the repo like theyamcsservice) that runssimulator.pyonce Yamcs passes its healthcheck (depends_on: condition: service_healthy).network_mode: "service:yamcs"), so no flags and no Yamcs config changes are needed: the simulator's default127.0.0.1TM target reaches theudp-inlink, and theudp-outlink (host: localhost) reaches the simulator's TC port — commanding works out of the box too, which a simulator on a separate bridge address would not get.127.0.0.1(8090,10015/udp): the quickstart runs without authentication, so it should not be reachable from the host's network by default. The10015/udppublish is kept so runningsimulator.pyon the host (make yamcs-simulator) still works as before.Verified (rootless podman + podman-compose on Debian 13)
up -d --build: simulator starts automatically after the healthcheck;udp-inshowsstatus: OKwithdataInCountclimbing at 1 Hz.Rebootvia/api/processors/myproject/realtime/commands/myproject/Rebootshowsudp-out dataOutCountincrementing, and netns UDP counters confirm delivery to the simulator's TC socket over IPv4 (noNoPortsdrops).One note: the simulator's in-place (
\r-rewritten) status line doesn't show up incompose logsunder podman's journald log driver — cosmetic only; #48's readiness/status work touches that area ofsimulator.pyanyway.