Docker is the preferred method for setting up mabl Link because it removes the need for installing Java and setting up the Java-based Link Agent distribution on the host machine. This article explains how to run the Link Agent inside a Docker container.
Running the Link Agent in a Docker container requires a "Link Agent" API key. Workspace owners can create API keys on the APIs page in the mabl app: Settings > APIs.
Step 1: Pull the Link Agent image
Pull the mablhq/link-agent image from Docker on the machine where you will run the Link Agent: docker pull mablhq/link-agent
.
Step 2: Run the Link Agent
Running the Link Agent in a Docker container requires the following arguments:
<your-api-key>
- your "Link Agent" API key<agent-name>
- create a name for your Link Agent between 1 and 24 characters long that consists of lowercase letters, numbers, and dashes.
Use the following command to run the Link Agent in a Docker container:
$ docker run mablhq/link-agent --api-key <your-api-key> --name <agent-name>
Alternatively, use the following command to run the container as a background daemon process:
$ docker run -d --name mabl-link-agent mablhq/link-agent \ --api-key <your-api-key> --name <agent-name>
Support for HTTP forward proxies
If your network requires it, you can configure the Link Agent to use an HTTP forward proxy, including support for basic proxy auth. Link Agents also support Proxy Auto-Configuration (PAC).
Step 3: Validate the Link connection is live
After starting the Link Agent, return to the networking page in the mabl app: Settings > Networking. The Link Agent appears in the Link Agents section with an "Initializing" status when starting up. Within a couple minutes of starting up, the Link Agent should show a "Connected" status.
Next steps
Once the Link Agent is installed and running, configure your tests to run over mabl Link.