Cloud Assistant is a native automated operations and maintenance (O&M) tool developed for Elastic Compute Service (ECS). It allows you to batch maintain ECS instances and batch run commands on and send files to ECS instances in a password-free, logon-free manner without the use of jumper servers. These commands can consist of shell, PowerShell, or batch scripts. Typically, you can use Cloud Assistant to install and uninstall software, start and stop services, distribute configuration files, and run commonly used commands (scripts).
Features
Running
) state, you can use Cloud Assistant to perform the following operations on the instances by using the ECS console or by calling API operations: - Run batch and PowerShell scripts on Windows instances, or run shell, Python, and Perl scripts on Linux instances.
- Upload files to the instances.
- Run the same command on multiple instances. The execution state and results of one instance do not affect other instances.
- Configure custom parameters in Cloud Assistant commands to adapt to different scenarios.
Use 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 scripts that are already uploaded to instances
- Managing software lifecycle
- Deploying code or applications
- Polling processes
- Installing service-related patches or security updates
- Obtaining files from Object Storage Service (OSS) or YUM repositories to update applications on ECS instances
- Changing hostnames or user logon passwords
Billing
Cloud Assistant is provided free of charge.
However, you may be charged for the ECS resources used by Cloud Assistant to execute deployment and O&M tasks. For more information about the billing of ECS resources, see Billing overview.
Limits
- Python or Perl scripts can be run only by using the ECS console. Note The instances that you want to run commands on or send files to must have the correct runtime environment.
- For files or commands that consist of batch, PowerShell, or shell scripts with custom parameters, the following limits apply to their sizes after Base64 encoding:
- If a command is created not by using the immediate execution feature, the command cannot exceed 18 KB in size after Base64 encoding.
- If a command is created and run simultaneously by using the immediate execution feature and is saved, the command cannot exceed 18 KB in size after Base64 encoding.
- If a command is created and run simultaneously by using the immediate execution feature but is not saved, the command cannot exceed 24 KB in size after Base64 encoding.
- A file that you want to upload cannot exceed 32 KB in size after Base64 encoding.
- Each command can contain up to 20 custom parameters.
- Cloud Assistant commands can be run only on instances that use the following operating system versions:
- Alibaba Cloud Linux
- CentOS 6, CentOS 7, CentOS 8, and later
- CoreOS
- Debian 8, Debian 9, Debian 10, and later
- OpenSUSE
- Rocky Linux
- Red Hat 5, Red Hat 6, Red Hat 7, and later
For Red Hat instances, you must 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, and SLES 15 or later
- Ubuntu 12, Ubuntu 14, Ubuntu 16, and Ubuntu 18 or later
- Windows Server 2012, Windows Server 2016, and Windows Server 2019 or later
For more information about the limits and quotas for Cloud Assistant, see the "Cloud Assistant limits" section of Limits.
Resources
The Cloud Assistant client uses the resources of the host where the client is installed. The following table describes the used host resources.
Host resource | Linux operating system | Windows operating system |
---|---|---|
CPU | The average CPU utilization is less than 1%. | |
Physical memory | About 17 MB of physical memory is used. | About 10 MB of physical memory is used. |
Disk I/O | The Cloud Assistant client involves almost no disk I/O operations when it is working as expected. The Cloud Assistant client involves disk I/O operations only in scenarios such as those in which upgrade packages are downloaded and in which command scripts are saved. | |
Network I/O | A few network I/O operations are performed only to report data such as heartbeat data when the Cloud Assistant client is working as expected. |
Terms
The following table describes relevant terms in Cloud Assistant.
Term | Description |
---|---|
Cloud Assistant | A tool provided by Alibaba Cloud that can help you perform routine maintenance tasks on multiple ECS instances and ECS bare metal instances. Cloud Assistant is available in all Alibaba Cloud regions. |
Cloud Assistant client | A lightweight plug-in that can be installed on ECS instances to run Cloud Assistant commands.
|
Cloud Assistant daemon process | A daemon process that is used to monitor the resource consumption of the Cloud Assistant client, report the running state of the client, and restart the client when the client fails.
Note The Cloud Assistant daemon process is available only for Linux instances. |
task execution path | A path in which Cloud Assistant saves your command as a file on an ECS instance and executes the file. The path varies based on the operating system.
|
command | A specific command (such as a command that consists of a shell or PowerShell script) that can be run on ECS instances. |
custom parameter | A variable that is configured in the {{key}} format in a command. You can specify a custom parameter and its value in the {{"<key>":"<value>"}} format when you create a task to run the command. The number of Cloud Assistant commands that you can have within each Alibaba Cloud region is limited. To adapt Cloud Assistant commands to multiple scenarios, we recommend that you configure custom parameters. You can also specify built-in environment parameters as custom parameters in a command. Then, when you run the command, the custom parameters can be automatically specified by Cloud Assistant. |
one-time execution | The execution (Invocation ) of a one-time task. A one-time task runs a command only once on one or more instances. |
scheduled execution | An execution of a scheduled task. A scheduled task runs a command on one or more instances based on a specified schedule. |
execution status | The relationships among different types of execution states. For more information, see Execution states. |
Execution states
The following table describes the instance-level execution state of a command that is run on a single instance. The InvocationStatus parameter in API operations indicates the execution state of a command.
Execution state in API operations | Execution state in the ECS console | Description |
---|---|---|
Running | Task Running | The command is being run. |
Stopping | Stopping | The command is being stopped. |
Stopped | Manually Stopped | The command is stopped. |
Finished | Task Completed | The command is run to completion. This does not indicate that the command is successful. You can check whether the command is successful based on the command output (Output ) and the exit code (ExitCode ). |
Failed | Task Failed | The command cannot be run or the command process cannot be run to completion before the timeout period specified by Timeout expires. |
States of batch executions and scheduled executions

- The following table describes the overall execution states of a command that is run on multiple instances at the same time.
Execution state in API operations Execution state in the ECS console Description Priority Running
Task Running The instance-level execution state is Running on some or all instances. 1 Stopping
Stopping The instance-level execution state is Stopping on some or all instances. 2 Stopped
Stopped The instance-level execution state is Stopped on all instances. 3 Failed
Task Failed The instance-level execution state is Failed on all instances, or is Failed on some instances and is Stopped on the other instances. 4 Finished
Task Completed The instance-level execution state is Finished on all instances, or is Finished on some instances and is Stopped on the other instances. 5 PartialFailed
Partially Failed The instance-level execution state is Failed on some instances and is Finished on the other instances. 6 The following figure shows the relationship between the overall execution states and the instance-level execution states of a one-time execution in which a command is run on three instances. - The following table describes the states of scheduled executions of a command.
State Description Overall execution state The overall execution state is always Running ( Running
) unless you stop the command on all the instances.Instance-level execution state For each instance, the instance-level execution state is always Running ( Running
) unless you stop the command on the instance.Execution-level state For more information, see Execution states.
Related operations
You can use Cloud Assistant by using the ECS console or by calling an API operation.
Scenario | References | API operation |
---|---|---|
The Cloud Assistant client must be installed on an ECS instance before Cloud Assistant can be used on the instance. By default, ECS instances that were created from public images after December 01, 2017 have the Cloud Assistant client pre-installed. You must manually install the Cloud Assistant client on 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 command | |
Run a created command on ECS instances. | Run a command | |
View the execution states and results of commands. Execution results are the actual outputs generated on the specified instances. | Check execution results and troubleshoot common issues | |
Modify a created command. You can modify the name and description of the command. | Modify a command | N/A |
Create a new version of a Cloud Assistant command or modify the properties of the command such as the name, description, type, content, execution path, or timeout period. | Clone a command | N/A |
Stop a running command. | Stop a command | StopInvocation |
To free up quotas for new commands, you can delete Cloud Assistant commands that are no longer needed. | Delete a command | DeleteCommand |