Share this page

# Manual provisioning of Docker 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 Automatic provisioning of Docker hosts.

In this topic:

## 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:

- REST API. You can assign Dockerized load generators to tests from the LoadRunner Enterprise REST API. For details, see Add Dockerized hosts to tests from the REST API.

- User Interface. You can manually assign Dockerized load generators 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 (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 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 (available from Installation).

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: `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:

- Automatic provisioning of Docker hosts
- Blog: Setting up a LoadRunner Enterprise containerized environment

https://admhelp.microfocus.com LoadRunner Enterprise 8942
Tips to improve your search results... LoadRunner Enterprise Help Center LoadRunner Enterprise Help LR Enterprise Help 2023-2023 R1 All View Local Help Center View Online Help Center back Go back in browser history forward Go forward in browser history Remove search highlights next topic Go to next topic previous topic Go to previous topic Print the current topic Version: