diff --git a/site/src/SUMMARY.md b/site/src/SUMMARY.md index 5653af60..3131a534 100644 --- a/site/src/SUMMARY.md +++ b/site/src/SUMMARY.md @@ -16,4 +16,8 @@ - [Layers](./cargo_maelstrom/layers.md) - [Container Images](./cargo_maelstrom/container_images.md) - [Clustered Job Runner Management](./clustered_job_runner_management.md) + - [Broker Configuration](./clustered_job_runner_management/broker.md) + - [Worker Configuration](./clustered_job_runner_management/worker.md) + - [Web UI](./clustered_job_runner_management/web_ui.md) - [Job States](./clustered_job_runner_management/job_states.md) + - [Log Level](./clustered_job_runner_management/log_level.md) diff --git a/site/src/cargo_maelstrom/configuration.md b/site/src/cargo_maelstrom/configuration.md index c817a387..ce9ef5cf 100644 --- a/site/src/cargo_maelstrom/configuration.md +++ b/site/src/cargo_maelstrom/configuration.md @@ -6,15 +6,34 @@ tests are run. ## Configuring `cargo-maelstrom` +`cargo-maelstrom` can be configured with the CLI, environment variables, or a +configuration file. + The default configuration file path is `/.config/cargo-maelstrom.toml`. This path can be overridden by passing the `--config-file` option via the CLI. -It can contain the following options -- `broker`: the address of the broker to connect to +Here are the different options + +- [`broker`](#the-broker-field): the address of the broker to connect to - `[run]`: contains options about the `run` sub-command - - `quiet`: if true, use quiet mode by default - (See [Running Tests >> Terminal Output](./running_tests.html#terminal-output)) + - [`quiet`](#the-quiet-field): if true, use quiet mode + +## The `broker` Field +- TOML: `broker = "1.2.3.4:9000"` +- CLI: `--broker 1.2.3.4:9000` +- ENV: `CARGO_MAELSTROM_BROKER=1.2.3.4:9000` + +This is the network address of the broker which the client will attempt to +establish a connection to. + +## The `quiet` Field +- TOML: `quiet = true` +- CLI: `--quiet` +- ENV: `CARGO_MAELSTROM_RUN="{ quiet = true }"` + +Enables quiet mode. See +[Running Tests >> Terminal Output](./running_tests.html#terminal-output). ## Configuring Tests diff --git a/site/src/clustered_job_runner_management.md b/site/src/clustered_job_runner_management.md index d54d0e69..75fb85b3 100644 --- a/site/src/clustered_job_runner_management.md +++ b/site/src/clustered_job_runner_management.md @@ -1 +1,10 @@ # Clustered Job Runner Management + +Both the broker and the worker can be configured using either the command line +or via a configuration file. See their specific pages for more information +- [Broker Management](./clustered_job_runner_management/broker.md) +- [Worker Management](./clustered_job_runner_management/worker.md) + +The broker can be monitored using the +[web UI](./clustered_job_runnner_management/web_ui.md). It runs an HTTP server on +the configured HTTP port. diff --git a/site/src/clustered_job_runner_management/broker.md b/site/src/clustered_job_runner_management/broker.md new file mode 100644 index 00000000..e4a2c658 --- /dev/null +++ b/site/src/clustered_job_runner_management/broker.md @@ -0,0 +1,54 @@ +# Broker Management + +The broker can be configured via CLI, configuration file, or environment +variables. CLI or environment variables override configuration file values. + +Configuration default path is +` http_port](./broker.md#the-http_port-field). + +The following is an explanation of the various elements on the web UI. + +## Connected Machines +The web UI contains information about the number of client and the number of +worker connected to the broker. Keep in mind, the web UI itself is counted as a +client. + +## Used Slots +A slot is the ability to run a job on a worker. The more workers connected, the +more number of slots. See +[Worker Configuration > Slots](./worker.md#the-slots-field). + +## Job Statistics +The web UI also contains information about current and past jobs. This includes +the current number of jobs, and graphs containing historical information about +jobs and their states. There is a graph per connected client, and there is an +aggregate graph at the top. The graphs are all stacked line-charts. See [Job +States](./job_states.md) for information about what the various states mean. diff --git a/site/src/clustered_job_runner_management/worker.md b/site/src/clustered_job_runner_management/worker.md new file mode 100644 index 00000000..506c52b9 --- /dev/null +++ b/site/src/clustered_job_runner_management/worker.md @@ -0,0 +1,58 @@ +# Worker Management + +The worker can be configured via CLI, configuration file, or environment +variables. CLI or environment variables override configuration file values. + +Configuration default path is +`/.cache/maelstrom-broker`. For the -given set-up this should be `/home/maelstrom-broker/.cache/maelstrom-broker` +The broker can be configured using CLI, environment variables, or configuration +file, for more information see [Broker +Configuration](./clustered_job_runner_management/broker.md) + +By default it stores its caches in +`/.cache/maelstrom-broker`. For the given set-up this should +be `/home/maelstrom-broker/.cache/maelstrom-broker` ## Installing the Worker @@ -138,7 +143,12 @@ sudo systemctl start maelstrom-worker The worker should be running now. To make sure you can pull up the broker web UI and it should now show that there is 1 worker. -It stores its caches in `/.cache/maelstrom-worker`. For the -given set-up this should be `/home/maelstrom-worker/.cache/maelstrom-worker` +The worker can be configured using CLI, environment variables, or configuration +file, for more information see [Worker +Configuration](./clustered_job_runner_management/worker.md) + +By default it stores its caches in +`/.cache/maelstrom-worker`. For the given set-up this should +be `/home/maelstrom-worker/.cache/maelstrom-worker` Repeat these steps for every machine you wish to install a worker on to.