Batch operations

更新时间:
复制 MD 格式

Managing multiple Elastic Compute Service (ECS) instances in an Enterprise Distributed Application Service (EDAS) environment often requires running maintenance commands on each instance. Batch operations let you run commands across multiple instances at once from the EDAS console. You can target an entire cluster, all instances of an application, or a specific set of instances.

Prerequisites

Before you begin, make sure that you have:

  • An EDAS cluster with EDAS Agent installed on the ECS instances

  • Access to the EDAS console

Scenarios

You can perform batch operations in the following scenarios:

  • Perform the same operation on multiple instances or across multiple clusters.

  • Run multiple commands at the same time.

  • Query command execution results.

Run a batch command

Batch commands support three levels: by cluster, by application, or by instance. The following steps use cluster-level operations as an example. Application-level and instance-level operations follow the same workflow.

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose System Management > Batch Operations.

  3. On the Batch Operations page, select the region and the namespace.

  4. Click the By Cluster, By Application, or By Instance tab to set the scope.

  5. Click Create next to Select Cluster. In the Select Cluster dialog box:

    • In the Unselected section on the left, select one or more clusters. Use the search box to filter by cluster name.

    • Click > to move the selected clusters to the Selected section on the right.

    • Click OK.

  6. Enter your command in the Command code editor.

  7. (Optional) If your selected clusters include mixed types (ECS-based and Docker-based), select the execution scope:

    Note If all selected clusters are the same type, you do not need to select the execution scope.
    ScopeDescription
    On ECS instancesRun the command only on ECS instances
    In Docker containersRun the command only inside Docker containers
    On ECS instances and In Docker containersRun the command on both
  8. Click Execute. The system uses the admin account to log on to instances and run the command.

View execution results

After you click Execute, a confirmation dialog box appears. Click OK to proceed.

The console generates the Execution Result tab with the following details for each ECS or Dockerized instance:

ColumnDescription
Application TypeThe type of application deployed on the instance
IP AddressThe IP address of the instance
VPC IDThe VPC that the instance belongs to
StatusWhether the command succeeded or failed

The execution details section shows the detailed command running processes on instances. If a command fails, the error message indicating the cause is included in the output.

Note Execution time varies with the number of clusters, applications, or instances. If results appear incomplete, click Refresh to get the latest status.

View operation records

The Execution Records section at the bottom of the page logs all past batch operations. Each record includes the following details:

FieldDescription
OperatorThe account that ran the command
Creation timeWhen the batch operation was created
End timeWhen the batch operation finished
Executed commandThe command that was run
StatusThe execution result

Record visibility by account type

Account typeVisible records
Alibaba Cloud accountAll batch operations run by this account and its RAM users
RAM userOnly batch operations run by this RAM user

Records are sorted by time in descending order (newest first). You can also sort by operator name, creation time, or end time.

To view the full details of a past operation, click View in the Details column.