The Cloud Assistant client is used to run Cloud Assistant commands on Elastic Compute Service (ECS) instances. This topic describes how to install the Cloud Assistant client.

Prerequisites

  • An administrator account is used to install and use the Cloud Assistant client. The administrator username is root for Linux instances, and system for Windows instances.
  • Before you install the Cloud Assistant client, make sure that your instance type and operating system support Cloud Assistant. For more information, see the "Limits" section in Overview.

Background information

By default, ECS instances created from public images after December 1, 2017 are pre-installed with the Cloud Assistant client. For ECS instances created before December 1, 2017, you must manually install the Cloud Assistant client.

The following table describes the installation methods of the Cloud Assistant client on different operating systems.

Operating system Installation method
Windows
Linux operating systems such as Alibaba Cloud Linux, CentOS, Red Hat Enterprise Linux (RHEL), and SUSE Linux
Linux operating systems such as Debian and Ubuntu
Other Linux operating systems

Install the client on Windows instances

  1. Connect to an ECS instance as the root user. For more information, see Connection methods.
  2. Download the Cloud Assistant client installation file.
    You can download the installation file for a specific version of the Cloud Assistant client from one of the following URLs:
    • Public URL for the latest version: latest version of the Cloud Assistant client
    • Public URL for a specific version:
      https://aliyun-client-assist.oss-accelerate.aliyuncs.com/windows/aliyun_agent_{version}_setup.exe
    • Internal URL for the latest version:
      https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/windows/aliyun_agent_latest_setup.exe
    • Internal URL for a specific version:
      https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/windows/aliyun_agent_{version}_setup.exe
    Note
    • {version} indicates the version number of the Cloud Assistant client.
    • {regionId} indicates the region ID of your instance.
    For example, you can download the installation file for the 1.0.0.128 version of the Cloud Assistant client from the following internal URL in the China (Hangzhou) region:
    https://aliyun-client-assist-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/windows/aliyun_agent_1.0.0.128_setup.exe
  3. Double-click the installation file and install the client as instructed.
    The default installation path is C:\ProgramData\aliyun\assist\ for Windows instances.
  4. If the instance is in the classic network, perform the following steps:
    1. In the directory where the Cloud Assistant client is installed, create a file named region-id and do not add extensions such as .txt or .conf to the file.
    2. In the region-id file, enter the region ID of the instance. Example: cn-hangzhou.
    Note In Windows, you must clear the Hide extensions for known file types option to check whether the region-id file has an extension.

Install the client on Linux instances by using the RPM package

This method is applicable to operating systems such as Alibaba Cloud Linux, CentOS, RHEL, and SUSE Linux.

  1. Connect to an ECS instance as the root user.
    For more information about connection methods, see Connection methods.
  2. Download the RPM package for a specific version of the Cloud Assistant client from one of the following URLs:
    • Public URL for the latest version:
      • Download URL for Linux x86:
        wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_latest.rpm"
      • Download URL for Linux ARM:
        wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun-assist-latest-1.aarch64.rpm"
    • Public URL for a specific version:
      • Download URL for Linux x86:
        wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_{version}.rpm"
      • Download URL for Linux ARM:
        wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun-assist-{version}-1.aarch64.rpm"
    • Internal URL for the latest version:
      • Download URL for Linux x86:
        wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_latest.rpm"
      • Download URL for Linux ARM:
        wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun-assist-latest-1.aarch64.rpm"
    • Internal URL for a specific version:
      • Download URL for Linux x86:
        wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_{version}.rpm"
      • Download URL for Linux ARM:
        wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun-assist-{version}-1.aarch64.rpm"
    Note
    • {version} indicates the version number of the Cloud Assistant client.
    • {regionId} indicates the region ID of your instance.
    For example, you can download the RPM package for the 1.0.2.458 x86 version of the Cloud Assistant client from the following internal URL in the China (Hangzhou) region:
    wget "https://aliyun-client-assist-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/linux/aliyun_assist_1.0.2.458.rpm"
  3. Install the Cloud Assistant client.
    If you select the default installation directories, the Cloud Assistant client is installed in one of the following directories on Linux instances:
    • CoreOS: /opt/local/share/aliyun-assist/.
    • Other operating systems: /usr/local/share/aliyun-assist/. Other operating systems include Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE.
    In this example, the latest version of the Cloud Assistant client is installed.
    • Download URL for Linux x86:
      rpm -ivh --force aliyun_assist_latest.rpm
    • Download URL for Linux ARM:
      rpm -ivh --force aliyun-assist-latest-1.aarch64.rpm
  4. Perform the following operations based on the operating system and network type of the ECS instance:
    • If the instance runs a Red Hat operating system, perform the following steps:
      1. Stop the qemu-ga service.
        systemctl stop qemu-guest-agent
        systemctl disable qemu-guest-agent
      2. Restart Cloud Assistant.
        systemctl restart aliyun.service
    • If the instance is in the classic network, perform the following steps:
      1. In the directory where the Cloud Assistant client is installed, create a file named region-id and do not add extensions such as .txt or .conf to the file.
      2. In the region-id file, enter the region ID of the instance. Example: cn-hangzhou.

Install the client on Linux instances by using the Debian package

This method is applicable to operating systems such as Debian and Ubuntu.

  1. Connect to an ECS instance as the root user.
    For more information about connection methods, see Connection methods.
  2. Download the Debian package for a specific version of the Cloud Assistant client from one of the following URLs:
    • Public URL for the latest version:
      • Download URL for Linux x86:
        wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_latest.deb"
      • Download URL for Linux ARM:
        wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun-assist_latest-1_arm64.deb"
    • Public URL for a specific version:
      • Download URL for Linux x86:
        wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_{version}.deb"
      • Download URL for Linux ARM:
        wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun-assist_{version}-1_arm64.deb"
    • Internal URL for the latest version:
      • Download URL for Linux x86:
        wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_latest.deb"
      • Download URL for Linux ARM:
        wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun-assist_latest-1_arm64.deb"
    • Internal URL for a specific version:
      • Download URL for Linux x86:
        wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_{version}.deb"
      • Download URL for Linux ARM:
        wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun-assist_{version}-1_arm64.deb"
    Note
    • {version} indicates the version number of the Cloud Assistant client.
    • {regionId} indicates the region ID of your instance.
    For example, you can download the Debian package for the 1.0.2.458 x86 version of the Cloud Assistant client from the following internal URL in the China (Hangzhou) region:
    wget "https://aliyun-client-assist-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/linux/aliyun_assist_1.0.2.458.deb"
  3. If an earlier version of the Cloud Assistant client is installed on the instance, uninstall the earlier version.
    dpkg -r aliyun-assist
  4. Install the Cloud Assistant client.
    If you select the default installation directories, the Cloud Assistant client is installed in one of the following directories on Linux instances:
    • CoreOS: /opt/local/share/aliyun-assist/.
    • Other operating systems: /usr/local/share/aliyun-assist/. Other operating systems include Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE.
    In this example, the latest version of the Cloud Assistant client is installed.
    • Download URL for Linux x86:
      dpkg -i aliyun_assist_latest.deb
    • Download URL for Linux ARM:
      dpkg -i aliyun-assist_latest-1_arm64.deb
  5. If the instance is in the classic network, perform the following steps:
    1. In the directory where the Cloud Assistant client is installed, create a file named region-id and do not add extensions such as .txt or .conf to the file.
    2. In the region-id file, enter the region ID of the instance. Example: cn-hangzhou.

Install the client on Linux instances by using the binary package

This method is applicable to mainstream Linux operating systems.

  1. Connect to an ECS instance as the root user. For more information, see Connection methods.
  2. Download the binary package for a specific version of the Cloud Assistant client from one of the following URLs:
    • Public URL for the latest version:
      • Download URL for Linux x86:
        wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_latest_update.zip"
      • Download URL for Linux ARM:
        wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun_assist_latest_update_arm.zip"
    • Public URL for a specific version:
      • Download URL for Linux x86:
        wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_{version}_update.zip"
      • Download URL for Linux ARM:
        wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun_assist_{version}_update_arm.zip"
    • Internal URL for the latest version:
      • Download URL for Linux x86:
        wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_latest_update.zip"
      • Download URL for Linux ARM:
        wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun_assist_latest_update_arm.zip"
    • Internal URL for a specific version:
      • Download URL for Linux x86:
        wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_{version}_update.zip"
      • Download URL for Linux ARM:
        wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun_assist_{version}_update_arm.zip"
    Note
    • {version} indicates the version number of the Cloud Assistant client.
    • {regionId} indicates the region ID of your instance.
    For example, you can download the binary package for the 2.2.3.282 x86 version of the Cloud Assistant client from the following internal URL in the China (Hangzhou) region:
    wget "https://aliyun-client-assist-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/linux/aliyun_assist_2.2.3.282_update.zip"
  3. Install the Cloud Assistant client.
    If you select the default installation directories, the Cloud Assistant client is installed in one of the following directories on Linux instances:
    • CoreOS: /opt/local/share/aliyun-assist/.
    • Other operating systems: /usr/local/share/aliyun-assist/. Other operating systems include Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE.

    Decompress the binary package to the corresponding installation directory and install the client. In this example, the 2.2.3.282 x86 version of the Cloud Assistant client is installed.

    unzip  -o aliyun_assist_2.2.3.282_update.zip -d /usr/local/share/aliyun-assist/
    chmod a+x /usr/local/share/aliyun-assist/2.2.3.282/update_install
    bash /usr/local/share/aliyun-assist/2.2.3.282/update_install
  4. Perform the following operations based on the operating system and network type of the ECS instance:
    • If the instance runs a Red Hat operating system, perform the following steps:
      1. Stop the qemu-ga service.
        systemctl stop qemu-guest-agent
        systemctl disable qemu-guest-agent
      2. Restart Cloud Assistant.
        systemctl restart aliyun.service
    • If the instance is in the classic network, perform the following steps:
      1. In the directory where the Cloud Assistant client is installed, create a file named region-id and do not add extensions such as .txt or .conf to the file.
      2. In the region-id file, enter the region ID of the instance. Example: cn-hangzhou.

Install the client on Linux instances by using source code

  1. Connect to an ECS instance as the root user.
    For more information about connection methods, see Connection methods.
  2. Install necessary software such as Git and Go.
    In this example, YUM is used to install Git and Go. If you use other versions of Linux, use the corresponding package manager.
    • Install Git.
      yum install git -y
    • Install Go.
      yum install go -y
  3. Download the source code of the Cloud Assistant client.
    git clone https://github.com/aliyun/aliyun_assist_client
  4. Access the source code directory.
    cd ./aliyun_assist_client
  5. Compile the source code.
    go build
    If no error message is returned, the client is installed.
  6. If the instance is in the classic network, perform the following steps:
    1. In the directory where the Cloud Assistant client is installed, create a file named region-id and do not add extensions such as .txt or .conf to the file.
    2. In the region-id file, enter the region ID of the instance. Example: cn-hangzhou.
  7. Run the Cloud Assistant client.
    aliyun-service -d

Install the client on Windows or Linux instances by using Alibaba Cloud CLI

To use this method, you do not need to connect to the instance but you must install Alibaba Cloud Command Line Interface (CLI) first. For more information about how to install Alibaba Cloud CLI in different operating systems, see the following topics:
Note You cannot use Alibaba Cloud CLI to install the Cloud Assistant client on instances that run RHEL.
  1. Call the DescribeCloudAssistantStatus operation to check whether the Cloud Assistant client is installed on your ECS instance.
    aliyun ecs DescribeCloudAssistantStatus --RegionId TheRegionId --InstanceId.1 i-bp1g6zv0ce8og******p --output cols=CloudAssistantStatus rows=InstanceCloudAssistantStatusSet.InstanceCloudAssistantStatus[]
    If the value of CloudAssistantStatus is true in the response, the Cloud Assistant client is installed on the instance. Otherwise, proceed to the next step.
  2. Call the InstallCloudAssistant operation to install the Cloud Assistant client.
    aliyun ecs InstallCloudAssistant --RegionId TheRegionId --InstanceId.1 i-bp1g6zv0ce8og******p
  3. Call the RebootInstance operation to restart the ECS instance.
    aliyun ecs RebootInstance --InstanceId i-bp1g6zv0ce8og******p
  4. If the instance is in the classic network, add a region declaration within the instance.
    1. Connect to the ECS instance as the administrator. For more information, see Connection methods.
    2. Check the version of Cloud Assistant.

      If the version of the Cloud Assistant client is later than 1.0.1.400, the Cloud Assistant client is installed. Otherwise, proceed to the next step.

    3. In the directory where the Cloud Assistant client is installed, create a file named region-id and do not add extensions such as .txt or .conf to the file.
    4. In the region-id file, enter the region ID of the instance. Example: cn-hangzhou.
    Note In Windows, you must clear the Hide extensions for known file types option to check whether the region-id file has an extension.

View information of the Cloud Assistant client on an ECS instance

After you install the Cloud Assistant client on an instance, you can perform the following steps to query the version number and state of the client on the instance.

  1. Log on to the ECS console.
  2. In the left-side navigation pane, choose Maintenance & Monitoring > ECS Cloud Assistant.
  3. In the top navigation bar, select a region.
  4. Click the ECS Instances tab to view the information about the Cloud Assistant client on the ECS instances within the current region.
    Query result