From 9a605226a683ae27b710906e8d71f4be7f736383 Mon Sep 17 00:00:00 2001 From: David Arthur Date: Mon, 3 Jan 2022 21:36:29 -0500 Subject: [PATCH] Add docker compose file for network testing --- tests/docker/config/alice.ini | 38 +++++++++++++++++++++++++++++ tests/docker/config/bob.ini | 30 +++++++++++++++++++++++ tests/docker/config/carol.ini | 43 +++++++++++++++++++++++++++++++++ tests/docker/docker-compose.yml | 25 +++++++++++++++++++ 4 files changed, 136 insertions(+) create mode 100644 tests/docker/config/alice.ini create mode 100644 tests/docker/config/bob.ini create mode 100644 tests/docker/config/carol.ini create mode 100644 tests/docker/docker-compose.yml diff --git a/tests/docker/config/alice.ini b/tests/docker/config/alice.ini new file mode 100644 index 0000000..7550889 --- /dev/null +++ b/tests/docker/config/alice.ini @@ -0,0 +1,38 @@ +[default] +mycall=AL1CE + +[node] +log.dir = /tmp/tarpn-logs-alice +log.config = config/logging.ini + +node.call = ${mycall}-9 +node.alias = ALICE +node.sock = /tmp/socks/tarpn-shell-alice.sock + + +[port:1] +port.enabled = True +port.type = serial +port.framing = kiss +port.bitrate = 9600 +kiss.checksum = false +serial.device = /tmp/vmodem_A0 +serial.speed = 9600 + +[port:2] +port.enabled = True +port.type = serial +port.framing = kiss +port.bitrate = 9600 +kiss.checksum = false +serial.device = /tmp/vmodem_B1 +serial.speed = 9600 + +[network] +host.name = alice +mesh.enabled = True +mesh.address = 00.ab +mesh.ttl = 7 + +[app:demo] +app.sock = /tmp/socks/tarpn-demo-b.sock diff --git a/tests/docker/config/bob.ini b/tests/docker/config/bob.ini new file mode 100644 index 0000000..11ab30b --- /dev/null +++ b/tests/docker/config/bob.ini @@ -0,0 +1,30 @@ +[default] +mycall=B0B + +[node] +log.dir = /tmp/tarpn-logs-bob +log.config = config/logging.ini + +node.call = ${mycall}-9 +node.alias = BOB +node.sock = /tmp/socks/tarpn-shell-bob.sock + + +[port:1] +port.enabled = True +port.type = serial +port.framing = kiss +port.bitrate = 9600 +kiss.checksum = false +serial.device = /tmp/vmodem_A1 +serial.speed = 9600 + +[network] +host.name = bob +mesh.enabled = True +mesh.address = 00.aa +mesh.ttl = 7 + + +[app:demo] +app.sock = /tmp/socks/tarpn-demo-a.sock diff --git a/tests/docker/config/carol.ini b/tests/docker/config/carol.ini new file mode 100644 index 0000000..36d4be9 --- /dev/null +++ b/tests/docker/config/carol.ini @@ -0,0 +1,43 @@ +[default] +mycall=C4ROL + +[node] +log.dir = /tmp/tarpn-logs-carol +log.config = config/logging.ini + +node.call = ${mycall}-9 +node.alias = CAROL +node.sock = /tmp/tarpn-shell-carol.sock + +[port:1] +port.enabled = True +port.type = serial +port.framing = kiss +kiss.checksum = false +serial.device = /tmp/vmodem_B0 +serial.speed = 9600 + +[port:2] +port.enabled = False +port.type = serial +port.framing = kiss +kiss.checksum = false +serial.device = /tmp/vmodem_C1 +serial.speed = 9600 + +[port:3] +port.enabled = False +port.type = serial +port.framing = kiss +kiss.checksum = false +serial.device = /tmp/vmodem_G1 +serial.speed = 9600 + +[network] +host.name = carol +mesh.enabled = True +mesh.address = 00.ac +mesh.ttl = 7 + +[app:demo] +app.sock = /tmp/tarpn-demo-c.sock diff --git a/tests/docker/docker-compose.yml b/tests/docker/docker-compose.yml new file mode 100644 index 0000000..d198c73 --- /dev/null +++ b/tests/docker/docker-compose.yml @@ -0,0 +1,25 @@ +services: + alice: + image: tarpn/tarpn-test:latest + environment: + - SOCAT_ARGS=PTY,raw,echo=1,link=/tmp/vmodem_A0 udp:bob:12345|PTY,raw,echo=1,link=/tmp/vmodem_B1 udp-listen:10000 + volumes: + - ./config/alice.ini:/opt/tarpn/config/node.ini + - /tmp/socks/:/tmp/socks/ + command: /opt/tarpn/bin/launch-tarpn.sh + bob: + image: tarpn/tarpn-test:latest + environment: + - SOCAT_ARGS=PTY,raw,echo=1,link=/tmp/vmodem_A1 udp-listen:12345 + volumes: + - ./config/bob.ini:/opt/tarpn/config/node.ini + - /tmp/socks/:/tmp/socks/ + command: /opt/tarpn/bin/launch-tarpn.sh + carol: + image: tarpn/tarpn-test:latest + environment: + - SOCAT_ARGS=PTY,raw,echo=1,link=/tmp/vmodem_B0 udp:alice:10000 + volumes: + - ./config/carol.ini:/opt/tarpn/config/node.ini + - /tmp/socks/:/tmp/socks/ + command: /opt/tarpn/bin/launch-tarpn.sh