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 the agent. -
In the list of services, select Load Testing.
-
In the Agents tab, click Create agent.
-
Enter a name for the agent, 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. -
Under Login, enter the username.
Alert
Do not use
root
or other usernames reserved by the operating system. To perform operations requiring 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 has changed to
Ready for test
.Note
If the agent creation process has stopped at
Initializing connection
, make sure the following conditions are met:- The agent has a public IP address and access to
loadtesting.api.cloud.yandex.net:443
. - A NAT gateway is set up in the target subnet.
- The service account assigned to the agent has the required roles.
- The agent has a public IP address and 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