Manage elastic hosts

This section describes how to set up and manage elastic Controller and load generator hosts, enabling users to dynamically assign them to performance tests. Setting up elastic hosts requires information that should be provided by your Docker provider.

Note: Elastic Controller hosts are available with Performance Center 12.62 and later, and are provided as a tech preview feature.

About using elastic hosts

You can run Controller and load generator hosts inside Docker containers. This is a quick and effective way to port applications across systems and machines, and run them within their own secure environments.

Before you can use elastic hosts, you need to configure the orchestrators and host images which are used for dynamic provisioning. Orchestrators are responsible for automating deployment and management of hosts running inside containers.

After the host image has been configured, the image can then be assigned to tests in the project from the Performance Center user interface or the Performance Center REST API.

Supported orchestrators and environments

Orchestrator Supported Images Supported API Version
Docker Swarm Windows, Linux

For the supported orchestrator versions, see the Integration with non-Micro Focus products section of the System Requirements.

Kubernetes Linux

Performance Center currently supports Kubernetes and Swarm orchestrators with dockerized images. For more details, see the Kubernetes or Docker Swarm documentation.

Note: Support for Swarm orchestrators is provided as a tech preview feature.

Advantages of elastic provisioning

Benefits of using elastic hosts include:

  • Efficient allocation of resources on demand in response to dynamic workloads, without having to rely on load generators defined in the lab, or to reserve load generators in advance.

  • Automates the testing process by provisioning and de-provisioning Controllers and load generators, and seamlessly adds them to performance tests.

  • Ability to run many tests simultaneously on the same dockerized Controller host.

You manage your orchestrators and host images from the Orchestration page. For details, see Set up elastic hosts on Windows or Linux containers and Deploy and manage Docker host images.

Note: For users to be able to assign elastic hosts to a test, the project must be linked to an orchestrator.

Back to top

Deploy and manage Docker host images

You can create and manage Controller and load generator images that are used for elastic provisioning from the Docker Images tab.

  1. Pull the Docker image from the Docker hub

    1. Navigate to the Performance Center Dockers repository: https://hub.docker.com/u/performancetesting.

    2. Locate your desired load generator or Controller Docker Image, and copy the pull command to your clipboard. For image details, see Dockerized images.

      Note: Elastic Controllers are supported on Windows only, and are provided as a tech preview feature.

    3. On your Kubernetes or Swarm node, paste the pull command from the previous step, and add the desired tag for a specific image version, or leave the tag empty for the latest version.

      For full instructions, see the Docker section in Performance Center Installation Guide.

  2. In Performance Center Administration, select Configuration > Orchestration and click the Docker Images tab. The Docker Images page opens.

  3. To add a new image, click the Add Docker Image button, and configure the following:

    Image Name Enter the name of the image you pulled in the previous step.
    Purpose

    Select a purpose for the image: Load Generator or Controller.

    Note: When upgrading an earlier version of Performance Center which contains existing images, the purpose is automatically populated to Load Generator.

    Image type

    Select an image type according to the image you pulled: Windows or UNIX.

    Note: If a Controller image is selected, the Image type field is automatically populated to Windows, and is read-only.

    Image Tag

    Enter the appropriate tag version number for the image in the format xx.xx (for example 12.63) ,or leave empty to use the latest version.

    Description (Optional) Enter a description for the image.
  4. Click Save. The image is added to the Docker Images grid.

Back to top

Set up elastic hosts on Windows or Linux containers

Note: Elastic Controllers are supported on Windows only, and are provided as a tech preview feature.

  1. Prerequisites

    • Pull the Docker image from the Docker hub as described in Deploy and manage Docker host images above.

    • The following are key requirements for setting up an orchestrator which you should obtain from your IT team (from your Docker provider):

      Kubernetes
      • Full orchestrator URL

      • Namespace

      • External storage path (if used)

      • Authentication token (for details on obtaining the token, see Extract the Kubernetes token below)

      • Heapster server URL (if you want to monitor the provisioned containers)

      • CA certificate - When using client certificate authentication, you need to copy the Kubernetes client certificate to your Performance Center server. For details, see Obtain the Kubernetes client certificate below.
      Swarm
      • Full orchestrator URL

      • External storage path (if used)

      • Authentication token

  2. Configure the orchestrator

    1. In Performance Center Administration, select Configuration > Orchestration. In the Orchestrators tab, click  Add Orchestrator.

    2. Enter the following orchestrator details (all entries for Kubernetes must be in lower case):

      Type Select the orchestrator type (Kubernetes or Swarm).
      Orchestrator Name Enter a name for the orchestrator.
      Full URL

      Select the connection type (http/https), and enter the full URL, including port, in the format:
      http(s)://<server>:<port>.

      The default connection type is https for Kubernetes, and http for Swarm.

      The default port for Kubernetes is 6443.

      Namespace

      (Kubernetes only)

      Enter the name for the namespace. This is a private space where your containers will be created.

      Example: pc

      Token

      (Kubernetes only)

      Enter the orchestrator bearer token to authenticate API requests.

      Note: After saving the orchestrator settings, the token is hidden (turns into asterisks).

      API Version

      (Swarm only)

      Enter the Swarm API version.

      Note: For every Docker Swarm upgrade you need to update the API version.

      Description Enter a description of the orchestrator.
  3. Set resource limits - Optional

    In the Resource Limits section, specify how much of the available resources a container can use for load generators and a Controller during a performance test run.

    Memory (GB)

    Available memory resources (in gigabytes) a container can use.

    CPUs

    Available CPU resources a container can use.

    Note: When a user configures elastic host properties, they cannot enter values that exceed these limits. If the administrator reduces the project limits below the value configured by a user in the Assign Load Generators to Groups dialog box, the user's settings are automatically adjusted to be within the new limits.

  4. Collect orchestrator monitoring metrics (for load generators only) - Optional

    You can collect metrics on Kubernetes container clusters using Heapster.

    1. Select Use Monitoring to enable collecting monitoring metrics on the orchestrators.

    2. Enter the URL of the monitoring server:

      Heapster Server

      Enter the full URL of the Heapster server, including port, in the format: <server_name>:<port>.

      Note: Available for Kubernetes only.

      Prometheus

      Enter the full URL of the Prometheus server, including port, in the format: <server_name>:<port>.

      Enter a user name and password for the Prometheus server.

      Note: Available for Swarm master on Linux only.

  5. Use external storage (for load generators only) - Optional

    We recommend using this option to prevent loss of, or inaccessibility to results, if result collation fails (it enables you to access the files even though the container has been removed).

    1. Select LG External Storage to store the performance test run files on an external machine. For more details, see Retain run results after a performance test ends.

    2. In the Path field, enter the following:

      Kubernetes Enter the path of the environment for storing all the run files.
      Docker Swarm
      • For load generators running on Linux containers, test data is saved to the default volume location: /var/lib/docker/volumes/<DOMAIN_NAME-PROJECT_NAME-QC_RUN_ID>/_data

      • For load generators running on Windows containers: C:\ProgramData\docker\volumes\<DOMAIN-PROJECT-ID>\_data

  6. Assign host images to the orchestrator

    1. Click Assign Images to Orchestrator to open the Assign Images to the Orchestrator dialog box.

    2. Select the Controller and load generator (LG) images to assign to the orchestrator.

    3. Click Assign. The images are added to the Assign Images list.

    If no image is assigned, Performance Center uses the default performancetesting/load_generator_linux/ image from the Docker hub.

    For details on creating host images, see Deploy and manage Docker host images.

  7. Assign projects to the orchestrator

    1. In the Assign Projects to Docker Orchestration area, click the Assign button.

    2. In the Assign Projects to Docker Orchestration dialog box, select the projects you want to assign to the orchestrator, and click Assign. The selected projects are displayed in the Linked Projects grid.

      Note: You can assign multiple projects to an orchestrator, but only one orchestrator to a project.

    3. You can view project details, and add or remove linked projects using the Linked Projects grid.

      Field Description
      Assign Projects. Assigns the selected projects to the orchestrator.
      Remove Assigned Project. Removes the selected project from the orchestrator.
      Refresh. Refreshes the grid so that it displays the most up-to-date information.
      ID The project's ID.
      Project Name The name of the project.
      Domain The domain in which the project was created.
  8. Click Save to save the settings. The orchestrator is added to the Orchestrators grid.

Back to top

Configure a performance test with elastic hosts

After configuring the orchestrator and adding the host image, you can configure the performance test from the Performance Center user interface or the REST API.

Note: When you assign elastic load generators, each load generator is consider as a group. Therefore, if you define a test with three elastic load generators under one Vuser group (script), you will see three groups for each Docker container when the test runs.

Configure a test from the user interface

  1. Select a test

    From the Performance Center navigation toolbar, click and select Test Management (under Testing). Select a performance test in the test management tree, and click Edit Test.

  2. Assign elastic hosts to the groups for the test

For more details, see Assign elastic hosts to a test.

Configure a test using the REST API

  1. Create or update load tests with elastic hosts, by selecting dynamic type hosts for your groups.

    Add elastic load generator hosts named DOCKER1, DOCKER2 and so forth to the <Host> XML field.

    Example: 
    
    <Hosts>
    <Host>
    <Name>DOCKER1</Name>
    <Type>dynamic</Type> </Host>
    <Host>
    <Name>DOCKER2</Name>
    <Type>dynamic</Type>
    </Host>
    </Hosts>

    For API details, see test entity XML in the Performance Center Administration REST API Guide.

  2. Continue from the Run the performance test step in Add dockerized hosts to tests from the REST API.

Back to top

Customize timeout settings for elastic load generators

When provisioning elastic load generators, you can customize the timeout settings.

  1. On the Performance Center server, open the pcs.config file located in <PC server installation directory>\dat\.

  2. Enter a new timeout value in ElasticProvisionTimeoutInSeconds. The default timeout value is 300 seconds (5 minutes).

Back to top

Retain run results after a performance test ends

To ensure that run results are retained after a performance test ends, you should select Collate results as the Post-Run Action. For details, see View or modify the project settings.

If you run a test without collating results, or if collation fails, and:

External storage is not used The result data will be lost, since elastic load generators are freed immediately after the run finishes.
External storage is used

You need to collate the results manually.

  1. On each node running the dockerized load generator, navigate to the \Results folders for the run.

    • For load generators running on Linux containers, test data is saved to the default volume location:

      /var/lib/docker/volumes/<DOMAIN_NAME-PROJECT_NAME-QC_RUN_ID>/_data/<random_data_folder>/netdir/ress

    • For load generators running on Windows containers:

      C:\ProgramData\docker\volumes\<DOMAIN-PROJECT-ID>\_data\<random_data_folder>\netdir\res

    Note: The run data is saved on the specific Swarm node where the container is created, so for each test run, the data might be spread between different Swarm nodes (in case load generators run on different nodes).

  2. Copy *.eve and *.map files to the \Results folder for the Controller run.

    For example, on a Linux machine running the dockerized load generators:

    vm09348_dkr_32775_1.eve

    vm09348_dkr_32775_1.map

    The default path for the run’s results folder on the Controller:

    \<LR Installation folder>\LoadRunner\orchidtmp\Results\<RunFolder>\Run_RunID\res<RunID>.

    Example:

    C:\Program Files (x86)\Micro Focus\LoadRunner\orchidtmp\Results\My_Test_Run_Results\Run_260\res260

  3. Collate the results.

    • For a test where no collation has been performed yet, right-click the run, and select Collate results (collate fails since Provision LGs does not exist).
    • For a test that failed to collate, right-click the run, and select Recover results to recover and collate the results of the failed test run.

    For more details, see Manage results.

  4. Select Analyze results to generate reports.

    Note: Dockerized load generators with Network Virtualization are not supported, and therefore no NV Insights report is generated.

Back to top

Notes and limitations

The following notes and limitations apply to elastic hosts:

Host Purpose Notes and limitations
Load Generator / Controller
  • Network Virtualization is not supported when using elastic hosts.

  • Running over a firewall is not supported.

  • Elastic hosts using an SSL configuration are not supported.

  • Do not use the [Test]ElasticCont{ID} host in a test.

Load Generator only
Controller only
  • It is recommended to use a dedicated pool and dedicated project while using elastic Controllers.

  • You cannot use elastic Controllers with predefined timeslots.

  • Offline results are not available when using elastic Controllers.

  • Monitors are not currently supported with an elastic Controller using Docker Swarm orchestrators on Windows.

  • External storage is currently not supported.

  • Elastic Controllers ([Test]ElasticCont{ID}) might not be removed from the Controllers list after a test run.

Back to top

See also: