To minimize the usage cost of cloud load agents, it is desirable to maintain them only during the test execution. It means that load agents have to be automatically created before a test starts and terminated after the test ends. 

This option is implemented using AWS Cloud Templates that store parameters of load agents created on-demand dynamically.

AWS Template Wizard

Temporary AWS agents are created via AWS cloud templates. Inside the Load Agents section, click the Create AWS Load Agent Template button to bring up the Create AWS Template wizard.



 Note: StresStimulus creates On-Demand Windows AWS instances. AWS provides these instances at a pricing structure that is described here. While StresStimulus attempts to terminate instances that are no longer needed, users are responsible for confirming the instance was terminated by AWS. StresStimulus is not liable for any AWS charges.

AWS Credentials

To create an AWS cloud template, you will need to have an active AWS account with a configured IAM user. Then enter your Access Key ID and Secret Access Key in the text boxes and click Next. For more on finding your access key id and secret access, key click here.

Region Selection

Next, select the region in which your temporary instances will be created. A list of available regions is located here. If this is the first time that region is selected, you will need to create a key pair that will be used to decrypt the Administrator passwords for all instances in this region. Click the Create New Key Pair button to create a new key pair.


VPC Settings

Next, select which virtual private cloud (VPC) and a subnet within the VPC to deploy the new temporary instance. To create a new VPC and/or subnet, follow the steps described here.

Controller on same subnet

If the controller is on the same subnet as the temporary instance, select the Private IP Address radio button to connect to it using its private IP address. Otherwise, select the Public IP address radio button.

Select the operating system

Select the AMI that will be used to create the cloud load agent. 

  • To use the default AMI, select the Use the default AMI for the selected operating system radio button and then select the operating system, either Windows or Linux.

    Windows vs Linux

    Windows will have more UI options. Linux will be more cost-effective and require fewer resources.

  • To use your own custom AMI, select the Your custom AMI radio button. Then, enter the AMI ID, the AMI username and password. The custom AMI must have StresStimulus installed and be load agent enabled.  Also, all firewalls must be opened to allow the controller to connect to the load agent.

Instance Type

Next, select the type of temporary instance that will be created. The instance type determines the instance's performance, which includes the number of CPUs, memory size, and network capacity. For a list of available instance types, click here. To filter the grid by a type, enter its name in the textbox (a).


Agent Name

Provide the name that the temporary agent will have. This name must be unique in your test.


Click Finish on the confirmation screen to add the agent template to your test.


The newly added template can be treated as a regular agent. Set the mix weight to distribute VUs as described here.

Note

After the test is over, the agent machine will be terminated, and all data stored on the agent will be lost. Do not use templates if you wish to retrieve request/response data from VUs that are executed on the agent.

Note

In the unlikely event that StresStimulus crashes, then the temporary agents will be terminated when StresStimulus is restarted.

Cloning the template

After completing the wizard, a single template will be created. The template can be cloned to create one or more additional templates of the same type and location. To clone the template, right-click > select Clone Template option > in the appeared dialog enter the number of clones to create, and click OK.

Keep load agent after the test

By default, the load agent that is created from a template before the test starts will be terminated after the test ends. However, in some situations, it may be beneficial to keep the load agent after the test is over to review some test data.

In order to keep the load agent after the test ends, set the Keep the load agent after the test? property to Yes.

On subsequent test runs, if a load agent from the template already exists, then it will be reused for the test run. 

Terminating

To terminate the template load agent you can do one of the following:

  • Open the Cloud load manager and terminate from there 
  • Set the property Keep the load agent after the test? to No, the cloud load agent will terminate at the end of the next test run




  • No labels