Provision Docker hosts manually

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

Tip: Alternatively, you can use elastic provisioning to dynamically assign Dockerized hosts to a performance test. For details, see Provision Docker hosts automatically.

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.

Refer to the product documentation for more details.

Back to top

Deploy hosts using Docker

For details on how to deploy and run Dockerized hosts, see the LoadRunner Enterprise Installation Guide (available from Installation).

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

Back to top

Add Dockerized hosts to tests from the REST API

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

  1. Prerequisites

    Set up the Docker installation as described in the LoadRunner Enterprise Installation Guide (available from Installation).

  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 that 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 that 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 configure and assign a Dockerized load generator to a performance test.

  1. Prerequisite

    Set up the Docker installation as described in the LoadRunner Enterprise Installation Guide (available from Installation).

  2. In LoadRunner Enterprise Administration, select Maintenance > Hosts.

  3. Select the Hosts tab, and then click Add 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: Windows Host, OneLG, or Unix Load Generator.

  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 and Assign elastic hosts to a test.

Back to top

Notes and Limitations

For details, see Notes and limitations.

Back to top

See also: