m-lab / murakami

Run automated internet measurement tests in a Docker container.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

extend ndt5/7 custom runners with config file and server selection strategies

critzo opened this issue · comments

The current ndt5 and ndt7 runners, as well as the interim ndt5custom and ndt7custom test runners in the internet-resilience branch enable testing to a single self-provisioned ndt-server, when the _HOST environment variable is set for the runner. Using both the current and custom runners, one NDT test can use to a custom server and another test can use an M-Lab server, if all are enabled.

This issue is to extend the custom ndt runners in the internet-resilience branch, to provide two selection strategies and custom-defined groups of servers defined in a JSON configuration file. This would enable more flexibility in which tests should run to individual servers, or multiple tests to multiple servers, defined within different groups.

The final configuration format is TBD, but might be something like:

config1.json

{
  “serverGroups”: {
    “groupA”: {
        “selectionAlgorithm”: “random”,
        "servers": [ "10.10.10.1", "196.49.19.37" , "ndt-mlab1-iad05.mlab-oti.measurement-lab.org" ],
    },
    “groupB”: {
        “selectionAlgorithm”: “all”,
        "servers": [ "10.10.10.1", "196.49.19.37" , "ndt-mlab1-iad05.mlab-oti.measurement-lab.org" ],
    }
 }
}

In the example above, the "random" strategy would select one random server from groupA and would run one ndt test to that server. The "all" strategy would conduct one ndt test to each server in groupB during each scheduled run.

The configuration file would be saved on disk and bundled in the built Docker image, whether that is built locally for a standalone installation or pushed to a Balena managed Murakami beacon device/project.

Accompanying the JSON configuration file, one or more environment variables would be defined containing the path to the file within the Murakami container. For example:
MURAKAMI_TESTS_NDT7CUSTOM_CONFIG=/murakami/configs/config1.json

Completed