# Datastream demo cluster. # # A relay, a UDP collector, a seed swactor node, and two workers — every node # (the relay included) ships its telemetry datastream as UDP frames to the # collector, whose stdout is the live, frame-by-frame raw stream. # # Run it (from the repo root), foreground so the collector's stream is visible: # # docker compose -f tests/docker/docker-compose.datastream.yml build # docker compose -f tests/docker/docker-compose.datastream.yml up # # Watch the `collector-1 | ...` lines. Ctrl-C then `down` to clean up. # # The datastream emitter is default-on in every node; pointing # SWACTOR_DATASTREAM_COLLECTOR at the collector's UDP address swaps the # node's no-op sink for the UDP frame sink (one delivery per datagram). # # Nodes converge over the standalone relay (10.0.3.2): each node runs with the # embedded relay off (--no-relay) and points --relay-hosts at the relay so iroh # selects RelayMode::Custom. The seed's node id below is baked from the # committed identity in ./identities/seed/node.key.json. x-node-build: &node-build build: context: ../.. dockerfile: tests/docker/Dockerfile.datastream services: collector: <<: *node-build entrypoint: ["swactor-datastream-collector"] command: ["--bind", "0.0.0.0:7700"] networks: datastream: ipv4_address: 10.0.3.5 relay: <<: *node-build entrypoint: ["swactor-iroh-relay"] command: ["--bind", "0.0.0.0:7843", "--public-host", "10.0.3.2"] environment: SWACTOR_DATASTREAM_COLLECTOR: "10.0.3.5:7700" networks: datastream: ipv4_address: 10.0.3.2 depends_on: - collector seed: <<: *node-build command: - "--config=/etc/swactor/node.toml" - "--identity-dir=/seed-identity" - "--no-relay" - "--relay-port=7843" - "--relay-hosts=10.0.3.2" - "--actors=2" environment: SWACTOR_DATASTREAM_COLLECTOR: "10.0.3.5:7700" networks: datastream: ipv4_address: 10.0.3.10 ports: - "9091:9090" depends_on: - collector - relay node-2: <<: *node-build command: - "--config=/etc/swactor/node.toml" - "--seed-node-id=G2hRm2rWTFCqyeVnStJg72ysBiTvE19NTTPjdSEXhFK6" - "--no-relay" - "--relay-port=7843" - "--relay-hosts=10.0.3.2" - "--actors=3" environment: SWACTOR_DATASTREAM_COLLECTOR: "10.0.3.5:7700" networks: datastream: ipv4_address: 10.0.3.11 ports: - "9092:9090" depends_on: - collector - relay - seed node-3: <<: *node-build command: - "--config=/etc/swactor/node.toml" - "--seed-node-id=G2hRm2rWTFCqyeVnStJg72ysBiTvE19NTTPjdSEXhFK6" - "--no-relay" - "--relay-port=7843" - "--relay-hosts=10.0.3.2" - "--actors=2" environment: SWACTOR_DATASTREAM_COLLECTOR: "10.0.3.5:7700" networks: datastream: ipv4_address: 10.0.3.12 ports: - "9093:9090" depends_on: - collector - relay - seed networks: datastream: driver: bridge ipam: config: - subnet: 10.0.3.0/24