Manually configure Dockerized load generators

This section describes how to set up load generators on a Linux or Windows platform using Docker, and how to manually assign the load generators to a performance test.

Note:  

  • The Windows Dockerized load generator image is provided as a tech preview version, for Web - HTTP/HTML and Java protocols.
  • Dockerized load generators are not supported when running over a firewall.

  • Alternatively, you can use elastic load generator provisioning to dynamically assign Dockerized load generators to a performance test. For details, see Manage elastic load generators.

About Dockerized load generators

Docker is a platform that allows you to develop, ship, and run applications via a container. Docker uses a standard container format that lets developers prepare applications inside containers, while system administrators and other teams, such as Quality Assurance engineers, run the container in order to deploy the application.

You can run load generator hosts inside Docker containers, using Linux or Windows Dockerized load generator images which are available in the Docker repository. For details, see Download Dockerized load generator image.

For general details regarding Docker, see https://docs.docker.com.

Benefit of Dockerized load generators

Using Dockerized load generators:

  • Enables you to automate the testing process by provisioning and de-provisioning load generators on demand, and seamlessly add them to performance tests using the REST API.

  • Saves having to rely on (and manage) load generators defined in the lab, and the need to reserve load generators in advance.

Back to top

Deploy load generators using Docker

For details on how to deploy Dockerized load generators, see the Performance Center Installation Guide.

Back to top

Add Dockerized load generators to your tests

After installing Dockerized load generators, select the method for assigning them to performance tests:

Method Description
REST API You can assign Dockerized load generators to tests from the Performance Center REST API. For details, see Add Dockerized load generators to tests from the REST API.
User Interface You can assign Dockerized load generators to tests from the Performance Center user interface. For details, see Manually configure and assign Dockerized load generators to tests.

Back to top

Add Dockerized load generators to tests from the REST API

  1. Prerequisites

    Set up the Docker installation as described in the Performance Center Installation Guide.

  2. Add Dockerized load generators to the Performance Center Hosts list

    1. Authenticate the user to the Performance Center Administration REST API by sending an HTTP GET request to the following URL:

      http://<Performance Center server>/Admin/rest/authentication-point/authenticate

      Example: GET /Admin/rest/authentication-point/authenticate

      For API details, see Authenticate in the Performance Center Administration REST API Guide.

    2. Add a load generator to each Docker container using the Get Hosts API, and configure the settings as follows:

      • For host name, enter the physical name of the load generator host followed by _dkr_<lgInitialPort>, where <lgInitialPort> is the initial port that is mapped to the Docker container (see step 2).

        Example: myHost_dkr_10110

      • Add the container as a Unix or windows installation, with LoadGenerator purpose.

        Request example:

      For API details, see Add Host in the Performance Center Administration REST API Guide.

      The Dockerized load generators are added the Hosts list.

  3. Run the performance test

    1. Prerequisites

      Make sure you have created a performance test, and configured it to use non-specific (automatch) load generators. You can also use specific load generators, but then you need to update your test to use those load generators (this can be done using tests/{ID} in the Performance Center REST API Guide).

      You can create a test either from the Performance Center Administration REST API (see tests in the Performance Center REST API Guide), or manually from the Performance Center user interface (see Design a performance test).

    2. Run the performance test from the Performance Center REST API (see Start a Test Run in the Performance Center REST API Guide).

  4. Gather results

    When the performance test has finished running, collate (and analyze) performance test data using the REST API. For API details, see collate and analyze in the Performance Center REST API Guide.

  5. Remove the load generators from the test - optional

    Note: Make sure you collate the results for any load generators you intend to remove from the test before you delete them.

    1. Remove the load generators from the test using the hosts/{hostID} API. For API details, see hosts/{hostID} in the Performance Center Administration REST API Guide.

    2. Delete all Docker containers by running the following command:

      "docker rm -f $(docker ps -a -q)";

Back to top

Manually configure and assign Dockerized load generators to tests

  1. Prerequisite

    Set up the Docker installation as described in the Performance Center Installation Guide.

  2. In Performance Center Administration, select Maintenance > Hosts.

  3. Select the Hosts tab, and then click Create New Host .

  4. Configure the host settings as follows:

    • Host Name. Enter the physical name of the host followed by _dkr_<port_number>, where <port_number> is the port that is mapped to the Docker container.

      Example: myHost_dkr_10110

    • Purpose. Select Load Generator only.

    • Installation. Select the installation type (Unix Load Generator, Windows Host, or Windows Standalone LG.

  5. Click Save to add the host to the Hosts grid.

  6. In My Performance Center, assign the load generator to a test. For details, see Distribute load generators among Vuser groups in a test.

Back to top

Notes and Limitations

This section contains notes and limitations for Dockerized load generators.

  • If Security-Enhanced Linux (SELinux) is enabled on your Linux operating system, it can prevent Docker containers from loading the required load generator libraries.

    Workaround: Contact your IT department to configure SELinux so that it will still be effective while letting the load generators load the required libraries for them to operate.

  • Any errors encountered by Dockerized load generators are written to the Event log under the docker node host name and port.

Back to top

See also: