The following article explains how to install, uninstall, and regenerate BlazeMeter's on-premise agent on your server/instance behind your firewall.
First, make sure your server/instance meets the minimum requirements as described in this article.
- Log into your BlazeMeter account and click on the cog in the top right corner of the screen.
- Navigate to the private location where you want to create the Agent: go to Workspaces -> Private Locations and choose the Private Location.
- Choose "Add agent".
- Provide a name for the new agent, and optionally, the IP address of the machine.
- An installation command will be generated - Copy the command and run it on your private engine.
NOTE: Installing the agent inside Docker requires sufficient permissions (root access required).
NOTE: When installing an agent behind a corporate proxy, follow these additional steps
NOTE: When installing an agent that uses a CA certificate, follow these additional steps
NOTE: When installing an agent on a host with multiple network interfaces, follow these additional steps
- Once the command has finished running, a container will be created (called bzm-crane-<shipId>) and the images required for the installation will begin to download.
Downloads can take up to 30 minutes (depending on the network speed on the machine) - during this time, the new agent will be listed in the Private Location, and show up in the 'Downloading' status.
Once the download has finished, the agent will show to be in an 'Idle' status and will be available for use. Visit this article to learn how to use your new private location!
- Optional: You can check the downloaded docker images using the following command:
$ sudo docker imagesYou should see something similar to the following if you have all the required images (both tags MUST be present for proper functionality):
NOTE: If you have the GUI Functional Test, you will see a number of different browser images download to your agent, which will increase the number of images that are present. The list is extensive, but the below example is a sample of what they look like:
How to Uninstall/Remove Agent:
- Log in to the machine containing the agent you want to uninstall/remove, and run the following command to list all the containers:
$ sudo docker ps -aYou will see a response similar to the one below:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
54c0b773a855 blazemeter/crane "bash" 2 days ago Up 2 days 2 days ago blazemeter-crane
- Remove the bzm-crane-<shipId> container with the following command:
$ sudo docker rm -f <Container_ID>You need the container ID from the previous step to run this command.
- To remove all the images for the BlazeMeter install, list out all the images on the machine using the following command:
$ sudo docker imagesYou will see something like the following:
- To remove all the images, use the following command:
$ sudo docker rmi $(docker images -a -q)OR
If there is an issue with removing one or more of the images, you can use the following command to force delete it:
$ sudo docker rmi -f $(docker images -a -q)OR
If you have other images on your Docker instance and you want to only remove the images used for BlazeMeter, you can use the following command:
$ sudo docker rmi <Image ID of apm-image> <Image ID of blazemeter/proxy-recorder> <Image ID of taurus-cloud> <Image ID of blazemeter/crane>
- Finally, go to the Private Location containing this Agent and click the 'Delete' button, as shown in the screenshot below:
You will be prompted if you would like to complete this action, which you can complete by clicking 'OK'.
Regenerating an Agent:
Sometimes, you will need to regenerate an agent if something goes wrong with the install. The following steps describe what you will need to do:
- Navigate to the Private Location of the Agent in question and click the 'Regenerate' button, as shown below:
You will receive a prompt to continue, which you can complete by clicking 'OK'. You will then see another docker run command come up, similar to the one below:
Copy this command and save in a safe place for later. If you are using a proxy, you will need to add the necessary information, as discussed in this article. If you are using a certificate bundle, you will need to add the necessary information as discussed in this article.
- Log on to the agent machine, and run the following command:
$ sudo docker ps -aIf you see a response that lists a <blazemeter/crane> container, then continue to next step. If you do not see a <blazemeter/crane> container, skip to Step 4.
- Remove the container with the following commands (the Container_ID is found from the previous steps response):
$ sudo docker rm -f <Container_ID>
OPTIONAL: If you are having issues with the images for your installation, you will need to run the following command to remove the images:
Removes all Docker images
$ sudo docker rmi $(docker images -a -q)
Force removes all Docker images (in case of failure to delete)
$ sudo docker rmi -f $(docker images -a -q) (In case the images fail to delete)
Remove all BlazeMeter related images (in case of non-BlazeMeter images in Docker instance)
$ sudo docker rmi <Image ID of apm-image> <Image ID of blazemeter/proxy-recorder> <Image ID of taurus-cloud> <Image ID of blazemeter-quicktest> <Image ID of blazemeter> <Image ID of blazemeter/crane>
- Take the docker run command (with any extra pieces needed for a proxy and/or certificate bundle setup) and run the command with root access (use sudo).
- That's it! You have successfully regenerated the machine.