Add/Remove BrowserBot from Existing Docker Enterprise Agents

Docker-based Enterprise Agents can be installed with or without BrowserBot included, depending on the need for browser synthetics testing within the environment. This can also be changed after the initial deployment. The two images are identified as latest-agent (base Enterprise Agent only), and latest (includes BrowserBot).

This article outlines the steps to transition an Enterprise Agent between images.

Add BrowserBot to an Existing Docker-based Enterprise Agent

To switch from a non-BrowserBot installation to one that is set up for browser synthetics tests, you will need to run two sets of commands in the Docker container's CLI. The first set of commands are for configuring seccomp and AppArmor profiles for your Docker host.

curl -Os https://downloads.thousandeyes.com/bbot/configure_docker.sh
chmod +x configure_docker.sh
sudo ./configure_docker.sh

The second set of commands will install and setup the Enterprise Agent. Ensure that you replace the variables (<NAME>, <HOST_VOL_AGENT_DIR>, and <TE_ACCOUNT_TOKEN>) with your configuration requirements:

docker pull thousandeyes/enterprise-agent > /dev/null 2>&1
docker stop '<NAME>' > /dev/null 2>&1
docker rm '<NAME>' > /dev/null 2>&1
docker run \
  --hostname='<NAME>' \
  --memory=2g \
  --memory-swap=2g \
  --detach=true \
  --tty=true \
  --shm-size=512M \
  -e TEAGENT_ACCOUNT_TOKEN=TE_ACCOUNT_TOKEN \
  -e TEAGENT_INET=4 \
  -v '<HOST_VOL_AGENT_DIR>/thousandeyes/<NAME>/te-agent':/var/lib/te-agent \
  -v '<HOST_VOL_AGENT_DIR>/thousandeyes/<NAME>/te-browserbot':/var/lib/te-browserbot \
  -v '<HOST_VOL_AGENT_DIR>/thousandeyes/<NAME>/log/':/var/log/agent \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_ADMIN \
  --name '<NAME>' \
  --restart=unless-stopped \
  --security-opt apparmor=docker_sandbox \
  --security-opt seccomp=/var/docker/configs/te-seccomp.json \
  thousandeyes/enterprise-agent /sbin/my_init

Remove BrowserBot from an Existing Docker-based Enterprise Agent

To switch from a BrowserBot installation to the base agent only, run the following commands in the Docker container's CLI, ensuring that you replace the variables (<NAME>, <HOST_VOL_AGENT_DIR>, and <TE_ACCOUNT_TOKEN>) with your configuration requirements:

docker pull thousandeyes/enterprise-agent:latest-agent > /dev/null 2>&1
docker stop '<NAME>' > /dev/null 2>&1
docker rm '<NAME>' > /dev/null 2>&1
docker run \
  --hostname='<NAME>' \
  --memory=2g \
  --memory-swap=2g \
  --detach=true \
  --tty=true \
  --shm-size=512M \
  -e TEAGENT_ACCOUNT_TOKEN=<TE_ACCOUNT_TOKEN> \
  -e TEAGENT_INET=4 \
  -v '<HOST_VOL_AGENT_DIR>/thousandeyes/<NAME>/te-agent':/var/lib/te-agent \
  -v '<HOST_VOL_AGENT_DIR>/thousandeyes/<NAME>/te-browserbot':/var/lib/te-browserbot \
  -v '<HOST_VOL_AGENT_DIR>/thousandeyes/<NAME>/log/':/var/log/agent \
  --cap-add=NET_ADMIN \
  --cap-add=SYS_ADMIN \
  --name '<NAME>' \
  --restart=unless-stopped \
  --security-opt apparmor=docker_sandbox \
  --security-opt seccomp=/var/docker/configs/te-seccomp.json \
  thousandeyes/enterprise-agent:latest-agent /sbin/my_init

Last updated