Share this page

# Deploy Dockerized load generators on Windows

This section describes how to run a Dockerized load generator on a Windows platform.

Docker is a platform that allows you to develop, ship, and run applications using a container. Refer to the product documentation for more details.

Note: For supported protocols on Dockerized load generators, see the Supported Protocols guide.

In this topic:

## Prerequisites

Below is a list of prerequisites that are required to run a Dockerized load generator on a Windows platform.

Prerequisite | Description
--- | ---
Install Docker | Install Docker on the target machine, along with its dependencies, and set up the target machine environment as required. Currently, only the 64-bit version is supported.
Obtain Docker image | Pull the Windows load generator Docker image accessible from the performance testing page (https://hub.docker.com/u/performancetesting) in the Docker hub. Use the following command and appropriate <tag version number>, for example, 26.1: `docker pull performancetesting/opentext_onelg_windows:<tag version number>` Note: The Docker image for the OneLG load generator replaces the previous Windows standalone load generator docker image.

Back to top

## Run a Dockerized load generator using the predefined image

Use the ready-to-use image to run a load generator (OneLG) on Docker for Windows. If you need customization for your container, for example, for Java or to run under a specific user, see Run a Dockerized load generator using a custom image.

Note:

- The following environment variables are available to enable JMeter and Gatling on the load generator if required:

  - `ENABLE_JMETER`

  - `ENABLE_GATLING`

- Since Java is not installed in the Windows OneLG load generator image, you need to build a customized image with Java to run JMeter or Gatling scripts.

- If one Docker load generator is configured with either JMeter or Gatling scripts or both, then all Dockers load generators get these flags as well, even if they are configured with other scripts types.

To run a Dockerized load generator:

Run the load generator container using the following command:

Copy code

    docker run -id -p <host_port>:54345 -e "ENABLE_GATLING=1" -e "ENABLE_JMETER=1" performancetesting/opentext_onelg_windows:<tag version number>

Note: Check that the <host_port> on the machine is available and allows incoming requests. You specify this port on the Controller side when connecting to this load generator.
`docker run -id -p <host_port1>:8731 -p <host_port2>:8086 performancetesting/host:<tag version number>`

Back to top

## Run a Dockerized load generator using a custom image

If your environment requires customized settings for running the container, you can create a Dockerfile to build a custom image for Docker on Windows.

Examples for custom images:

- To use a specific user account for the processes under which the Vusers are running, to provide support for accessing network resources like script parameter files. After the container is running, it should be able to verify the user.

- To run Java, Gatling, or JMeter protocols on Windows load generator containers.

- To define environment variables for proxy server host and port.

To run a custom Dockerized load generator:

1. Create a new folder, and within it create a file named dockerfile. Paste the following FROM line into the file, using the appropriate OpenText Enterprise Performance Engineering version for the <tag version number>, and add the relevant customization lines:

   Copy code

       FROM performancetesting/opentext_onelg_windows:<tag version number><Customization lines>

   For customization examples, see Examples of customized content for Dockerfiles

   Tip: Refer to the Docker documentation for commands that can be used in Docker files.

2. Save the Dockerfile.

3. Open a command line at the dockerfile folder path and run the following command, using the name you want for your custom image:

   Copy code

       docker build -t <custom dockerfile name> .

4. Create a container for each load generator you want to use, by running the following command (or use any Docker orchestrator tool for running containers):

   Copy code

       docker run -id -p <host_port>:54345 <custom image name>

   If the custom image in step 3 was built with a tag then include it in the command:

   Copy code

       docker run -id -p <host_port>:54345 <custom image name>:<tag version number>

   Note: Check that the <host_port> on the machine is available and allows incoming requests. You specify this port on the Controller side when connecting to this load generator. This is not relevant when using elastic load generators, because this is managed by the orchestrator.

Back to top

## Examples of customized content for Dockerfiles

The following gives an example of dockerfile content for running the Vusers under a specified user account with network access to shared locations. Replace the values between <> with credentials for a valid user account in your environment, with network access to the shared resources.

Example for Vusers under a specified user account:

Copy code

    #escape=`
    FROM performancetesting/opentext_onelg_windows:24.3
    RUN c:\LG\launch_service\bin\magentservice.exe -remove
    RUN c:\LG\launch_service\bin\magentservice -install <domain>\<user name> <password>

Example of dockerfile content for running Java protocols:

Copy code

    #escape=`
    FROM performancetesting/opentext_onelg_windows:24.3
    COPY .\<folder contains JDK> <target path in the container>

The path to the target JDK directory defined in the COPY line for the <target path in the container> must also be added to the Java VM runtime settings page:

Note: For Java 64-bit protocol testing, include the following command line in the dockerfile, to add the path to the bin folder for the JDK 64-bit to the machine PATH environment variable:

`RUN powershell [Environment]::SetEnvironmentVariable(\"Path\", $env:Path + \";<target JDK path in the container>\bin\", [EnvironmentVariableTarget]::Machine)`

Back to top

## After running the load generator containers

Add the load generators containers to your tests.

- For elastic hosts, see Set up Dockerized hosts.

- For manually configure Dockerized load generators, see Deploy hosts using Docker.

Note: This is not relevant when using orchestrators.

Back to top

## Tips and guidelines

- Dockerized load generators, run from the predefined image, are not supported when running over a firewall.

- Use `docker ps` to list the containers that are running.

- To stop the load generator service:

  - Use `docker stop <load generator container name or ID>` if you want to reuse the same load generator.

  - Use `docker rm -f <load generator container name or ID>` to remove the load generator container.

- To access the host network directly, use `--net=host` in place of `-p <host_port>:54345`. We recommend you use this flag if the AUT generates a lot of network activity.

Back to top

https://admhelp.microfocus.com Enterprise Performance Engineering,LoadRunner Enterprise 8942
Tips to improve your search results...OpenText™ Enterprise Performance Engineering Help Center OpenText™ Enterprise Performance Engineering Help 26.1 All View Local Help Center View Online Help Center Version: