GithubHelp home page GithubHelp logo

mistersquishy / murakami Goto Github PK

View Code? Open in Web Editor NEW

This project forked from m-lab/murakami

0.0 0.0 0.0 498 KB

Run automated internet measurement tests in a Docker container.

License: Apache License 2.0

Python 77.16% Dockerfile 1.42% Shell 21.42%

murakami's Introduction

Murakami

Murakami is a tool for creating an automated internet measurement service, running in a Docker container. A Murakami measurement container will automatically run supported tests four times a day using a randomized schedule, and can be configured to export each test result to a local storage device, to one or more remote servers via SCP, or to a Google Cloud Storage bucket. Results are saved as individual files in JSON new line format (.jsonl).

What Does the Name Mean?

What do we talk about when we talk about running tests? The M-Lab team talks about this a lot, so it's no wonder that the name "Murakami" pays homage to the renown author Haruki Murakami, who's book What I Talk About When I Talk About Running provided us inspiration.

Contributing to Murakami

Please see CONTRIBUTING.md.

Supported Measurement Tests

For more information about each supported test see: Supported Tests Runners.

Murakami Deployment Scenarios

Murakami supports three types of Docker container deployments on supported systems:

It is also possible to install Murakami directly on supported systems without Docker, however currently documenting direct system installation of Murakami is beyond our project scope. Future testing and documentation is needed to test and confirm supported systems and requirements.

Supported Operating Systems

Murakami supports Linux operating systems like Ubuntu, Debian, etc. Windows is not supported. Mac OS may work, but is yet untested.

Optional Data Visualization Service

An optional data visualization service, Murakami-Viz, can be used to receive test results from Murakami measurement devices if desired. Please see [docs/USING_MURAKAMI_VIZ.md] for more information.

Murakami Configurations and Customization

A Murakami container can be configured flexibly depending on the deployment scenario. If you simply run a Murakami container using M-Lab's pre-built images on Dockerhub, by default all tests are configured to run four times daily at randomized intervals, but with no data exporters enabled. This section focuses on which options can be configured using the file murakami.toml OR using environment variables.

The Murakami container can be customized using:

  • environment variables on the command line when running docker (Standalone, Standalone Locally Managed)
  • environment variables in a file, passed on the command line when running docker (Standalone, Standalone Locally Managed)
  • customizing the murakami.toml configuration file (Standalone, Standalone Locally Managed)
  • environment variables in your Balena Cloud project, or per device (Balena Cloud)

The table below summarizes the options you can configure in murakami.toml and how to format the options as command line variables at the command line. Three optional variables allow customization of the file names generated by test runners, which can be usefull in multi-device installations: location, network_type, and connection_type.

murakami.toml corresponding environment variable options/examples function
[settings]
port = 80 MURAKAMI_SETTINGS_PORT 80, 8080 Sets the web port used by the Murakami WebThing code
loglevel = "DEBUG" MURAKAMI_SETTINGS_LOGLEVEL DEBUG Sets the log level for the Murakami service
immediate = 1 MURAKAMI_SETTINGS_IMMEDIATE 0, 1, true, false If set to 1 or true, instructs the container to run the first set of tests when it starts
webthings = 0 MURAKAMI_SETTINGS_WEBTHINGS 0, 1, true, false If set to 1 or true, the container will advertise its test runners as WebThings which can then be toggled using a Mozilla WebThings Gateway
location = "Baltimore" MURAKAMI_SETTINGS_LOCATION any string Optionally set location of the Murakami device. If set, value is used in exported test file names.
network_type = "home" MURAKAMI_SETTINGS_NETWORK_TYPE any string Optionally set the type of network where the Murakami device is running. If set, value is used in exported test file names.
connection_type = "wired" MURAKAMI_SETTINGS_CONNECTION_TYPE any string Optionally set the type of connection the Murakami device is using. If set, value is used in exported test file names
[exporters] The 'exporters' configuration sections OR environment variables define where test data should be saved or exported. For each exporter all variables listed must be defined.
[exporters.local] The 'local' exporter defines where on the system's local disk to save test results.
type = "local" MURAKAMI_EXPORTERS_LOCAL_TYPE local
enabled = true MURAKAMI_EXPORTERS_LOCAL_ENABLED 0, 1, true, false
path = "/data/" MURAKAMI_EXPORTERS_LOCAL_PATH Any system path available to the Murakami container service may be used to save local data.
[exporters.scp] The 'scp' exporter defines a remote server where data should be copied. The server must be configured to allow secure copy via SSH using a private key file.
type = "scp" MURAKAMI_EXPORTERS_SCP_TYPE scp
enabled = true MURAKAMI_EXPORTERS_SCP_ENABLED 0, 1, true, false
target = "myserver.com:system/path/" MURAKAMI_EXPORTERS_SCP_TARGET hostname:path/ Defines the remote server and system path where the SCP exporter should save data. A server's IP address is also supported.
port = 22 MURAKAMI_EXPORTERS_SCP_PORT 22, alternate SCP port used by the remote server Defines the port used by the remote server for the server's SCP/SSH service.
username = "murakami" MURAKAMI_EXPORTERS_SCP_USERNAME remote server username Defines the username to be used by the SCP exporter.
key = "/murakami/keys/id_rsa_murakami" MURAKAMI_EXPORTERS_SCP_KEY The system path within the Murakami container where the SCP user's private SSH key is located.
[exporters.gcs] The 'gcs' exporter defines a storage bucket in a Google Cloud Storage project where test data should be saved.
type = "gcs" MURAKAMI_EXPORTERS_GCS_TYPE gcs
enabled = true MURAKAMI_EXPORTERS_GCS_ENABLED 0, 1, true, false
target = "gs://murakami-gcs-test/" MURAKAMI_EXPORTERS_GCS_TARGET gs://bucketname Defines the GCS storage bucket name where data should be stored.
key = "/murakami/keys/murakami-gcs-serviceaccount.json" MURAKAMI_EXPORTERS_GCS_KEY The system path within the Murakami container where the GCS service account's JSON keyfile is located.
[exporters.http0] The HTTP exporter is provided as a means of posting test results to an instance of Murakami-Viz.
type = "http" MURAKAMI_EXPORTERS_HTTP0_TYPE http
enabled = true MURAKAMI_EXPORTERS_HTTP0_ENABLED 0, 1, true, false Enables or disables the HTTP exporter
url = "/api/v1/runs" MURAKAMI_EXPORTERS_HTTP0_URL "/api/v1/runs" Designated URL where you are hosting Murakami Viz, referencing the API endpoint
dash_enabled = 1 MURAKAMI_TESTS_DASH_ENABLED 0, 1, true, false Enables or disables the DASH test runner
ndt5_enabled = 1 MURAKAMI_TESTS_NDT5_ENABLED 0, 1, true, false Enables or disables the NDT5 test runner
ndt7_enabled = 1 MURAKAMI_TESTS_NDT7_ENABLED 0, 1, true, false Enables or disables the NDT7 test runner
speedtestmulti_enabled = 1 MURAKAMI_TESTS_SPEEDTESTMULTI_ENABLED 0, 1, true, false Enables or disables the speedtest-cli multi-stream test runner
speedtestsingle_enabled = 1 MURAKAMI_TESTS_SPEEDTESTSINGLE_ENABLED 0, 1, true, false Enables or disables the speedtest-cli single-stream test runner

Multiple exporters of any type are supported. For example if you wanted to define two different SCP servers or GCS storage buckets where data should be exported, the config file exporters section might look like this:

[exporters]

  [exporters.gcs1]
  type = "gcs"
  enabled = true
  target = "gs://murakami-storage-bucket-archive/"
  service_account = "[email protected]"
  key = "/murakami/keys/murakami-gcs-serviceaccount.json"

  [exporters.gcs2]
  type = "gcs"
  enabled = true
  target = "gs://murakami-storage-bucket-access/"
  service_account = "[email protected]"
  key = "/murakami/keys/murakami-gcs-serviceaccount.json"

OR as environment variables:

MURAKAMI_EXPORTERS_GCS1_TYPE = "gcs"
MURAKAMI_EXPORTERS_GCS1_ENABLED = "true"
MURAKAMI_EXPORTERS_GCS1_TARGET = "gs://murakami-storage-bucket-archive/"
MURAKAMI_EXPORTERS_GCS1_SERVICE_ACCOUNT = "[email protected]"
MURAKAMI_EXPORTERS_GCS1_KEY = "/murakami/keys/murakami-gcs-serviceaccount.json"

MURAKAMI_EXPORTERS_GCS2_TYPE = "gcs"
MURAKAMI_EXPORTERS_GCS2_ENABLED = "true"
MURAKAMI_EXPORTERS_GCS2_TARGET = "gs://murakami-storage-bucket-access/"
MURAKAMI_EXPORTERS_GCS2_SERVICE_ACCOUNT = "[email protected]"
MURAKAMI_EXPORTERS_GCS2_KEY = "/murakami/keys/murakami-gcs-serviceaccount.json"

For complete configuration examples for each deployment type, please see:

Included Utility Scripts

Two convenience utilities are provided with Murakami:

M-Lab Supported Dockerhub Images and Tags

Measurement Lab published supported, pre-built Docker container images on Dockerhub. As new system architectures are tested, we publish images using the pattern: measurementlab/murakami-<SYSTEM ARCHITECTURE>:<TAG>

Tags are either a release number or "latest".

For example, the "latest" image for the armv7 architecture would be: measurementlab/murakami-armv7:latest Or we could refernece a release tag: measurementlab/murakami-armv7:v2.0

Please visit our repo on Dockerhub for a complete list of images/tags.

Building Murakami Images

If you are interested in building your own Murakami Docker images, please see our BUILD instructions.

Acknowledgements

M-Lab would like to thank the Institute for Museum and Library Services (IMLS), and Simmons University, whose partnership on IMLS Award #LG-71-18-0110-18 supported the development of many current Murakami features, as well as Murakami-Viz.

murakami's People

Contributors

robertodauria avatar jheretic avatar rudietuesdays avatar flatlinebb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.