Cloud Assistant Agent is used to run Cloud Assistant commands on Elastic Compute Service (ECS) instances. This topic describes how to install Cloud Assistant Agent on ECS instances.
Prerequisites
The instance types and operating systems of the instances on which you want to install Cloud Assistant Agent support Cloud Assistant. For more information, see the Limits section in the "Overview" topic.
Background information
Cloud Assistant Agent is pre-installed on ECS instances that are created from public images on or after December 1, 2017.
For ECS instances created before December 1, 2017, you must manually install Cloud Assistant Agent.
After you register a server that is not provided by Alibaba Cloud as an Alibaba Cloud managed instance, you can use various online services of Alibaba Cloud, such as Cloud Assistant, CloudOps Orchestration Service (OOS), and Apsara Devops, on the managed instance. For more information, see Alibaba Cloud managed instances.
Install a version of Cloud Assistant Agent based on the features supported by Cloud Assistant. The following table describes the features that are supported by Cloud Assistant and the earliest supported version of Cloud Assistant Agent for each feature.
Feature supported by Cloud Assistant | Earliest supported version of Cloud Assistant Agent for Linux instances | Earliest supported version of Cloud Assistant Agent for Windows instances | References |
Report Cloud Assistant heartbeats | 1.0.2.458 | 1.0.0.149 | N/A |
Send files | 1.0.2.569 | 1.0.0.149 | |
Specify a username to use to run a command | 2.2.0.106 | 2.1.0.50 | |
Configure a command to run on next instance startup | 2.2.0.46 | 2.1.0.50 | |
Configure a command to run on every instance startup | |||
Session Manager | 2.2.3.196 | 2.1.3.196 | |
Use a rate expression or an at expression in the execution plan of a scheduled task | 2.2.3.282 | 2.1.3.282 | |
Specify a cron expression that includes a <Year> field or a <Time zone> field in the execution plan of a scheduled task | 2.2.3.282 | 2.1.3.282 | |
Specify built-in environment parameters | 2.2.3.309 | 2.1.3.309 | |
Use instance names as built-in environment parameters | 2.2.3.344 | 2.1.3.344 | |
Use specific exit codes to stop or restart instances | 2.2.3.317 | 2.1.3.317 | |
Specify the name of a container in which to run a command | 2.2.3.344 | 2.1.3.344 | |
Specify the ID of a container in which to run a command | 2.2.3.344 | 2.1.3.344 |
The following table describes the methods that you can use to install Cloud Assistant Agent 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 |
Note You cannot use Alibaba Cloud CLI to install Cloud Assistant Agent on RHEL. |
Other Linux operating systems |
|
Install Cloud Assistant Agent on a Windows instance
Connect to the instance as an administrator.
For more information, see Connection method overview.
Download Cloud Assistant Agent.
You can download a specific version of Cloud Assistant Agent from one of the following URLs:
Public URL for the latest version of Cloud Assistant Agent:
Public URL for a specific version of Cloud Assistant Agent:
https://aliyun-client-assist.oss-accelerate.aliyuncs.com/windows/aliyun_agent_{version}_setup.exe
Internal URL for the latest version of Cloud Assistant Agent:
https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/windows/aliyun_agent_latest_setup.exe
Internal URL for a specific version of Cloud Assistant Agent:
https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/windows/aliyun_agent_{version}_setup.exe
Note{version} indicates the version number of Cloud Assistant Agent.
{regionId} indicates the region ID of the instance on which you want to install Cloud Assistant Agent.
To query the region in which an instance resides, click the ID of the instance on the instance list page in the ECS console and view the value of the Region parameter in the Basic Information section of the Instance Details page. Then, you can query the ID of the region in the Regions and zones topic.
You can specify the following version numbers of Cloud Assistant Agent to download Cloud Assistant Agent from public or internal URLs:
Version numbers that can be specified in public URLs: 1.0.0.128, 2.1.2.181, 2.1.3.187, 2.1.3.221, 2.1.3.247, 2.1.3.256, 2.1.3.269, 2.1.3.282, 2.1.3.289, 2.1.3.326, 2.1.3.349, 2.1.3.372, and 2.1.3.398
Version numbers that can be specified in internal URLs: 1.0.0.128, 2.1.3.221, 2.1.3.247, 2.1.3.256, 2.1.3.265, 2.1.3.269, 2.1.3.282, 2.1.3.289, 2.1.3.326, 2.1.3.349, 2.1.3.372, and 2.1.3.398
For example, to download version 1.0.0.128 of Cloud Assistant Agent in the China (Hangzhou) region, access the following internal URL:
https://aliyun-client-assist-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/windows/aliyun_agent_1.0.0.128_setup.exe
Double-click the installation file of Cloud Assistant Agent. Then, install Cloud Assistant Agent as instructed.
For Windows instances, the default installation directory of Cloud Assistant Agent is C:\ProgramData\aliyun\assist\.
You can also integrate the above download and installation steps into a PowerShell script. The following script uses the internal URL for the latest version as an example. Replace the
{regionId}
with the Region ID of your instance.curl -UseBasicParsing -Uri https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/windows/aliyun_agent_latest_setup.exe -OutFile 'C:\\aliyun_agent_latest_setup.exe' &"C:\\aliyun_agent_latest_setup.exe" '/S'
(Optional) Perform the following operations if the network type of the ECS instance is classic network:
In the directory where Cloud Assistant Agent is installed, create a file named region-id. Do not add an extension, such as .txt or .conf, to the file name.
ImportantIn Windows, you must clear "Hide extensions for known file types" before you can check whether the region-id file has an extension.
In the region-id file, enter the region ID of the instance. Example: cn-hangzhou.
NoteTo query the region in which an instance resides, click the ID of the instance on the instance list page in the ECS console and view the value of the Region parameter in the Basic Information section of the Instance Details page. Then, you can query the ID of the region in the Regions and zones topic.
For example, the instance runs a Windows Server 2012 R2 operating system and resides in the China (Hangzhou) region whose ID is cn-hangzhou. The default installation directory of Cloud Assistant Agent on the instance is C:\ProgramData\aliyun\assist\. You must create the region-id file in the directory and enter cn-hangzhou in the file, as shown in the following figure.
Install Cloud Assistant Agent on a Linux instance
Use RPM packages
This installation method is applicable to Linux operating systems such as Alibaba Cloud Linux, CentOS, RHEL, and SUSE Linux.
Use a user that has sudo permissions to connect to a Linux instance.
For more information, see Connection method overview.
Download the Red Hat Package Manager (RPM) package for Cloud Assistant Agent.
Cloud Assistant Agent version
Download command
Public URL for the latest version
x86
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_latest.rpm"
ARM
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun-assist-latest-1.aarch64.rpm"
Public URL for a specific version
x86
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_{version}.rpm"
ARM
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun-assist-{version}-1.aarch64.rpm"
Internal URL for the latest version
x86
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_latest.rpm"
ARM
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun-assist-latest-1.aarch64.rpm"
Internal URL for a specific version
x86
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_{version}.rpm"
ARM
sudo 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 Cloud Assistant Agent.
{regionId} indicates the region ID of the instance on which you want to install Cloud Assistant Agent.
To query the region in which an instance resides, click the ID of the instance on the instance list page in the ECS console and view the value of the Region parameter in the Basic Information section of the Instance Details page. Then, you can query the ID of the region in the Regions and zones topic.
You can specify the following version numbers of Cloud Assistant Agent to download Cloud Assistant Agent from public or internal URLs:
Version numbers that can be specified in public URLs:
x86 architecture: 1.0.1.413, 1.0.1.414, 1.0.1.448, 1.0.1.450, 1.0.2.458, 1.0.2.479, 1.0.2.541, 1.0.2.569, 1.0.2.574, 2.2.0.102, 2.2.0.106, 2.2.2.181, 2.2.3.187, 2.2.3.221, 2.2.3.247, 2.2.3.256, 2.2.3.269, 2.2.3.282, 2.2.3.289, 2.2.3.326, 2.2.3.349, 2.2.3.372, and 2.2.3.398
ARM architecture: 2.4.3.282, 2.4.3.326, 2.4.3.349, 2.4.3.372, and 2.4.3.398
Version numbers that can be specified in internal URLs:
x86 architecture: 1.0.1.407, 1.0.2.458, 1.0.2.479, 2.2.3.221, 2.2.3.247, 2.2.3.256, 2.2.3.265, 2.2.3.269, 2.2.3.282, 2.2.3.289, 2.2.3.326, 2.2.3.349, 2.2.3.372, and 2.2.3.398
ARM architecture: 2.4.3.282, 2.4.3.326, 2.4.3.349, 2.4.3.372, and 2.4.3.398
For example, to download the RPM package for x86 version 1.0.2.458 of Cloud Assistant Agent in the China (Hangzhou) region, access the following internal URL:
sudo wget "https://aliyun-client-assist-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/linux/aliyun_assist_1.0.2.458.rpm"
Install Cloud Assistant Agent.
By default, Cloud Assistant Agent is installed in one of the following directories on Linux instances:
Default installation directory for CoreOS operating systems: /opt/local/share/aliyun-assist/
Default installation directory for other operating systems, such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE: /usr/local/share/aliyun-assist/
To install the latest version of Cloud Assistant Agent on an instance, run one of the following commands based on the operating system architecture of the instance:
x86
sudo rpm -ivh --force aliyun_assist_latest.rpm
ARM
sudo rpm -ivh --force aliyun-assist-latest-1.aarch64.rpm
Perform operations based on the operating system or network type of the instance.
If the instance runs a Red Hat operating system, perform the following operations:
Stop the qemu-ga service.
sudo systemctl stop qemu-guest-agent sudo systemctl disable qemu-guest-agent
Restart Cloud Assistant.
sudo systemctl restart aliyun.service
If the instance resides in the classic network, perform the following operations:
In the directory where Cloud Assistant Agent is installed, create a file named region-id and enter the region ID of the instance in the file. For example, to create the region-id file in the default installation directory and enter the region ID of the instance on which Cloud Assistant Agent is installed in the file, run one of the following commands based on the operating system of the instance:
CoreOS operating systems:
sudo sh -c 'echo "cn-hangzhou" > /opt/local/share/aliyun-assist/region-id'
Other Linux operating systems, such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE:
sudo sh -c 'echo "cn-hangzhou" > /usr/local/share/aliyun-assist/region-id'
If the sudo sh -c 'echo "cn-hangzhou" > /usr/local/share/aliyun-assist/region-id command is run, the following command output is returned.
Use DEB packages
This installation method is applicable to Linux operating systems such as Debian and Ubuntu.
Use a user that has sudo permissions to connect to a Linux instance.
For more information, see Connection method overview.
Download the Debian package (DEB package) for Cloud Assistant Agent.
Cloud Assistant Agent version
Download command
Public URL for the latest version
x86
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_latest.deb"
ARM
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun-assist_latest-1_arm64.deb"
Public URL for a specific version
x86
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_{version}.deb"
ARM
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun-assist_{version}-1_arm64.deb"
Internal URL for the latest version
x86
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_latest.deb"
ARM
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun-assist_latest-1_arm64.deb"
Internal URL for a specific version
x86
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_{version}.deb"
ARM
sudo 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 Cloud Assistant Agent.
{regionId} indicates the region ID of the instance on which you want to install Cloud Assistant Agent.
To query the region in which an instance resides, click the ID of the instance on the instance list page in the ECS console and view the value of the Region parameter in the Basic Information section of the Instance Details page. Then, you can query the ID of the region in the Regions and zones topic.
You can specify the following version numbers of Cloud Assistant Agent to download Cloud Assistant Agent from public or internal URLs:
Version numbers that can be specified in public URLs:
x86 architecture: 1.0.1.413, 1.0.1.414, 1.0.1.448, 1.0.1.450, 1.0.2.458, 1.0.2.479, 1.0.2.541, 1.0.2.569, 1.0.2.574, 2.2.0.102, 2.2.0.106, 2.2.2.181, 2.2.3.187, 2.2.3.221, 2.2.3.247, 2.2.3.256, 2.2.3.269, 2.2.3.282, 2.2.3.289, 2.2.3.326, 2.2.3.349, 2.2.3.372, and 2.2.3.398
ARM architecture: 2.4.3.282, 2.4.3.326, 2.4.3.349, 2.4.3.372, and 2.4.3.398
Version numbers that can be specified in internal URLs:
x86 architecture: 1.0.1.407, 1.0.2.458, 1.0.2.479, 2.2.3.221, 2.2.3.247, 2.2.3.256, 2.2.3.265, 2.2.3.269, 2.2.3.282, 2.2.3.289, 2.2.3.326, 2.2.3.349, 2.2.3.372, and 2.2.3.398
ARM architecture: 2.4.3.282, 2.4.3.326, 2.4.3.349, 2.4.3.372, and 2.4.3.398
For example, to download the DEB package for x86 version 1.0.2.458 of Cloud Assistant Agent in the China (Hangzhou) region, access the following internal URL:
sudo wget "https://aliyun-client-assist-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/linux/aliyun_assist_1.0.2.458.deb"
(Optional) If an earlier version of Cloud Assistant Agent is installed on the instance, uninstall the earlier version.
sudo dpkg -r aliyun-assist
Install Cloud Assistant Agent.
By default, Cloud Assistant Agent is installed in one of the following directories on Linux instances:
Default installation directory for CoreOS operating systems: /opt/local/share/aliyun-assist/
Default installation directory for other operating systems, such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE: /usr/local/share/aliyun-assist/
To install the latest version of Cloud Assistant Agent on an instance, run one of the following commands based on the operating system architecture of the instance:
x86
sudo dpkg -i aliyun_assist_latest.deb
ARM
sudo dpkg -i aliyun-assist_latest-1_arm64.deb
If the instance resides in the classic network, perform the following operations:
In the directory where Cloud Assistant Agent is installed, create a file named region-id and enter the region ID of the instance in the file. For example, to create the region-id file in the default installation directory and enter the region ID of the instance on which Cloud Assistant Agent is installed in the file, run one of the following commands based on the operating system of the instance:
CoreOS operating systems:
sudo sh -c 'echo "cn-hangzhou" > /opt/local/share/aliyun-assist/region-id'
Other Linux operating systems, such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE:
sudo sh -c 'echo "cn-hangzhou" > /usr/local/share/aliyun-assist/region-id'
If the sudo sh -c 'echo "cn-hangzhou" > /usr/local/share/aliyun-assist/region-id command is run, the following command output is returned.
Use binary packages
This installation method is applicable to mainstream Linux operating systems.
Use a user that has sudo permissions to connect to a Linux instance.
For more information, see Connection method overview.
Download the binary package for Cloud Assistant Agent.
Cloud Assistant Agent version
Download command
Public URL for the latest version
x86
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_latest_update.zip"
ARM
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun_assist_latest_update_arm.zip"
Public URL for a specific version
x86
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_{version}_update.zip"
ARM
sudo wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/arm/aliyun_assist_{version}_update_arm.zip"
Internal URL for the latest version
x86
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_latest_update.zip"
ARM
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/arm/aliyun_assist_latest_update_arm.zip"
Internal URL for a specific version
x86
sudo wget "https://aliyun-client-assist-{regionId}.oss-{regionId}-internal.aliyuncs.com/linux/aliyun_assist_{version}_update.zip"
ARM
sudo 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 Cloud Assistant Agent.
{regionId} indicates the region ID of the instance on which you want to install Cloud Assistant Agent.
To query the region in which an instance resides, click the ID of the instance on the instance list page in the ECS console and view the value of the Region parameter in the Basic Information section of the Instance Details page. Then, you can query the ID of the region in the Regions and zones topic.
You can specify the following version numbers of Cloud Assistant Agent to download Cloud Assistant Agent from public or internal URLs:
x86 architecture: 2.2.3.282, 2.2.3.289, 2.2.3.326, 2.2.3.349, 2.2.3.372, and 2.2.3.398
ARM architecture: 2.4.3.282, 2.4.3.326, 2.4.3.349, 2.4.3.372, and 2.4.3.398
For example, to download the binary package for x86 version 2.2.3.282 of Cloud Assistant Agent in the China (Hangzhou) region, access the following internal URL:
sudo wget "https://aliyun-client-assist-cn-hangzhou.oss-cn-hangzhou-internal.aliyuncs.com/linux/aliyun_assist_2.2.3.282_update.zip"
Install Cloud Assistant Agent.
By default, Cloud Assistant Agent is installed in one of the following directories on Linux instances:
Default installation directory for CoreOS operating systems: /opt/local/share/aliyun-assist/
Default installation directory for other operating systems, such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE: /usr/local/share/aliyun-assist/
Decompress the binary package to the installation directory and install Cloud Assistant Agent. For example, to install version 2.2.3.282 of Cloud Assistant Agent on an instance that uses an x86 operating system, run the following commands:
sudo unzip -o aliyun_assist_2.2.3.282_update.zip -d /usr/local/share/aliyun-assist/ sudo chmod a+x /usr/local/share/aliyun-assist/2.2.3.282/update_install sudo bash /usr/local/share/aliyun-assist/2.2.3.282/update_install
Perform operations based on the operating system or network type of the instance.
If the instance runs a Red Hat operating system, perform the following operations:
Stop the qemu-ga service.
sudo systemctl stop qemu-guest-agent sudo systemctl disable qemu-guest-agent
Restart Cloud Assistant.
sudo systemctl restart aliyun.service
If the instance resides in the classic network, perform the following operations:
In the directory where Cloud Assistant Agent is installed, create a file named region-id and enter the region ID of the instance in the file. For example, to create the region-id file in the default installation directory and enter the region ID of the instance on which Cloud Assistant Agent is installed in the file, run one of the following commands based on the operating system of the instance:
CoreOS operating systems:
sudo sh -c 'echo "cn-hangzhou" > /opt/local/share/aliyun-assist/region-id'
Other Linux operating systems, such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE:
sudo sh -c 'echo "cn-hangzhou" > /usr/local/share/aliyun-assist/region-id'
If the sudo sh -c 'echo "cn-hangzhou" > /usr/local/share/aliyun-assist/region-id command is run, the following command output is returned.
Use source code
Use a user that has sudo permissions to connect to a Linux instance.
For more information, see Connection method overview.
Install necessary software, such as Git and Go.
In this example, Yellowdog Updater, Modified (YUM) is used. If you use other Linux operating systems, use the corresponding package manager.
Install Git.
sudo yum install git -y
Install Go.
sudo yum install go -y
Download the source code for Cloud Assistant Agent.
sudo git clone https://github.com/aliyun/aliyun_assist_client
Access the directory where the source code is stored.
cd ./aliyun_assist_client
Compile the source code.
sudo go build
If no error message is returned, Cloud Assistant Agent is installed.
If the instance resides in the classic network, perform the following operations:
In the directory where Cloud Assistant Agent is installed, create a file named region-id and enter the region ID of the instance in the file. For example, to create the region-id file in the default installation directory and enter the region ID of the instance on which Cloud Assistant Agent is installed in the file, run one of the following commands based on the operating system of the instance:
CoreOS operating systems:
sudo sh -c 'echo "cn-hangzhou" > /opt/local/share/aliyun-assist/region-id'
Other Linux operating systems, such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE:
sudo sh -c 'echo "cn-hangzhou" > /usr/local/share/aliyun-assist/region-id'
If the sudo sh -c 'echo "cn-hangzhou" > /usr/local/share/aliyun-assist/region-id command is run, the following command output is returned.
Run Cloud Assistant Agent.
aliyun-service -d
Install Cloud Assistant Agent on Windows or Linux instances by using Alibaba Cloud CLI
To use this method, you do not need to connect to an instance but you must install Alibaba Cloud CLI on the instance. For information about how to install Alibaba Cloud CLI on different operating systems, see the following topics:
You cannot use Alibaba Cloud CLI to install Cloud Assistant Agent on RHEL.
Call the DescribeCloudAssistantStatus operation to check whether Cloud Assistant Agent is installed on your instance.
aliyun ecs DescribeCloudAssistantStatus --RegionId TheRegionId --InstanceId.1 i-bp1g6zv0ce8og******p --output cols=CloudAssistantStatus rows=InstanceCloudAssistantStatusSet.InstanceCloudAssistantStatus[]
If the value of the
CloudAssistantStatus
parameter is true in the response, Cloud Assistant Agent is installed on the instance. If the value of the CloudAssistantStatus parameter is false in the response, proceed to the next step.Call the InstallCloudAssistant operation to install Cloud Assistant Agent.
aliyun ecs InstallCloudAssistant --RegionId TheRegionId --InstanceId.1 i-bp1g6zv0ce8og******p
Call the RebootInstance operation to restart the instance.
aliyun ecs RebootInstance --InstanceId i-bp1g6zv0ce8og******p
If the instance is in the classic network, add a region declaration within the instance.
Connect to the ECS instance as the root user or an administrator.
For more information, see Connection method overview.
View the version of Cloud Assistant Agent.
For Linux instances, run the following command:
aliyun-service -v
For Windows instances, perform the operations that are described in Upgrade or disable upgrades for Cloud Assistant Agent.
If the version of Cloud Assistant Agent is later than 1.0.1.400, Cloud Assistant Agent is installed on the instance. If the version of Cloud Assistant Agent is 1.0.1.400 or earlier, proceed to the next step.
Create the region-id file and enter the region ID of the instance in the file.
Linux
In the directory where Cloud Assistant Agent is installed, create a file named region-id and enter the region ID of the instance in the file. For example, to create the region-id file in the default installation directory and enter the region ID of the instance on which Cloud Assistant Agent is installed in the file, run one of the following commands based on the operating system of the instance:
CoreOS operating systems:
sudo sh -c 'echo "cn-hangzhou" > /opt/local/share/aliyun-assist/region-id'
Other Linux operating systems, such as Alibaba Cloud Linux, Ubuntu, Debian, Red Hat, SUSE Linux Enterprise Server, and openSUSE:
sudo sh -c 'echo "cn-hangzhou" > /usr/local/share/aliyun-assist/region-id'
If the sudo sh -c 'echo "cn-hangzhou" > /usr/local/share/aliyun-assist/region-id command is run, the following command output is returned.
Windows
In the directory where Cloud Assistant Agent is installed, create a file named region-id. Do not add an extension, such as .txt or .conf, to the file name.
ImportantIn Windows, you must clear "Hide extensions for known file types" before you can check whether the region-id file has an extension.
In the region-id file, enter the region ID of the instance. Example: cn-hangzhou.
NoteTo query the region in which an instance resides, click the ID of the instance on the instance list page in the ECS console and view the value of the Region parameter in the Basic Information section of the Instance Details page. Then, you can query the ID of the region in the Regions and zones topic.
For example, the instance runs a Windows Server 2012 R2 operating system and resides in the China (Hangzhou) region whose ID is cn-hangzhou. The default installation directory of Cloud Assistant Agent on the instance is C:\ProgramData\aliyun\assist\. You must create the region-id file in the directory and enter cn-hangzhou in the file, as shown in the following figure.
View information about Cloud Assistant Agent on an instance
After you install Cloud Assistant Agent on an instance, you can perform the following steps to query the version number and status of Cloud Assistant Agent.
Log on to the ECS console.
In the left-side navigation pane, choose .
In the top navigation bar, select the region and resource group to which the resource belongs.
Click the ECS Instances tab to view information about Cloud Assistant Agent on the ECS instances in the current region.
Latest versions of Cloud Assistant Agent supported by specific kernel versions
Kernel version | Latest version of Cloud Assistant Agent supported by the kernel version |
Linux kernel version earlier than 2.6.32 |
|
Kernel version earlier than 12.x in FreeBSD 11 or earlier | 2.3.3.529 |