Running automated tests with containerized agents on IBM® Cloud Private

To adopt IBM® Cloud Private fully and manage the entire development to deployment workflow on cloud, you would want to start and stop capabilities with a few clicks. By providing the agents in containers, you can dynamically provision capability as required without procuring the machines and installing the agents.

Before you begin

You must have configured IBM® Cloud Private as per the instructions in Configuring IBM Cloud Private.

About this task

You must use only floating licenses to play back the tests.

To automate deployment and playback of the tests, you can choose to create bash scripts for the Kubernetes commands and integrate with Jenkins.
Note: The version number of the container images and the desktop products must match. If you have previous version of the container image, uninstall it and install the current version. To uninstall the image, use these commands:
  1. Stop the container by running
    docker stop "CONTAINER  ID"
    .
  2. Uninstall the image by running
    docker rmi -f "image ID"
    .

Procedure

  1. Log in to the IBM® Cloud Private management console and complete the following steps:
    1. From the navigation menu, click Workloads > Deployments > Create Deployment
    2. On the Generals tab, enter a name for your deployment.
    3. On the Container tab, enter the name of the agent container and the image to use for the container. Provide the image name in the following format:
      cluster_CA_domain:8500/namespace/imagename
    4. In the Enviornment Variable tab, for Name, enter MASTER_NAME and for Value enter the IP address of the workbench computer workbenchIP
    5. Click Create.
    6. Create a deployment for the second agent image. Use another name for the agent image. You can use the same image tag and the environment variables.
  2. Verify that you have two deployments of the agent by clicking Workloads > Deployments.
  3. On your workbench, use the Agent Status button to verify the two container agents are polling the workbench.
    Note: The agent host names should match the IDs of the containers running in IBM® Cloud Private. Make a note of the IP address of each agent because they will be used when creating the agent locations.
  4. Create a new location asset for each container agent and associate it with a user group. For more information, see Running a user group at a remote location.
  5. Run the schedule and verify the test results in the workbench.
    Note: The deployment step could result in the schedule launch remaining in the Launching state for several minutes.

What to do next

To stop the agents, in the management console, click Workloads > Deployments and under Action select Remove to remove each agent deployment.