Provision Docker hosts automatically

This section describes how to set up and manage elastic Dockerized load generator hosts, enabling users to dynamically assign them to performance tests. Setting up Dockerized hosts requires information from your Docker provider.

About using Dockerized hosts

You can run 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. Refer to the product documentation for more details.

Before you can use elastic Dockerized 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 user interface or the OpenText Enterprise Performance Engineering REST API.

Supported orchestrators and environments

Orchestrator Supported Images Supported API Version

Kubernetes

Linux

For the supported orchestrator versions, see the Integration with non-OpenText products section of theSupport Matrix.

OpenText Enterprise Performance Engineering currently supports Kubernetes orchestrators with Dockerized images.

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 load generators, and seamlessly adding them to performance tests.

You manage your orchestrators and host images from the Orchestration page. For details, see Set up Dockerized hosts 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 load generator images that are used for elastic provisioning from the Docker Images tab.

  1. Pull the Docker image from the Docker hub

    1. Go to the OpenText Enterprise Performance Engineering Dockers repository: https://hub.docker.com/u/performancetesting.

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

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

      You can modify Kubernetes configuration settings. For details, see Kubernetes configuration settings.

      For full instructions, see the Docker section in the OpenText Enterprise Performance Engineering Installation Guide (available from Install).

  2. In 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 Add button, and configure the following.

    Property Description
    Name

    Enter the name of the image you pulled in the previous step.

    Purpose

    The purpose is set to Load Generator.

    Type

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

    Tag

    Enter the appropriate tag version number for the image in the format xx.xx (for example, 25.1), 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

Prerequisites

The following are key requirements for setting up an orchestrator which you need to obtain from your IT team (from your Docker provider).

  • Full orchestrator URL

  • Namespace

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

  • CA certificate - When using client certificate authentication, you need to copy the Kubernetes client certificate to your OpenText Enterprise Performance Engineering server. For details, see Obtain the Kubernetes client certificate below.

Extract the Kubernetes token

  1. Run the following command:

    Kubectl describe sa <YOUR_SERVICEACCOUNT_NAME> -n <YOUR_NAMESPACE>

    Example of the results:

    root@k8sMaster:~# kubectl describe sa lreuser -n lre

    Name: lreuser

    Namespace: lre

    Labels: <none>

    Annotations: <none>

    Image pull secrets: <none>

    Mountable secrets: lreuser-token-kcxfb

    Tokens: lreuser-token-kcxfb
  2. Copy the user token name from the results of the previous command.

  3. Run the following command:

    Kubectl describe secret <COPIED_TOKEN_NAME> -n <YOUR_NAMESPACE>

    Example of the results:

    root@k8sMaster:~# kubectl describe secret lreuser-token-kcxfb -n lre

    Name: lreuser-token-kcxfb

    Namespace: lre

    Labels: <none>

    Annotations: kubernetes.io/service-account.name=lreuser

    kubernetes.io/service-account.uid=993e83f1-a9d7-11e8-84be-005056aa5d8f

    Type: kubernetes.io/service-account-token

    Data

    ====

    ca.crt: 1025 bytes

    namespace: 2 bytes

    token: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2Vhx4A
  4. Copy the token from the results of the previous command and paste it into the Token box when configuring the orchestrator, For details, see Add and configure the orchestrator..

    Note: Make sure that you do not copy spaces at the beginning or end of the token.

Obtain the Kubernetes client certificate

  1. Copy the CA certificate from Kubernetes (/etc/kubernetes/pki/ca.crt) to your OpenText Enterprise Performance Engineering server using a secure file transfer utility such as WinSCP.

  2. Import the root and intermediate CA certificates to the OpenText Enterprise Performance Engineering server.

    1. Open Microsoft Management Console (MMC) on the OpenText Enterprise Performance Engineering server by running the command "mmc".

    2. Add the Certificates snap-in for the Computer account and manage certificates for the Local computer.

    3. To import the root CA certificate, right-click the Trusted Root Certification Authorities folder, select All Tasks > Import, and browse for the root certificate on your machine.

    4. To import the intermediate CA certificate, right-click the Intermediate Certification Authorities folder, select All Tasks > Import, and browse for the intermediate certificate on your machine.

Back to top

Set up Dockerized hosts

This task describes how to configure elastic Dockerized load generator hosts on Windows or Linux containers.

  1. Add and configure the orchestrator.

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

    2. Enter the following orchestrator details. All entries must be in lower case.

      UI Element Description
      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>.

      You can enter an IPv4 address host name or the fully qualified domain name of the server.

      Default settings: The default connection type is https.

      Namespace

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

      Example: lre

      Token

      Enter the orchestrator bearer token to authenticate API requests.

      Note:

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

      • When migrating a project from Performance Center, the orchestrator bearer token is not retrieved (it is displayed as a combination of asterisks) and needs to be entered manually.

      Description Enter a description of the orchestrator.
    3. Configure the following orchestrator settings, as required.

      UI Element Description

      Use Repository

      To enable using a private and secure registry for your Kubernetes images: 

      1. In the Main Details tab, select Use Registry.
      2. In the Secret Name box, enter a secret value that is used to pull images from the private images registry.

      Pod Resources Limits (Optional)

      In the Main Details tab, specify how much of the available resources a pod (container) can use for load generators during a test run.

      • Memory (GB). Available memory resources (in gigabytes) a pod can use.

      • CPUs: The number of CPU resources that a pod can use.

      For additional information about these settings, see Guidelines for setting limits.

      Global Limits (Optional)

      The Global Limits refer to the total number of items that can run per orchestrator in all assigned projects. Go to the Main Details section to specify the following values:

      • Max Pods: The total running pods per orchestrator in all assigned projects. The value must be 1 or higher.

      • Max Memory (GB): The total available memory for pods per orchestrator in all assigned projects.

      • Max CPUs: The total available CPUs for pods per orchestrator in all assigned projects.

  2. Assign host images to the orchestrator.

    1. Select the Assign Images tab and click the Assign Images button .

    2. In the Assign Images to the Orchestrator dialog box, select the load generator (LG) images to assign to the orchestrator and click Assign. The images are added to the Assign Images list.

      To unassign images from an orchestrator, select the images to unassign in the Assign Images grid, and click Unassign.

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

  3. Assign projects to the orchestrator.

    1. Select the Assign Projects tab and click the Assign Projects button .

    2. In the Assign Projects to Docker Orchestration dialog box, select the projects to assign to the orchestrator and click Assign. Projects linked to the orchestrator are listed in the grid.

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

      To unassign projects from an orchestrator, select the projects to unassign in the Assign Projects grid, and click Unassign.

  4. Click Save to save the settings. The orchestrator is added to the Orchestrators grid.

  5. Assign each project to a specific orchestrator, and then set the limits for each orchestrator.

Guidelines for setting limits

  • The Pods Resources Limit values cannot exceed the Global Limits.

  • When you set Global Limits, the Pods Resources Limit settings are mandatory, but if you set the Pods Resources Limit, the Global Limits are only optional.

  • OpenText Enterprise Performance Engineering does not communicate with the Kubernetes cluster checking mechanism, that checks its actual available resources. If you set more resources than available to your cluster, your pods may be terminated or not provisioned. Therefore we highly recommend that you set the Global Limits according to your needs.

  • If you created a load test without specifying the Pod Resources Limits, these fields will automatically be assigned their maximum values.

Tip: To set Global Limits per project , you can create multiple orchestrators with the same URL, namespace, and token. Each orchestrator must have a unique name.

Back to top

Configure a test with Dockerized load generators

After configuring the orchestrator and adding the host image, you can configure the performance test from the 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), three groups are displayed for each Docker container when the test runs.

Configure a test from the user interface

  1. Select a test

     In the banner, click the module name or the arrow and select Test Management > Tests & Scripts. Select a performance test in the test management tree, and click Edit Test.

  2. Assign Elastic Docker load generators to the groups for the test

    Follow the steps in Distribute load generators among Vuser groups.

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

Configure a test using the REST API

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

    Add elastic load generator hosts named DOCKER1, DOCKER2, DOCKER<n+1> to the <Host> XML field, equivalent to the number of Docker hosts that you want to provision.

    Copy code

    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 OpenText Enterprise Performance EngineeringAdministration REST API Guide.

  2. Continue from Run the performance test in Deploy hosts using Docker.

Back to top

Customize timeout settings for Dockerized load generators

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

  1. Navigate to <Server_installdir>\dat\ and open the pcs.config file.

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

Back to top

Export Orchestrator or image details

To export information displayed in the Orchestrator or Docker Images grid to an Excel file, click the Export to Excel button Export to Excel button.

Data from the grid is saved to an Excel file and downloaded to the Downloads folder of the client user.

Back to top

Retain run results after a test ends

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

If you run a test without collating results, or if collation fails, the result data is lost, because elastic load generators are freed immediately after the run finishes

Back to top

Notes and limitations

For notes and limitations on elastic Dockerized hosts, see Notes and limitations.

Back to top

See also: