Install and use Cloud Assistant

更新时间:
复制 MD 格式

Manually logging in to each ENS instance for batch O&M is inefficient and error-prone. By installing the Cloud Assistant Agent, you can run commands, install software, and collect logs on multiple instances without logging in. Cloud Assistant supports the full management lifecycle, from installing the agent and executing commands to unregistering the agent.

Cloud Assistant overview

Cloud Assistant is a native automated O&M tool built for cloud servers. It allows you to run commands, such as Shell, PowerShell, and Bat scripts, across multiple instances without logging in or using a jump server. You can automate tasks like running scripts, polling processes, installing or uninstalling software, starting or stopping services, and applying patches or security updates. For more information, see Cloud Assistant overview.

Install Cloud Assistant

Prerequisites

  • Your ENS instance must have an internet connection with a bandwidth of at least 10 Mbps.

  • The instance must be in the Stopped state.

Procedure

  1. On the ENS Instance List page, click Install Cloud Assistant in the Actions column.

    To do this, click the icon at the end of the Actions column, and then select Install Cloud Assistant from the O&M and Deployment category.

  2. Confirm the action. The installation will begin automatically.

  3. View instances with Cloud Assistant installed on the ENS Cloud Assistant page.

Create and run commands

Cloud Assistant lets you run scripts like Shell or PowerShell securely and reliably across multiple target instances.

Prerequisites

The instance is in the Running state and has the Cloud Assistant Agent installed.

Limitations

  • A single command supports up to 20 custom parameters.

  • You can run Cloud Assistant commands only on the following operating systems:

    • Linux: Alibaba Cloud Linux, AlmaLinux 8+, Anolis OS 7+, CentOS 5+, Debian 8+, Ubuntu 12+, RHEL 5+, SUSE 11+, Fedora 33+, CoreOS, and OpenSUSE.

    • Windows: Server 2012 and later.

  • Batch O&M: Supports batch operations on up to 100 instances at a time.

Procedure

  1. On the ENS Cloud Assistant page, click Execute Command.

  2. In the command information section, configure the following settings:

    • Command Content: The Base64-encoded command content cannot exceed 18 KB when you execute and save the command, or 24 KB when you execute the command.

    • Working Directory: The directory where the script runs on the instance. On Linux, the default is /root. On Windows, the default is C:\Windows\system32. To ensure the script runs from the correct directory, add the cd command at the beginning of your script.

    • Timeout: The default timeout is 60 seconds, which you can change to any value between 10 and 86,400 seconds (24 hours).

  3. Select the target instances where you want to run the command. You can select up to 100 instances.

  4. Click Run and Save or Execute to start the task.

  5. On the command results page, check the execution status.

Note

After Base64 encoding, the total size of your Bat, PowerShell, or Shell script plus any custom parameters must meet these limits:

  • Create command: Maximum 18 KB.

  • Upload file: Maximum 32 KB.

Unregister Cloud Assistant

Important

Stopping or uninstalling the Cloud Assistant Agent disables features such as passwordless console logon (session management and Workbench), CloudOps Orchestration Service command execution, and self-service troubleshooting.

Procedure

  1. On the ENS Cloud Assistant page, click Unregister in the Actions column.

  2. Confirm the action. The system starts unregistering the Cloud Assistant Agent.

  3. Once unregistered, the instance is removed from the Cloud Assistant page.