Quickly identifying resources for bulk management is a key challenge in automated operations. You can solve this by combining resource tags with Operation Orchestration Service (OOS).
Step 1: Create and bind a tag to ECS instances
Create and bind the tag business:bigdata to your ECS instances in either the ECS console or the Tag console. This example uses the Tag console:
-
Log on to the Tag console.
-
In the navigation pane on the left, choose , and then click Create Tag.
-
In the Create Tag dialog box, enter a tag key (for example,
business) and a tag value (for example,bigdata), and then click Create. -
In the tag list, find the target tag and click Add to Resources in the Actions column to bind it to existing ECS instances.
For more information, see Create tags and Bind tags to resources.
Step 2: Bulk start tagged ECS instances in OOS
In the OOS console, run the public template ACS-ECS-BulkyStartInstances and target the ECS instances with the business:bigdata tag.
-
Log on to the OOS console.
-
In the navigation pane on the left, choose .
-
In the top-left corner of the page, select a region.
NoteBy default, OOS manages resources in the same region where it runs. For example, OOS in the China (Hangzhou) region manages ECS instances in China (Hangzhou). However, you can specify a different
RegionIdvalue in theExecuteAPItask of a template to call APIs in other regions, although this is not recommended. Therefore, ensure the selected region matches the one where you tagged the ECS instances in Step 1: Create and bind a tag to ECS instances. For more information about OOS limitations, see Limitations. -
On the Public Template page, find ACS-ECS-BulkyStartInstances and click Create Execution.
-
On the Create page, perform the following steps:
-
In the Basic Information section, keep the default settings and click Next: Set Parameters.
In Automatic mode, all tasks in the template run automatically in sequence.
-
Set Target Instance to By Instance Tags. Select the tag key
businessand the tag valuebigdata. Set RAM role for OOS to Use Existing Permissions of Current Account. Keep the default settings for the other parameters. -
Click Next: Confirm.
-
Confirm the information, and then click Create.
-
-
In the Execution Result area, click the Start Instance task node.
-
On the Loop task list tab, view the execution result.
All ECS instances with the specified tag
business:bigdatahave been started.