Creating a Drill Task Using a Template
Scenarios
You can use a drill template to create a drill task in a specific scenario.
Creating a Drill Task Using a Template
- Log in to COC.
- In the navigation pane, choose Resilience Center > Drill Templates.
- Create a drill task in either of the following ways:
- Select the required template based on Drill Template Description and click Create Task on the template card.
- Select the required template based on Drill Template Description, click the template card to go to the Template Details page, and click Create Task in the upper right corner.
- Configure the basic information.
Table 1 Basic information parameters Parameter
Description
Example Value
Drill Task
Name of the drill task. Set it according to the naming rules.
Test-Drill
Expected Recovery Duration (Minutes)
Expected time from the fault occurrence to the fault recovery, in minutes.
Expected time for an application to automatically recover to the normal state during contingency plan execution after a fault is injected. This time does not affect the drill task.
3
- In the task group that contains scenario and parameters, locate the scenario and add an attack target for the task.
- Click Select under Attack Target.
- Cloud Service Provider and Source of Attack Target are selected based on the preset value of the scenario.
- In the Attack Target table, the instances that do not support the current weapon are dimmed. After you select an existing task, change the cloud server provider, or change the source of the attack target, the preset weapon information will be cleared. For details, see Creating a Drill Task Using a Template.
- After you select an attack target and click Next, the corresponding weapon is selected based on the target scenario. The preset value of the attack parameter is the data in the template.
- (Optional) Set Configure Monitoring Tasks.
Table 2 Parameters for configuring a monitoring task Parameter
Description
Steady-State Metrics
Select the target resource, performance metric, lower limit, and upper limit from the drop-down lists one by one.
If a service can perform well and stably when a performance monitoring metric is set to a certain value range, this metric is called steady-state metric. If this metric value is not in that value range before a drill, the drill will be canceled. If the value of the steady-state metric is not within the stable value range during a drill, the corresponding fault injection automatically stops after automatic rollback is enabled.
Metric
Select the target resource, monitoring metric, lower limit, and upper limit from the drop-down lists one by one.
These service metrics monitor the corresponding service data during fault drills. If the value of such a metric is within the allowed value range, the service is normal. Otherwise, you can determine whether to stop a drill.
Automatic Rollback
Select whether to enable automatic rollback.
Fault injection is automatically rolled back and restored to the status before fault injection. Automatic rollback cannot be configured for some fault drill weapons that do not support fault termination.
- Click Finish. The attack task is added.
- (Optional) Click Add Attack Task.
Attack tasks are preset in the template. You can add an attack task as required. Click Add Task Group. After adding an attack task, you can click Add Attack Task to add another one.
- Tasks in different task groups are executed in serial, and tasks in the same task group are executed in parallel.
- Currently, multiple fault injection operations on the same resource in a task group are not supported.
- To add an existing task, click Select from Existing, select the existing task, and click OK.
- To add a new attack task, perform the follow-up steps.
- Set the attack target.
Table 3 Attack target parameters Parameter
Description
Example Value
Cloud Service Provider
Select a cloud service vendor type.
Huawei Cloud
Source of Attack Target
Select the source of the target instance.
You can select attack targets by selecting instances, pods, or a specified number of targets if CCE instances are used.
ECS
Attack Task
Customize the name of the attack task based on the naming rule.
test-attacktask
Attack Target
Select a target instance.
-
- Click Next.
- Set parameters for selecting an attack scenario.
For details, see Attack Scenarios.
Table 4 Attack scenario parameters Parameter
Description
Example Value
Attack Type
Attack scenarios are classified based on attack scenario types.
Host resources
Attack Scenario
Customize the name of the attack task based on the naming rule.
CPU usage increase
Attack Parameters
Configure attack parameters based on attack scenarios.
CPU usage (%): 80
Fault duration (s): 60
- Click Next.
- (Optional) Set Configure Monitoring Tasks.
Table 5 Parameters for configuring a monitoring task Parameter
Description
Steady-State Metrics
Select the target resource, performance metric, lower limit, and upper limit from the drop-down lists one by one.
If a service can perform well and stably when a performance monitoring metric is set to a certain value range, this metric is called steady-state metric. If this metric value is not in that value range before a drill, the drill will be canceled. If the value of the steady-state metric is not within the stable value range during a drill, the corresponding fault injection automatically stops after automatic rollback is enabled.
Metric
Select the target resource, monitoring metric, lower limit, and upper limit from the drop-down lists one by one.
These service metrics monitor the corresponding service data during fault drills. If the value of such a metric is within the allowed value range, the service is normal. Otherwise, you can determine whether to stop a drill.
Automatic Rollback
Select whether to enable automatic rollback.
Fault injection is automatically rolled back and restored to the status before fault injection. Automatic rollback cannot be configured for some fault drill weapons that do not support fault termination.
- Click Finish. The attack task is added.
- Set the attack target.
- If a preset scenario in the template is not required, click Delete next to the task. This step is optional.
- Click OK.
After a drill task is created, choose Resilience Center > Chaos Drills > Drill Tasks to view the task and start the drill by referring to Starting a Drill Task.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot