All Products
Search
Document Center

Scenarios

Last Updated: Sep 05, 2019

You can use Operation Orchestration Service (OOS) to manage event-driven, scheduled, and cross-region O&M tasks. It also allows you to easily handle multiple O&M tasks at a time, update images, and manage approval requests.

Manage event-driven O&M tasks

O&M actions can be triggered by events. For example, if an ECS instance consumes 85% of the vCPUs, it is automatically restarted to ensure the continuity of services. Event-driven O&M tasks can be automatically executed to provide easy O&M and enhance efficiency.

Handle multiple O&M tasks at a time

You may need to perform common O&M tasks for multiple targets, such as ECS instances, at a time.
For example, you need to query the remaining storage space of SSD disks for multiple ECS instances. To do this, you must specify a list of ECS instances by using IDs, tags, or resource groups. Then, you can run commands in the Cloud Assistant client to retrieve the result. The following table lists public templates that are used to handle multiple O&M tasks at a time.
Public templates

Template Description Sample code
ACS‑ECS‑StartInstancesByInstanceIds Starts multiple ECS instances that are specified by instance IDs. YAML
ACS‑ECS‑StartInstancesByTag Starts multiple ECS instances that are specified by instance tags. YAML
ACS‑ECS‑StopInstancesByInstanceIds Stops multiple ECS instances that are specified by instance IDs. YAML
ACS‑ECS‑StopInstancesByTag Stops multiple ECS instances that are specified by instance tags. YAML
ACS‑ECS‑RestartInstancesByInstanceIds Restarts multiple ECS instances that are specified by instance IDs. YAML
ACS‑ECS‑RestartInstancesByTag Restarts multiple ECS instances that are specified by instance tags. YAML
ACS-ECS-BulkyDeletePrepaidInstanceByInstanceIds Releases multiple subscription-based ECS instances that are specified by instance IDs. The instance is changed to a pay-as-you-go instance and then released. YAML
ACS-ECS-BulkyRunCommandByTag Runs a command in the Cloud Assistant client on multiple ECS instances that are specified by instance tags. YAML
ACS-ECS-BulkyTagInstanceByRunCommandResultAndInstanceIds Creates a tag and attaches it to the specified ECS instances based on the results returned by running a command in the Cloud Assistant client. YAML
ACS-ECS-BulkyTagInstanceByOSTypeAndInstanceIds Creates a tag and attaches it to the specified ECS instances based on the operating system types of the instances. YAML
ACS-ECS-BulkyTagInstanceByLinuxKernelVersionAndInstanceIds Creates a tag and attaches it to the specified ECS instances based on the Linux kernel versions of the instances. YAML

Update images

To ensure a safe runtime environment for ECS instances, you must install the latest patches or update related components. OOS allows you to update ECS instance images. You can generate a new image from a source image, and use the new image for testing and production. The following table lists a public template that is used to update ECS instance images.
Public templates

Template Description Sample code
ACS‑ECS‑UpdateImage Updates ECS instance images. YAML

Manage approval requests

In many scenarios, you need to manage approval requests to ensure that only expected O&M operations are performed. You can use ACS::Approve to define an approval action in a template, which indicates that approval is needed before O&M actions are executed. Approval actions ensure that expected O&M actions are executed without mistakes. The following table lists public templates that are used to manage approval requests.
Public templates

Template Description Sample code
ACS‑ECS‑BuyCostlyInstancesWithApproval Requires approval before ECS instances are purchased. YAML
ACS‑ECS‑DeleteInstancesWithApprovalByInstanceIds Requires approval before ECS instances are deleted. YAML

Manage scheduled tasks

Some O&M tasks need to be executed as scheduled. For example, each morning you need to delete all Object Storage Service (OSS) files that are generated by the previous tests, and prepare a clean runtime environment for the next test. In this case, you can create a template and schedule delete operations in the morning. The following table lists public templates that are used to manage scheduled tasks.
Public templates

Template Description Sample code
ACS‑ECS‑ScheduleToStartInstancesByTag Schedules the start of ECS instances that are specified by tags. YAML
ACS‑ECS‑ScheduleToStopInstancesByTag Schedules the stop of ECS instances that are specified by tags. YAML

Manage cross-region O&M tasks

Services are deployed in multiple regions to ensure high availability. OOS can be used to simplify the management of the services that are deployed in other regions. You can define cross-region O&M tasks in one template and execute the tasks.
Public templates

Template Description Sample code
ACS-ECS-CloneInstancesAcrossAZ Replicates multiple ECS instances with the same specifications across zones at a time. Procedure: Obtain the specifications of the ECS instances to be replicated and create the images of the instances. After the images are created, use the images to create ECS instances with the same specifications as the replicated ones, and then run the instances in the target zone. Required parameters: instanceIds, regionId, targetZoneId, targetSecurityGroupId, and targetVSwitchId. YAML
ACS-ECS-CloneInstancesAcrossRegion Replicates multiple ECS instances across regions at a time. Procedure: Create the images of the ECS instances to be replicated. After the images are created, replicate the images to the target region, create ECS instances based on the images, and then run the instances in the target zone of the target region. Required parameters: instanceIds, regionId, targetRegionId, targetZoneId, targetInstanceType, targetSecurityGroupId, and targetVSwitchId.
YAML

Manage multi-regional O&M tasks

When you use resources in multiple regions, you need to synchronize O&M operations in all regions to ensure the consistency of resources. For example, you can enable the logging feature for the OSS buckets that are deployed in multiple regions.