Manually configure dockerized hosts
This section describes how to manually set up load generator and Controllers hosts using Docker, and how to assign them to a performance test.
Note:
-
The Windows dockerized load generator image is provided as a tech preview version, for Web - HTTP/HTML and Java protocols.
-
Support for elastic Controllers is provided as a tech preview feature (available in 12.62 and later).
-
Dockerized load generators and Controllers are not supported when running over a firewall.
Alternatively, you can use elastic host provisioning to dynamically assign dockerized hosts to a performance test. For details, see Manage elastic hosts.
About dockerized hosts
Docker is a platform that allows you to develop, ship, and run applications via a container. Docker uses a standard container format that lets developers prepare applications inside containers, while system administrators and other teams, such as Quality Assurance engineers, run the container in order to deploy the application.
You can run your hosts inside Docker containers, using Linux or Windows dockerized load generator images, or Windows Controller images, which are available in the Docker repository. For details, see Dockerized images.
For general details regarding Docker, see https://docs.docker.com.
Benefit of dockerized hosts
Using dockerized hosts:
-
Enables you to automate the testing process by provisioning and de-provisioning hosts on demand, and seamlessly add them to performance tests using the REST API.
-
Saves having to rely on (and manage) hosts defined in the lab, and the need to reserve hosts in advance.
Deploy hosts using Docker
For details on how to deploy and run dockerized hosts, see the Performance Center Installation Guide.
Add dockerized hosts to your tests
After installing dockerized hosts, select the method for assigning them to performance tests:
Method | Description |
---|---|
REST API | You can assign dockerized load generators and Controllers to tests from the Performance Center REST API. For details, see Add dockerized hosts to tests from the REST API. |
User Interface | You can assign dockerized load generators and Controllers to tests from the Performance Center user interface. For details, see Manually configure and assign dockerized hosts to tests. |
Add dockerized hosts to tests from the REST API
-
Prerequisites
Set up the Docker installation as described in the Performance Center Installation Guide.
-
Add dockerized load generators and Controllers to the Performance Center Hosts list.
-
Authenticate the user to the Performance Center Administration REST API by sending an HTTP GET request to the following URL:
http://<Performance Center server>/Admin/rest/authentication-point/authenticate
Example:
GET /Admin/rest/authentication-point/authenticate
For API details, see Authenticate in the Performance Center Administration REST API Guide.
-
Add a load generator and Controller host to each Docker container using the Get Hosts API, and configure the settings as follows:
Host Type Settings Load Generator -
For host name, enter the physical name of the load generator host followed by
_dkr_<lgInitialPort>
, where<lgInitialPort>
is the initial port that is mapped to the Docker container (see the Performance Center Installation Guide).Example:
myHost_dkr_10110
-
Add the container as a
Unix
orwindows
installation, withLoadGenerator
purpose.Request example:
Controller -
For host name, enter the physical name of the load generator host followed by
_dkr_<port_number1>_<port_number2>
where<port_number1>
is the port that is mapped to the Docker container for the performance testing service (see the Performance Center Installation Guide), and<port_number2>
is the port that is mapped to the Influx server.Example:
myHost_dkr_10110_3456
-
Add the container as a
windows
installation, withController
purpose.
For API details, see Add Host in the Performance Center Administration REST API Guide.
The dockerized hosts are added to the Hosts list.
-
-
-
-
Prerequisites
Make sure you have created a performance test, and configured it to use non-specific (automatch) load generators. You can also use specific load generators, but then you need to update your test to use those load generators (this can be done using tests/{ID} in the Performance Center REST API Guide).
You can create a test either from the Performance Center Administration REST API (see tests in the Performance Center REST API Guide), or manually from the Performance Center user interface (see Design a performance test).
-
Run the performance test from the Performance Center REST API (see Start a Test Run in the Performance Center REST API Guide).
-
-
When the performance test has finished running, collate (and analyze) performance test data using the REST API. For API details, see collate and analyze in the Performance Center REST API Guide.
-
Remove the hosts from the test - optional
Note: Make sure you collate the results for any load generators you intend to remove from the test before you delete them.
-
Remove the hosts from the test using the hosts/{hostID} API. For API details, see hosts/{hostID} in the Performance Center Administration REST API Guide.
-
Delete all Docker containers by running the following command:
"docker rm -f $(docker ps -a -q)";
-
Manually configure and assign dockerized hosts to tests
-
Prerequisite
Set up the Docker installation as described in the Performance Center Installation Guide.
-
In Performance Center Administration, select Maintenance > Hosts.
-
Select the Hosts tab, and then click Create New Host .
-
Configure the host settings as follows:
Host Type Settings Load Generator -
Host Name. Enter the physical name of the host followed by
_dkr_<port_number>
, where<port_number>
is the port that is mapped to the Docker container (see the Performance Center Installation Guide).Example:
myHost_dkr_10110
-
Purpose. Select
Load Generator
only. -
Installation. Select the installation type:
Unix Load Generator
,Windows Host
, orWindows Standalone LG
.
Controller -
Host Name. Enter the physical name of the host followed by
_dkr_<port_number1>_<port_number2>
, where<port_number1>
is the port that is mapped to the Docker container for the performance testing service (see the Performance Center Installation Guide), and<port_number2>
is the port that is mapped to the Influx server.Example:
myHost_dkr_10110_3456
-
Purpose. Select
Controller
only. -
Installation. By default,
Windows Host
is selected; this is the only available option.
-
-
Click Save to add the host to the Hosts grid.
-
In the Performance Center user interface, assign the load generator or Controller to a test. For details, see Distribute load generators among Vuser groups in a test and Assign elastic hosts to a test.
Notes and Limitations
This section contains notes and limitations for dockerized hosts.
-
If Security-Enhanced Linux (SELinux) is enabled on your Linux operating system, it can prevent Docker containers from loading the required load generator libraries.
Workaround: Contact your IT department to configure SELinux so that it will still be effective while letting the load generators load the required libraries for them to operate.
-
Any errors encountered by dockerized hosts are written to the Event log under the docker node host name and port.
See also: