Creating a test agent
Preparing an infrastructure
-
Create a service account for test agent:
- Create a service account named
sa-loadtest
in the folder to host the agent that will generate the load. - Assign the following roles to the service account:
loadtesting.generatorClient
: Allows running the agent, performing tests on the agent, and uploading the results to storage.compute.admin
: Allows managing VMs in Compute Cloud.vpc.user
: Allows connecting to Virtual Private Cloud network resources and using them.
- Create a service account named
-
Set up the test agent's security group.
Creating a test agent
-
If you do not have an SSH key pair yet, create one.
-
Create an agent.
Management console-
In the management console
, select the folder where you want to create your agent. -
In the list of services, select Load Testing.
-
In the Agents tab, click Create agent.
-
Give your agent a name, e.g.,
agent-008
. -
Specify the same availability zone where the test target is located.
-
Under Agent:
- Select the appropriate agent type. For more information, see Agent performance.
- Specify the subnet where the test target is located. Make sure you created and set up a NAT gateway in the subnet.
- If security groups are available to you, select a security group preset for the agent.
-
Under Access, specify the information required to access the agent:
-
Select the
sa-loadtest
service account. -
Enter the username in the Login field.
Alert
Do not use the
root
username or other names reserved by the operating system. To perform operations that require superuser permissions, use thesudo
command. -
In the SSH key field, paste the contents of the public key file.
-
-
Click Create.
-
Wait for the VM instance to create. Make sure the agent status changes to
Ready for test
.Note
The agent creation process may stop at the
Initializing connection
status unless the following conditions are met:- The agent has access to
loadtesting.api.cloud.yandex.net:443
and is assigned a public IP address. - A NAT gateway is set up in the target subnet.
- The service account assigned to the agent has the required roles.
- The agent has access to
-
-
Assign a public IP to the agent to enable access over SSH:
Management console- In the management console
, select the folder where the agent is located. - Select Compute Cloud.
- Select the VM named
agent-008
. - Under Network interface, in the top-right corner, click
and select Add public IP address. - In the window that opens:
- In the Public address field, select obtaining a Auto address.
- Click Add.
- In the management console