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 for each installation.

Regenerate an Agent in Docker Installation

Follow these steps:

  1. Log into your BlazeMeter account.
  2. Navigate to Settings, Workspace, Private Locations.
  3. Click a private location to see its details and a list of its agents.
  4. In the Actions column for the agent that you want to regenerate, click Regenerate.
  5. Click OK.
  6. You will see a Docker run command, similar to the one below:
    docker command agent regenerate
  7. Copy this command and save in a safe place for later.

    Note:

    • Installing the agent inside Docker requires sufficient permissions (root access required).
    • When installing an agent behind a corporate proxy, follow these additional steps.
    • When installing an agent that uses a CA certificate, follow these additional steps.
    • When installing an agent on a host with multiple network interfaces, follow these additional steps.

  8. Remove the currently running blazemeter/crane container with the following command:
    sudo docker rm -f $(sudo docker ps -q -f ancestor=blazemeter/crane)
  9. 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).
    You have successfully regenerated the machine.

Regenerate an Agent in Kubernetes Installation

Follow these steps:

  1. Log into your BlazeMeter account.
  2. Navigate to Settings, Workspace, Private Locations.
  3. Click a private location to see its details and a list of its agents.
  4. In the Actions column for the agent that you want to regenerate, click Regenerate.
  5. Click OK.
  6. You will then see a Docker run command, similar to the one below:
    docker command agent regenerate
  7. Copy this command and save in a safe place for later.

    Note:

  8. Use one of the following to update your agent deployment file:
    Edit the deployment file directly to replace the value attached to the AUTH_TOKEN environment variable:
    kubectl get deployments (to get the crane deployment name)
    kubectl edit deployment <crane deployment name>
    This will open the deployment configuration file in a vi window which will allow you to edit the AUTH_TOKEN. Once you have finished editing, you can type :wq to save your changes.
    Or

    Edit the deployment file you created for the installation in a text editor to replace the AUTH_TOKEN environment variable value with the new one and save it. Move the file to your Kubernetes instance and use the following command to apply the changes:
    kubectl apply -f <filename of configuraiton file>
    You have successfully regenerated the machine.