You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
O&M
Orchestration-based batch installation of cloud assistant Agent
Copy page
Download PDF
Orchestration-based batch installation of cloud assistant Agent
This topic describes how to batch install cloud assistant Agent on ECS instances associated with the same tag.​
Scenarios​
If you need to install cloud assistant Agent on a large number of newly purchased ECS instances, you can use the batch installation feature. Specifically, you can filter target instances by tags first and then install cloud assistant Agent on them via script execution as specified in a custom template-based orchestration plan. This helps improve maintenance efficiency and reduce manual effort.​
Prerequisites​
tip​
The total number of instances on which cloud assistant Agent will be installed in a batch cannot exceed 1,000. If the total number of instances exceeds this limit, associate multiple tags with the target instances and perform installation in separate batches.​
  • You have not installed cloud assistant Agent on the target instances.​
Limits​
Currently, only Linux instances support orchestration-based batch installation of cloud assistant Agent. For Windows instances, install cloud assistant Agent manually via script execution. Learn more.​
Usage notes​
Ensure that the selected tag is associated only with instances that do not have the cloud assistant Agent installed. Alternatively, configure a rule to filter instances without the cloud assistant Agent installed when you create a custom template in Step 1. Otherwise, the cloud assistant Agent will be reinstalled on instances where it is already installed.​
tip​
  • No further attention is required if reinstalling cloud assistant Agent and restarting instances has no impact on your business.​
  • Installing the cloud assistant Agent requires restarting the instances, which may affect your business. Perform this operation during an appropriate maintenance window.​
Procedure​
Step 1: Create a custom template​
Create a template for installing cloud assistant Agent. This enables you to preset a standardized orchestration process for batch installation.​
  1. Log in to the ECS console.​
  1. In the left-side navigation pane, click "Maintenance & Monitoring > Orchestration".​
  1. In the top menu bar, select the project and the region where your business is located. In this practice, China (Beijing) and the default project are used as examples.​
  1. On the CloudOps Orchestration page, click the "Custom template" tab.​
  1. Click the "Create custom templates" button and configure the parameters in the following table.​
tip​
The following only describes parameters related to this practice. For complete parameter descriptions and more details, refer to Creating custom templates.​
  • ​
    Parameter​​
    Description​
    Sample value​
    Name​
    Specify the name of the custom template.​
    tip​
    The template name must be unique within the current account or project. It cannot be the same as the name of the public template, nor can it be the same as the name of any other custom template.​
    Cloud assistant Agent batch installation template​
    JSON schema​
    Define the "Cloud assistant Agent batch installation template" file (orchestration process) in JSON format. For example:​
    ​
    {​
    "Parameters": {​
    "targets": {​
    "Type": "Map"​
    },​
    "NeedReboot": {​
    "Type": "Boolean"​
    },​
    "ForceStop": {​
    "Type": "Boolean"​
    }​
    },​
    "Tasks": [​
    {​
    "Name": "getInstances",​
    "Action": "VOS::SelectTargetInstances",​
    "Parameters": {​
    "Filters": "{{ .targets }}"​
    },​
    "Outputs": {​
    "instanceIds": {​
    "Type": "List",​
    "Value": "{{ [.Instances[].InstanceId] }}"​
    }​
    }​
    },​
    {​
    "Name": "InstallCloudAssistant",​
    "Action": "VOS::ECS::InstallCloudAssistant",​
    "Parameters": {​
    "InstanceId": "{{ VOS::LoopItem }}",​
    "NeedReboot": "{{ .NeedReboot }}",​
    "ForceStop": "{{ .ForceStop }}"​
    },​
    "Outputs": {​
    "InstallResult": {​
    "Type": "Boolean",​
    "Value": "{{ .InstallResult }}"​
    }​
    },​
    "Loop": {​
    "LoopItem": "{{ .\"getInstances.instanceIds\" }}",​
    "Outputs": {​
    "LoopInstanceStatus": {​
    "SelectedOutputFiled": "InstallResult"​
    }​
    }​
    }​
    }​
    ],​
    "Outputs": {​
    "InstanceStatus": {​
    "Type": "List",​
    "Value": "{{ .\"InstallCloudAssistant.LoopInstanceStatus\" }}"​
    }​
    }​
    }​
    ​
    ​
    -​
    Project​
    Specify the project to which the custom template belongs.​
    tip​
    The project displayed in the configuration item is the one you select in step 3. To change projects, follow the instructions in step 3.​
    Default configuration​
    ​
  1. Click "Confirm" to complete the custom template creation.​
  • At this point, a custom template named "Cloud assistant Agent batch installation template" is displayed on the custom templates list page.​
Step 2: Create an orchestration plan​
Create an orchestration plan in the "Execute immediately" mode to batch install the cloud assistant Agent.​
  1. Log in to the ECS console.​
  1. In the left-side navigation pane, click "Maintenance & Monitoring > Orchestration".​
  1. In the top menu bar, select the region where your business is located. In this practice, China (Beijing) and the default project are used as examples.​
tip​
The following only describes parameters related to this practice. For complete parameter descriptions and more details, refer to Creating orchestration plans.​
  • ​
    Parameter​​
    Description​
    Sample value​
    Basic information​
    ​
    ​
    Name​
    Specify the name of the orchestration plan.​
    Cloud assistant Agent batch installation O&M plan​
    Role​
    Select a role with read and write permissions on your ECS resources. The default role is "CustomRoleForOOS," which integrates all permissions supported by Orchestration by default. This prevents permission issues during usage.​
    Default configuration​
    Execution mode​
    ​
    ​
    Execution mode​
    Select a mode of executing the orchestration plan task. In this practice, "Execute immediately" is selected.​
    Execute immediately: After the orchestration plan task is created, execute it immediately.​
    Execute immediately​
    Task steps​
    ​
    ​
    Step creation type​
    Select a mode of executing the task steps of the orchestration plan. In this practice, "Select an existing template" is selected.​
    Select an existing template​
    Select template​
    ​
    ​
    -​
    Select the orchestration plan template for task execution. Click the dropdown list for template selection and select the template "Cloud assistant Agent batch installation template" you have created in step 1.​
    Cloud assistant Agent batch installation template​
    Parameter configuration​
    warning​
    The parameters vary depending on the selected template. The parameters displayed in the console prevail. The following only describes parameters related to this practice.​
    ​
    ​
    targets (Map)​
    Enter the value of {key} in JSON format as follows:​
    ​
    {​
    "Type": "Tags",​
    "Tags": [​
    {​
    "Key": "purpose",​
    "Value": "Agent"​
    }​
    ]​
    }​
    ​
    tip​
    • Replace purpose and Agent with the actual key (Key) and value (Value) associated with your instances. The specified tag key and value must match those of the instances where cloud assistant Agent is to be installed.​
    • Configure the parameter "targets (Map)" based on the template you select.​
    -​
    ​
    NeedReboot (Boolean)​
    Select whether to restart the corresponding instances after cloud assistant Agent installation is complete.​
    • Enable: Instance restart required.​
    • Disable (default): Instance restart not required.​
    tip​
    If you have not enabled the automatic instance restart feature, manually restart the corresponding instances after installing cloud assistant Agent to ensure the installation succeeds.​
    Enable​
    ForceStop (Boolean)​
    Select whether to forcibly terminate related processes, dependent services, and other running entities during O&M operations.​
    • Enable: Force termination of all related processes.​
    • Disable (default): No force termination of related processes.​
    Default configuration​
    ​
  1. Click "Create" to complete the operation.​
  • At this point, an orchestration plan named "Cloud assistant Agent batch installation O&M plan" is displayed on the orchestration plans list page.​
Step 3: View the Agent installation result​
For installation results of the target instances, log in to the cloud assistant console or the target instances. Learn more.​
Last updated: 2026.06.18 17:49:53