Skip to content

Installing the Agent

This page assumes that you have already followed the steps in the setup page.

Configuration

The agent config file is stored at /etc/systemslab/agent.toml. You will need to configure the server URL that the agent will talk to:

toml
# The URL that the agent should use to connect to the server (required).
server_url = "https://example.com/systemslab"

You should also configure the cluster id:

toml
# A debug identifier that allows us (IOP) to identify which client and cluster
# error messages were emitted from.
#
# This allows us to reach out if something goes wrong with your cluster.
log.cluster_id = "<your company name>/<cluster name>"

Other common options that you will likely want to set are:

toml
# A DNS name or IP address that the server can use to connect to this agent.
# This is required if the server is behind a reverse proxy such as nginx.
#
# Note that if you provide a DNS name then it is resolved by the server and
# not the agent.
agent_addr = "agent1.example.com"

# Used to configure which experiment jobs can run on this agent.
tags = ["agent1", "aws"]

# Give this agent a name.
#
# If not set then the hostname will be used instead.
name = "..."

For the complete set of config options that you can set see the agent config reference.

Starting the Agent

Once the agent is properly configured you can start its systemd service by running

bash
systemctl enable systemslab-agent
systemctl start systemslab-agent

The agent will automatically register itself with the SystemsLab server that is reachable via server_url so that the server can schedule jobs onto it.

At this point you have a working SystemsLab agent that you can use to run jobs. Any further sections are optional.

Granting sudo access to jobs on the agent

WARNING

Doing this means that anybody with access to the SystemsLab server can run programs as root on any agent which has been configured to provide sudo access.

Sometimes you will want to run experiments that require sudo access. By default, this is not provided. However, if you wish to enable this then you can do so by granting sudo permissions to the systemslab-agent user.

This can be done in a few ways:

  • Add the systemslab-agent user to the sudo group.
  • Add a new file under /etc/sudoers.d with the following contents
    systemslab-agent ALL=(ALL) NOPASSWD: ALL

For more documentation on configuring sudo access see the sudoers.5 manpage.