Cloud Assistant is an Alibaba Cloud proprietary tool for ECS that provides O&M and deployment services. Cloud Assistant can automatically run batch, PowerShell, or shell commands on multiple instances at a time, which allows you to perform multiple tasks without establishing individual connections to these instances. These tasks include running automated O&M scripts, polling the processes, installing or uninstalling software, updating applications, and installing patches.

Features

After you install the Cloud Assistant client on ECS instances, you can use Cloud Assistant to perform the following operations on the instances in the ECS console or by calling API operations:
  • Run batch, PowerShell (for Windows instances), or shell (for Linux instances) scripts on one or more instances that are in the Running (Running) state.
  • Run the same command on multiple instances. The execution status and results on different instances do not affect each other.
  • Configure custom parameters of a Cloud Assistant command to adapt the command to suit the needs of multiple scenarios.
    Note Cloud Assistant does not proactively initiate operations. You have full control over all Cloud Assistant operations.

Scenarios

Cloud Assistant can help you perform deployment and O&M tasks on ECS instances. The following list provides some examples:

  • Uploading and running automated O&M scripts
  • Running existing scripts on instances
  • Managing software lifecycle
  • Deploying code or applications
  • Polling processes
  • Installing patches or security updates
  • Obtaining updates from Object Storage Service (OSS) or YUM repositories
  • Changing hostnames or user logon passwords

Payment option

Cloud Assistant is provided free of charge.

However, you may be charged for the ECS resources used by Cloud Assistant to deploy and maintain ECS instances. For more information about the billing of ECS resources, see Billing overview.

Limits

  • Only API operations can be used to configure recurring commands. The recurring interval cannot be less than 10 seconds.
  • The total size of the Base64-encoded batch, PowerShell, or shell script together with custom parameters cannot exceed 16 KB.
  • Each command can contain a maximum of 20 custom parameters.
  • Cloud Assistant commands can be run only on instances that use the following operating systems:
    • Alibaba Cloud Linux
    • CentOS 6, CentOS 7, CentOS 8, and later
    • CoreOS
    • Debian 8, Debian 9, Debian 10, and later
    • OpenSUSE
    • RedHat 5, RedHat 6, RedHat 7, and later

      In RedHat instances, you need to download the RPM package to install the Cloud Assistant client. For more information, see Install the Cloud Assistant client.

    • SUSE Linux Enterprise Server (SLES) 11, SLES 12, SLES 15, and later
    • Ubuntu 12, Ubuntu 14, Ubuntu 16, Ubuntu 18, and later
    • Windows Server 2012, Windows Server 2016, Windows Server 2019, and later

For more information about the limits and quotas of Cloud Assistant, see the "Cloud Assistant limits" section in Limits.

Terms

The following table describes relevant terms in Cloud Assistant.

Term Description
Cloud Assistant A tool provided by Alibaba Cloud that can automatically perform routine maintenance tasks on multiple ECS instances such as ECS bare metal instances. Cloud Assistant is available in all Alibaba Cloud regions.
Cloud Assistant client A lightweight plug-in that is installed on an ECS instance to run commands on the instance.
  • In Windows instances, the process of the client program is AliyunService.
  • In Linux instances, the process of the client program is aliyun.service.
Cloud Assistant daemon A daemon that is used to monitor the resource consumption of the Cloud Assistant client, report the running status of the client, and restart the client when the client fails.
  • Service name: AssistDaemon
  • Path: /usr/local/share/assist-daemon/assist_daemon
Note The Cloud Assistant daemon is only in Linux instances.
Task execution path
A path in which Cloud Assistant saves your command as a file in an ECS instance before the file is executed. The path varies depending on the operating system.
  • Linux: /tmp
  • Windows: <The installation path of Cloud Assistant>/work/script
Command A specific command to be run on an ECS instance, such as a shell script or a PowerShell script.
Custom parameter A variable value that you set in the {{key}} format in a command. You can set a custom parameter and its value in the {{"key":"value"}} format when you run a command. You can create a limited number of Cloud Assistant commands in each Alibaba Cloud region. We recommend that you configure custom parameters to adapt Cloud Assistant commands to suit multiple scenarios.
One-time task A one-time task (Invocation) occurs when you run one command on one or more instances.
Recurring task A recurring task occurs when you specify the time series or period to run one command periodically on one or more instances.
Task status An execution status of a task. For more information, see Overview.

Execution status of a task

The following table describes the execution status of a task running on an instance. The corresponding API parameter is InvocationStatus.

Status in an API operation Status in the console Description
Running Task Running The task is being run.
Stopping Task Stopping The task is being stopped.
Stopped Manually Stopped The task has been stopped.
Finished Task Completed The task execution is completed. However, this does not indicate that the task succeeds. You can check whether the task succeeds based on the actual output and exitcode returned by the process.
Failed Task Failed The task cannot be run or the execution process exceeds the timeout period.

Execution status during batch execution

To better manage batch executions and recurring executions, you can manage the lifecycle of a task from the perspectives of the overall execution status, the execution status on a single instance, and the execution status of each task. The corresponding API parameter is InvokeStatus. The following figure shows the relationship among the three types of execution status.Relationship among the three types of execution status
  • The following table shows execution status of a task during batch executions.
    Status in an API operation Status in the console Description Priority
    Running Task Running The task is running on some or all instances. 1
    Stopping Task Stopping The task is being stopped on some or all instances. 2
    Stopped Stopped The task has been stopped on all instances. 3
    Failed Task Failed The task has failed on all instances or the task has failed on some instances and been stopped on the other instances. 4
    Finished Task Completed The task is completed on all instances or the task is completed on some instances and has been stopped on the other instances. 5
    PartialFailed Partially Failed The task has failed on some instances and is completed on the other instances. 6
    Three instances are used in the following figure to show the relationship between the overall execution status and the execution status on a single instance when the task is run on three instances at the same time.Lifecycle of a task during batch executions
  • The following table shows execution status of a recurring task.
    The status of the node instance. Description
    Overall execution status The overall execution status is always Running (Running) unless you stop the task from running on all the instances.
    Execution status on a single instance The execution status on a single instance is always Running (Running) unless you stop the task from running on a single instance.
    Execution status of each task For more information, see Overview.

Operations

You can use Cloud Assistant in the ECS console or by calling an API operation.

Business requirement Reference API operation
The Cloud Assistant client must be installed on an ECS instance before Cloud Assistant can be used. By default, instances that are created from public images after December 01, 2017 are pre-installed with the Cloud Assistant client. Therefore, you must manually install the Cloud Assistant client for some ECS instances. Install the Cloud Assistant client
You are familiar with using OpenAPI Explorer and this is the first time that you use Cloud Assistant. N/A
Create a Cloud Assistant command. Create a script
Run a created command on the target instances. Run commands
View the execution status and results of tasks. Execution results are the actual outputs generated on the specified instances. View the execution result of a script
Modify a created command. You can modify the name and description of the command. Modify a script N/A
Create a new version of an existing Cloud Assistant command or modify the properties of a command such as the name, description, type, content, execution path, or timeout period. Clone a script N/A
Stop a running command. Stop a script StopInvocation
Delete Cloud Assistant commands that are no longer needed so that you can have sufficient quota balance to create new commands. Delete a script DeleteCommand