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.

For supported protocols on Dockerized load generators, see Supported Protocols.

Note: FTP is not fully supported with load generator for Docker on Windows. Passive mode FTP is supported, but Active mode FTP is not.

In this topic:

## Prerequisites

- 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. For installation details, see the Docker online documentation.

- Pull the Windows load generator Docker image from the from the relevant page, 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, 23.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.

To run a Dockerized load generator:

Run the load generator container using the following command:

docker run -id -p <host_port>:54345 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.

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 running, the container should be able to verify the user.

- To run Java 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 Professional Performance Engineering version for the <tag version number>, and add the relevant customization lines:

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

   For customization examples, see Examples of customized content for Dockerfiles

   Tip: For information on commands that can be used in Docker files, see the Docker online documentation.

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:

   docker build -t <custom image 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):

   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:

   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.

Back to top

## Examples of customized content for Dockerfiles

Example for Vusers under a specified user account

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:
    #escape=`
    FROM performancetesting/opentext_onelg_windows:<tag version number>
    RUN c:\LG\launch_service\bin\magentservice.exe -remove
    RUN c:\LG\launch_service\bin\magentservice -install <domain>\<user name> <password>

Example for running Java/JMeter/Gatling protocols

The following gives an example of dockerfile content to run Java, JMeter, or Gatling protocols:

    Example:
    #escape=`
    FROM performancetesting/opentext_onelg_windows:<tag version number>
    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:

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

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

- For JMeter/Gatling protocol testing, include the following command line in the dockerfile, in order to add the path for the JDK/JRE to the machine JAVA_HOME environment variable:

  `RUN powershell [Environment]::SetEnvironmentVariable(\"JAVA_HOME\", \"<target JDK/JRE path in the container>\", [EnvironmentVariableTarget]::Machine)`

Back to top

## After running the load generator containers

Add the load generators containers to scenarios. For details, seeConfigure Dockerized load generators.

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>` in order 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

See also:

- Install a load generator
- Prepare for installation

https://admhelp.microfocus.com Professional Performance Engineering,VuGen 8942
Tips to improve your search results... OpenText™ Professional Performance Engineering Help Center OpenText™ Professional Performance Engineering Help 25.1-25.3 All View Local Help Center View Online Help Center Version: