Fully containerized environment

This section describes how to deploy LoadRunner Enterprise as a fully containerized Docker environment.

Note: This topic is relevant for testing purpose only.

Requirements

The following are requirements for setting up a fully containerized environment:

  • A fully containerized Docker environment contains four elements: LoadRunner Enterprise server, LoadRunner Enterprise host, a load generator, and a database server (this must be provided by your database administrator).

  • Docker host machine (minimum requirements): 4 CPU cores, 16 GB RAM, 150 GB of storage. Refer to the product documentation for more details.

    Note: The setup was verified on Windows Server version 1809 build 17763.1282 running Docker version 19.3.0.5.

  • If you have McAfee Antivirus, deactivate Adaptive Threat Protection. Consider deactivating other antivirus software because it might also impact functionality within containers.

  • Create the docker-compose.yml, run_configurator.bat, and bring_env_up_W2019.ps1 files on a local machine by copying the file's content below to a text file, and renaming the files accordingly.

    Edit the files to suit your needs, and then copy them to the Docker host machine. For example, in docker-compose.yml you can add your DNS, change images if you tag them differently or have your own repository (similarly in bring_env_up_W2019.ps1), and add your enterprise proxy server.

    Copy code
    docker-compose.yml - Consists of container images and their parameters:
    version: '3'
    services:
     lrhost:
      image: performancetesting/host:21.02
      container_name: "lrhost"  
      hostname: Controller
      ports:
      - 8731:8731
      - 8086:8086  
      network_mode: nat
      stdin_open: true
      tty: true
     lg:
      image: performancetesting/microfocus_onelg_windows:21.02
      container_name: "lgsa"
      ports:
      - 54245:54245
      - 54345:54345
      network_mode: nat
      stdin_open: true
      tty: true
     lreserver:
      image: performancetesting/lreserver:21.02

      depends_on:
      - mssql  
      container_name: "lre"
      ports:
      - 80:80
      - 5876:5876
      hostname: lreserver
      network_mode: nat
      stdin_open: true  
      tty: true
      volumes:
      - c:\temp:c:\temp
     mssql:
      image: performancetesting/custom_mssql:2019
      container_name: "mssql"
      hostname: mssql
      ports:
      - 1433:1433
      network_mode: nat
      stdin_open: true
      tty: true
      environment:
      - "sa_password=W3lcome1"
      - "ACCEPT_EULA=Y"
    Copy code
    run_configurator.bat - Runs the LoadRunner Enterprise Configuration Wizard silently:
    cd c:\PC_Server\LREConfiguratorWizard
    HP.Software.HPX.ConfigurationWizard.exe /CFG:..\dat\setup\PCS\Xml\Configurator.xml /G:Install /U:..\dat\setup\PCS\Xml\UserInput.xml /Silent
    Copy code
    bring_env_up_W2019.ps1 - Pulls the images and runs the run_configuratator.bat file:
    docker pull performancetesting/lreserver:21.02
    docker pull performancetesting/microfocus_onelg_windows:21.02
    docker pull performancetesting/host:21.02
    docker pull performancetesting/custom_mssql:2019
    docker pull performancetesting/lreserver_dev:21.02
    If(!(test-path c:\temp))

    {
    New-Item -ItemType Directory -Force -Path c:\temp
    }

    Copy-Item "run_configurator.bat" -Destination "C:\temp\run_configurator.bat"

    docker-compose up -d

    # next sleep is for mssql container to finish health checks
    Start-Sleep -s 45

    # filesystem ops run only against non Hyper-V containers, thus good for WSrv2016, not good for Win10
    # docker cp run_configurator.bat pcs:/ -- to use with WSrv2016

    docker cp lre:C:\PC_Server\dat\PCS.config c:\temp
    (Get-Content -Path c:\temp\PCS.config) | ForEach-Object {$_ -replace http://\w{12}, http://lreserver} | Set-Content -Path c:\temp\PCS.config
    docker cp c:\temp\PCS.config lre:C:\PC_Server\dat
    docker exec lre powershell iisreset
    # configuration wizard from last step is stopping, deleting, recreating and starting 'LoadRunner Backend Service', hence need to restart it here
    # docker exec lre powershell "Restart-Service 'LoadRunner Backend Service'"


    docker exec -d lre powershell c:\temp\run_configurator.bat
    Write-Host "Running Configuration Wizard, wait another five minutes before connecting to LRE !!!"
  • Pull the images. You can pull the images to the Docker node by running bring_env_up_W2019.ps1, or directly from the performance testing page in the Docker hub (see Deploy LoadRunner Enterprise as a fully containerized environment for the pull commands).

Back to top

Set up the containerized environment

  1. Install Docker on the node:

    1. Open PowerShell with elevated mode.

    2. Run the following command to install the Docker module:

      Copy code
      Install-Module-Name DockerMsftProvider -Repository PSGallery -Force
    3. Run the following command to install Docker:

      Copy code
      Install-Package-Name docker-ProviderName DockerMsftProvider
    4. Run the following command to restart your machine:

      Copy code
      Restart-Computer-Force
    5. Download “docker-compose” from Git. Refer to the product documentation for more details.

    6. Rename docker-compose-Windows-x86_64.exe to docker-compose.exe and copy it to the C:\ProgramFiles\Docker\ folder.

    7. If you are working behind a proxy, add the proxy details as follows:

      Copy code
      [Environment]::SetEnvironmentVariable("HTTPS_PROXY", "<your-proxy>"            
      [EnvironmentVariableTarget]::Machine)
    8. Run the following command to restart Docker service:

      Copy code
      Restart-Service -Name docker
  2. Verify that you can pull images from Docker hub.

    1. From PowerShell, run:

      Copy code
      docker login
    2. Type your Docker hub user name and then your password.

  3. From the unzipped folder, open PowerShell in elevated mode and run the following:

    Copy code
    .\bring_env_up_W2019.ps1

    You should see output similar to the following:

    Copy code
    PS C:\Users\kenanom\Desktop\DockerEnv2019> .\bring_env_up_W2019.ps1
    2019: Pulling from performancetesting/custom_mssql
    65014b3c3121: Already existsb5405b758079: Pull complete
    3ff63bb3ff9a: Pull complete8668147df005: Pull complete
    f95c19a4e4f3: Pull completed80a36b06e59: Pull complete
    92afe54f2e10: Pull complete1bfdb9eff817: Pull complete
    010169b2d320: Pull completeaf98f149fa7d: Pull complete
    57ab89a1cb0b: Pull completec 91905387c6: Pull complete
    86303b4b67a1: Pull complete238d10482797: Pull complete
    6a94026c0319: Pull complete

    Digest: sha256:302b44eac54c9bccecb935f0c8ca995406e4b8804a9567be10ce315910d0b172

    Status:
    Downloaded newer image for performancetesting/custom_mssql:2019
    docker.io/performancetesting/custom_mssql:2019
    Creating mssql  ... done
    Creating lgsa   ... done
    Creating lrhost ... done
    Creating lre    ... done
    Attempting stop...
    Internet services successfully stopped
    Attempting start...
    Internet services successfully restarted
    Running Configuration Wizard, wait another five minutes before connecting to LRE !!!

Back to top

Configure LoadRunner Enterprise to use a containerized environment

Wait about five minutes after setting up the environment before logging onto LoadRunner Enterprise Administration.

  1. Log onto LoadRunner Enterprise Administration.

    For details, see Log on to LoadRunner Enterprise Administration.

  2. Create a project.

    For details, see Create domains and projects.

  3. Add LoadRunner Enterprise hosts.

    Add a Controller host and standalone load generator from LoadRunner Enterprise as defined in the docker-compose.yml file. For details, see Add a host.

    In the docker-compose.yml file, "lrhost" is used for the Controller host and "lgsa" for the standalone load generator.

  4. Perform other site and lab administration tasks, and set the license keys.

    For details, see Key tasks and Manage licenses.

  5. Design and run your test.

    After you finish configuring LoadRunner Enterprise to use a containerized environment (in LoadRunner Enterprise Administration), you can design and run your performance test.

    For details, see Design a test and Run performance tests.

Back to top

Troubleshoot container issues

To troubleshoot container issues, perform the following:

  1. Run the following from an elevated PowerShell:

    Copy code
    docker exec -it <container name or id> powershell
  2. Verify that the LoadRunner Enterprise services are running. From PowerShell run:

    Copy code
    Get-Service -Name "LoadRunner*"

    You should see the following results:

    Copy code
    Status   Name               DisplayName
    ------   ----               -----------
    Running  LoadRunner Aler... LoadRunner Alerts Service
    Running  LoadRunner Back... LoadRunner Backend Service
    Running  LoadRunner Data... LoadRunner Data Collection Agent
    Running  LoadRunner Remo... LoadRunner Remote Management Agent ...
  3. In the LoadRunner Enterprise container, verify in the Configuration Wizard log that schemas were created and services were installed.

    Open an interactive session to the LoadRunner Enterprise container and run:

    Copy code
    type C:\PC_Server\orchidtmp\Configuration\configurationWizardLog_pcs.txt
  4. Check the LREcore log from the LoadRunner Enterprise container. From PowerShell run:

    Copy code
    more C:\PC_Server\orchidtmp\LTLogger\LRECore.API\log.txt
  5. Check the w3wp log from the LoadRunner Enterprise container. From PowerShell run:

    Copy code
    more  C:\PC_Server\orchidtmp\LTLogger\w3wp\log.tx
  6. Check the services are running on the host container. From PowerShell run:

    Copy code
    Get-Service -Name "LoadRunner*"

    You should see the following results:

    Copy code
    Status   Name               DisplayName------   
    ----               -----------
    Running  LoadRunner Data... LoadRunner Data Collection Agent
    Running  LoadRunner Data... LoadRunner Data Service
    Running  LoadRunner Load... LoadRunner Load Testing Service
    Running  LoadRunner Remo... LoadRunner Remote Management Agent ...
    Running  LoadRunnerAgent    LoadRunner Agent Service
  7. If you have issues adding a host, check the logs on the host. From PowerShell run:

    Copy code
    more  C:\PC_Host\orchidtmp\LTLogger\LTOPSvc\log.txt
  8. Verify that the Load Generator services are running. From PowerShell run:

    Copy code
    Get-Service -Name "LoadRunner*"

    You should see the following results:

    Copy code
    Status   Name               DisplayName
    ------   ----               -----------
    Running  LoadRunner Remo... LoadRunner Remote Management Agent ...
    Running  LoadRunnerAgent    LoadRunner Agent Service

Back to top

See also: