Skip to content

Commit

Permalink
Add docker compose file for network testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mumrah committed Jan 4, 2022
1 parent 3713175 commit 9a60522
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 0 deletions.
38 changes: 38 additions & 0 deletions tests/docker/config/alice.ini
Original file line number Diff line number Diff line change
@@ -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
30 changes: 30 additions & 0 deletions tests/docker/config/bob.ini
Original file line number Diff line number Diff line change
@@ -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
43 changes: 43 additions & 0 deletions tests/docker/config/carol.ini
Original file line number Diff line number Diff line change
@@ -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
25 changes: 25 additions & 0 deletions tests/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9a60522

Please sign in to comment.