Help Center/ CodeArts PerfTest/ Getting Started/ Preparing Environment Resources
Updated on 2024-10-21 GMT+08:00

Preparing Environment Resources

Test Resource Groups and Their Constraints

  • Test resource groups are classified into shared resource groups and private resource groups. Shared resource groups are provided by the system by default, and private resource groups need to be created.
  • Execution nodes of the shared resource group have been bound with an elastic IP address (EIP). When the tested application has network access restrictions, use a private resource group.
  • A shared resource group supports a maximum of 1,000 concurrent users and 100 Mbit/s bandwidth. If higher concurrency or bandwidth is required, use a private resource group.
  • JMeter test tasks can use only private resource groups.

Creating a Private Resource Group

  • When creating test resources for the first time, you need to be authorized by your account. An agency is automatically created so that CodeArts PerfTest can perform operations on Cloud Container Engine (CCE).
  • To use CodeArts PerfTest, you must have the CodeArts PerfTest Administrator or CodeArts PerfTest Developer permission (you can only view the projects you created).
  • To manage private resource groups, you must have the CodeArts PerfTest Administrator permission or both CodeArts PerfTest Developer and CodeArts PerfTest Resource Administrator permissions.
  • To use private resource groups, you must have the CodeArts PerfTest Administrator permission or both CodeArts PerfTest Developer and CodeArts PerfTest Resource Developer permissions.
  • For details about the permissions required for using CodeArts PerfTest and their application scenarios, see What Are the Permissions Required for Using CodeArts PerfTest?.
  1. Log in to the CodeArts PerfTest console, choose Resource Groups in the navigation pane, and click Create Private Resource Group.
  2. (Optional) If this is the first time you create a private resource group, grant CodeArts PerfTest permissions necessary for creating private resource groups.
  3. If you do not have a CCE cluster, create a cluster and then create a resource group. If a CCE cluster is available, create a resource group.
  4. Create a cluster.

    Click Create Cluster. The page for buying CCE clusters is displayed. For details about how to create a cluster, see Buying a CCE Cluster.

    • You are advised to use an independent CCE cluster for pressure tests to avoid configuration conflicts with CCE clusters in test or production environments.

      When selecting add-ons, retain the default settings for the test executor. For example, deselect unnecessary add-ons, such as NodeLocal DNSCache and Cloud Native Cluster Monitoring, to prevent the add-ons from occupying executor resources.

    • The cluster management scale is related to the number of execution nodes. Create nodes of the corresponding specifications based on the number of concurrent users for pressure testing. For example, if 20 execution nodes are required, you can set the cluster scale to 50 nodes.
    • You are advised to select Tunnel network as the network model. Container CIDR Block and Service CIDR Block must be the same as those of the tested object.
    • CentOS is prone to IPVS- or Conntrack-related stability issues on a heavy-load network. Therefore, do not use CentOS as the OS of cluster nodes when selecting IPVS. When both IPVS and CentOS are selected, network connection reuse may time out.

    Click Next: Select Add-on. On the page displayed, select the add-ons to be installed during cluster creation.

    Click Next: Add-on Configuration. Retain the default settings.

    Click Next: Confirm configuration. After confirming that the cluster configuration is correct, select I have read and understood the preceding instructions and click Submit. It takes about 6 to 10 minutes to create a cluster.

    After the cluster is created, return to the cluster management page and click Create Node. For details about how to create a node, see Creating a Node.

    • A node must have at least four vCPUs and 8 GB memory.
    • Select EulerOS as the operating system.
    • At least two nodes (one debugging node and one execution node) are required. The number of nodes depends on the specifications of the pressure test object. For example, 21 execution nodes (one debugging node and 20 execution nodes) are required for 100,000 concurrent users and 4 vCPUs | 8 GB memory.
    • If the CCE cluster node and the application to be tested are not in the same VPC network, bind an EIP to the CCE cluster node. You can use existing EIPs. If no EIP is available, click Auto create to create one. When EIPs are automatically created, you are advised to pay by traffic and set the bandwidth to a large value to avoid affecting the pressure test. Additionally, an EIP with specified configurations is automatically assigned to each node. If the number of EIPs is less than the number of nodes, the EIPs are randomly bound to the nodes.
    • In the (Optional) Advanced Settings area, set Kubernetes Node Name to Node private IP. If you select Cloud server name, the node cannot be managed.

    Click Next: Confirm. After confirming that the node configuration is correct, select I have read and understood the preceding instructions and click Submit. After the node is created, return to the CodeArts PerfTest console.

  5. Create a resource group.

    Choose Resource Groups in the navigation pane, and click Create Private Resource Group.

    Set the parameters listed in Table 1.
    Table 1 Creating a private resource group

    Parameter

    Description

    Resource Group Name

    Name of the private resource group, for example, Web-test-demo

    Node Cluster

    Select a CCE cluster from the drop-down list.

    Debugging Node

    Node used for debugging.

    The debugging node cannot be changed after the resource group is created.

    Execution Node

    Target machine that a pressure test will be performed on and can provide performance data during testing

    Click Create.