Updated on 2024-12-05 GMT+08:00

Swift Chaos Drills

Scenarios

COC is a secure and efficient O&M platform, offering one-stop, AI-powered solutions for all your centralized O&M needs. You can configure drill templates and attack templates to perform fault drills on physical machines, VMs, or CCE containers in the chaos drill function module. You can also manage failure modes. You can select a target instance to execute fault drills.

This section describes how to use COC to perform a fault drill on an ECS to increase the CPU usage.

Operation Process

Procedure

Description

Prepare for this task.

Register a HUAWEI ID, complete real-name authentication, and enable COC.

Step 1: Synchronize resources.

This task obtains resources in all regions to which the current user belongs and synchronize the resources to COC.

Step 2: Create an Application.

An application enables you to manage the relationship between applications and cloud resources, and provides unified and timely resource environment management services for follow-up resource monitoring and automatic O&M.

Step 3: Create a drill task.

Drill tasks preset drill solutions for resources and enable flexible orchestration of multiple attack tasks for fault injection.

Step 4: Start the drill.

Automatic fault injection will start based on the created drill task once you start a drill task.

Preparations

  1. Sign up with Huawei Cloud and complete real-name authentication.

    Before using COC, Sign up for a HUAWEI ID, enable Huawei Cloud services, and then complete real-name authentication.

    If you already have enabled Huawei Cloud services and completed real-name authentication, skip this step.

  2. Enable COC.

    Upon your first login, enable COC first.

    If you have enabled COC, skip this step.

Step 1: Synchronize resources.

  1. Log in to COC.
  2. Click in the upper left corner on the Overview page and select a region.
  3. In the navigation pane, choose Resources > Application and Resource Management.
  4. Click to synchronize resources.
    Figure 1 Synchronizing resources

Step 2: Creating an Application

  1. In the navigation pane, choose Resources > Application and Resource Management.
  2. Click the Applications tab.
  3. Click Create Application.
  4. Configure the application structure type.
    Figure 2 Parameters for configuring the application structure type
    Table 1 Parameters for configuring the application structure type

    Parameter

    Example Value

    Description

    Application Structure Type

    Lightweight application

    Select a value based on the complexity of the application structure.

  5. Set Application Structure Configuration.
    Figure 3 Parameters in the Application Structure Configuration area
    Table 2 Parameters in the Application Structure Configuration area

    Parameter

    Example Value

    Description

    Application

    test-application

    Customize an application name based on the naming rule. Click Save.

    Component

    test-component

    Customize the component name based on the naming rule. Click Save.

    Group

    test-group

    Customize a group name based on the naming rule.

    Vendor

    Huawei Cloud

    Select the cloud vendor to which the target instance belongs.

    Region

    CN North-Ulanqab203

    Select the region in which the target instance is located.

    Resource Association Method

    Manual association

    Select a resource association mode.

    Associate with Resource

    -

    Select the target instance to execute the chaos drill. Click Save.

  6. Click Create.

Step 3: Creating a Drill Task.

  1. In the navigation pane on the left, choose Resilience Center > Chaos Drills.
  2. Click the Drill Tasks tab.
  3. Click Create Task.
  4. Configure basic information.
    Figure 4 Parameters for configuring the basic information
    Table 3 Basic information parameters

    Parameter

    Example Value

    Description

    Drill Task

    test-drill

    Customize the drill task name based on the naming rules.

    Expected Recovery Duration (Minutes)

    3

    Expected time from fault occurrence to fault recovery

  5. Click Add Attack Task 5 more attack tasks can be created. The Create Attack Task drawer is displayed. You can create 5 more attack tasks.
  6. Configure required parameters on the Create Attack Task page and click Next.
    Figure 5 Parameters for creating an attack task
    Table 4 Parameters for adding an attack task

    Parameter

    Example Value

    Description

    Source of Attack Target

    Elastic Cloud Server (ECS)

    Select the source of the target instance.

    Attack Task

    test-attacktask

    Customize the name of the attack task based on the naming rule.

    Attack Target

    -

    Select a target instance.

  7. Set parameters in the Select Attack Scenarios step and click Next.
    Figure 6 Parameters for selecting an attack scenario
    Table 5 Parameters for selecting an attack scenario

    Parameter

    Example Value

    Description

    Attack Type

    Host Resource

    Attack scenarios are classified based on attack scenario types.

    Attack Scenario

    Increased CPU Usage

    Customize the name of the attack task based on the naming rule.

    Attack Parameters

    CPU Usage (%): 80

    Fault Duration (s): 60

    Configure attack parameters based on attack scenarios.

  8. Click Finish.
  9. Click OK.

Step 4: Start the drill.

  1. In the navigation pane on the left, choose Resilience Center > Chaos Drills.
  2. Click the Drill Tasks tab.
  3. Locate the drill task created in Step 3 and click Start Drill in the Operation column.
    Figure 7 Starting a drill task
  4. Click OK.
  5. Check the attack progress and details. After the drill is complete, click Create Drill Report to create a drill report.
    Figure 8 Drill record details page