Manually configure dockerized hosts

This section describes how to manually set up dockerized load generator hosts, and how to assign them to a performance test.

Note: Dockerized load generators are not supported when running over a firewall.

Alternatively, you can use elastic host provisioning to dynamically assign dockerized hosts to a performance test. For details, see Configure elastic dockerized hosts.

About dockerized hosts

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 your hosts inside Docker containers, using Linux or Windows dockerized load generator images which are available in the Docker repository. For details, see Manage dockerized images.

Benefit of using dockerized hosts include:

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

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

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

Back to top

Deploy hosts using Docker

For details on how to deploy and run dockerized hosts, see the LoadRunner Enterprise Installation Guide.

Back to top

Add dockerized hosts to your tests

After installing dockerized hosts, select the method for assigning them to performance tests:

Method Description
REST API You can assign dockerized load generators and Controllers to tests from the LoadRunner Enterprise REST API. For details, see Add dockerized hosts to tests from the REST API.
User Interface You can assign dockerized load generators and Controllers to tests from the LoadRunner Enterprise user interface. For details, see Manually configure and assign dockerized hosts to tests.

Back to top

Add dockerized hosts to tests from the REST API

This task describes how to add dockerized hosts to tests from the REST API.

  1. Prerequisites

    Set up the Docker installation as described in the LoadRunner Enterprise Installation Guide.

  2. Add dockerized load generators to the LoadRunner Enterprise Hosts list.

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

      http://<LoadRunner Enterprise server>/Admin/rest/authentication-point/authenticate

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

      For API details, see Authenticate in the LoadRunner Enterprise Administration REST API Guide.

    2. Add a load generator host 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 the LoadRunner Enterprise Installation Guide).

        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 LoadRunner Enterprise Administration REST API Guide.

      The dockerized hosts are added to 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 LoadRunner Enterprise REST API Guide).

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

    2. Run the performance test from the LoadRunner Enterprise REST API (see Start a Test Run in the LoadRunner Enterprise 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 LoadRunner Enterprise REST API Guide.

  5. Remove the hosts 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 hosts from the test using the hosts/{hostID} API. For API details, see hosts/{hostID} in the LoadRunner Enterprise 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 hosts to tests

This task describes how to manually assign a dockerized load generator to a performance test.

  1. Prerequisite

    Set up the Docker installation as described in the LoadRunner Enterprise Installation Guide.

  2. In LoadRunner Enterprise 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 (see the LoadRunner Enterprise Installation Guide).

      Example: myHost_dkr_10110

    • Purpose. Select Load Generator only.

    • Installation. Select the installation type: Unix Load Generator, Windows Host, or OneLG.

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

  6. In the LoadRunner Enterprise user interface, assign the load generator to a test. For details, see Distribute load generators among Vuser groups in a test and Assign elastic hosts to a test.

Back to top

Notes and Limitations

For details, see Notes and limitations.

Back to top

See also: