This repo is a result of going through a mental excercise of trying to understand what the minimal set of components is that we could call Testground. It is an answer to a hypothetical question: if I only had a week to build a Testground, what would I do?
docker compose up
coordinator
container starts. It is connected to the control
bridge network.runner
containers start. They are connected to the control
bridge network and the data
bridge network.runner
containers modify their data
network interfaces. They add 1000ms of latency.runner
containers retrieve their own IP addresses for the data
network and the control
network.runner
containers send their addresses as registration to the coordinator
container through the control
network.coordinator
receives all the registrations it's been waiting for, it sends them to each runner
container through control
network.runner
containers ping each other through the data
network.runner
containers send done message to the coordinator
container through the control
network.coordinator
receives all the done messages it's been waiting for, it sends _shutdownmessage to each
runnercontainer through
control` network and exits.runnner
containers exit.The coordinator covers the following responsibilities:
The runner covers the following responsibilities:
There's no next steps. This is just an excercise to understand what minimal Testground could be and how it could split responsibilities and abstractions.
function | component | description | required | complexity | alternatives | value |
---|---|---|---|---|---|---|
building | daemon | building test nodes | optional | complex because of the need to support multiple languages and runtimes (builders) |
docker build , go build
|
? |
orchestration | daemon | starting and stopping test nodes | optional | complex because of the need to support multiple environemnts (runners) |
docker compose , nomad , kubernetes
|
? |
network setup | daemon | creating networks over which test nodes communicate | optional | only applicable to a subset of environments |
docker network , cni
|
? |
synchronisation | sync | facilitating communication between test nodes | essential | ? | this is what makes a test run in a distributed environment | |
network configuration | sidecar | modifying network characteristics | essential | complex because of the need to support multiple environments (runners) |
tc , iptables
|
an abstraction that differentiates testground |
collection | daemon | collecting test results (from the sync) | essential | ? | restults reporting is a pretty important part of testing framework | |
metrics | sync | collecting test node application, runtime metrics | nice to have | prometheus |
makes performance tests possible | |
logging | daemon | collecting test node application logs | optional |
docker logs , fluentd
|
makes debugging tests easier |
component | function |
---|---|
cli | init, wait |
daemon | building, orchestration, network setup, collection |
sync | synchronisation, metrics |
sidecar | network configuration |
test node | test logic |
sdk | glue |