All Products
Search
Document Center

Elastic Compute Service:Upgrade or disable upgrades of Cloud Assistant Agent

Last Updated:May 07, 2024

The features supported by Cloud Assistant Agent vary based on the version of Cloud Assistant Agent. If the current version of Cloud Assistant Agent does not support a specific feature, you may need to upgrade Cloud Assistant Agent. This topic describes how to upgrade and disable upgrades of Cloud Assistant Agent.

For information about the features that are supported by Cloud Assistant Agent and the earliest supported version of Cloud Assistant Agent for each feature, see Install Cloud Assistant Agent.

Limits

  • Make sure that the Elastic Compute Service (ECS) instance on which you want to upgrade Cloud Assistant Agent is in the Running state.

  • Make sure that Cloud Assistant Agent is installed on the ECS instance. For information about how to install Cloud Assistant Agent, see Install Cloud Assistant Agent.

Automatic upgrades

By default, Cloud Assistant Agent runs the aliyun_assist_update upgrade process every 30 minutes. The process resides in one of the following paths:

  • Windows instances: C:\ProgramData\aliyun\assist\{version}\aliyun_assist_update.exe

  • Linux instances: /usr/local/share/aliyun-assist/{version}/aliyun_assist_update

Note

{version} indicates the version number of Cloud Assistant Agent.

You can specify time windows for Cloud Assistant Agent upgrades. To prevent business interruptions, we recommend that you perform upgrades during off-peak hours.

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Maintenance & Monitoring > Cloud Assistant.

  3. In the upper-right corner of the ECS Cloud Assistant page, click Configure.

    image

  4. In the Cloud Assistant Settings dialog box, click the Cloud Assistant Agent Upgrade Settings tab.

  5. Select Cloud Assistant Agent Upgrade Settings, configure Period Allowed for Upgrade and Time Zone, and then click Determine.

    Note

    You can specify up to five time windows, and each time window cannot be shorter than 1 hour.

    image

Manual upgrades

Upgrade by running common commands

If automatic upgrades do not take effect, you can run common commands to manually upgrade Cloud Assistant Agent.

Important

The following example shows how to run a common Cloud Assistant command in the ECS console. For information about how to run a common Cloud Assistant command by calling API operations or by using Alibaba Cloud CLI, see View and run common commands.

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Maintenance & Monitoring > Cloud Assistant.

  3. On the ECS Cloud Assistant page, click the Common Commands tab.

  4. Find the latest versions of the following common commands and click Run.

    • Linux instances: ACS-ECS-UpdateAliyunAssist-linux.sh

    • Windows instances: ACS-ECS-UpdateAliyunAssist-windows.ps1

      image.png

  5. In the Run Command panel, configure parameters as prompted and click Run.

    • Execution Plan: Configure when to run the command. For more information about how to configure this parameter, see the description of the parameter in Create and run a Cloud Assistant command.

    • Select Instance: Select the instances on which you want to upgrade Cloud Assistant Agent. The selected instances must be in the Running state and have Cloud Assistant Agent installed.

      For information about the other parameters in the Run Command panel, see View and run common commands.

      If the execution results shown in the following figure are returned, Cloud Assistant Agent is upgraded.image.png

      Note

      If the command failed to be run, check the error message and troubleshoot the issue. For more information, see Check execution results and troubleshoot common issues.

Upgrade by downloading an installation package

You can also upgrade Cloud Assistant Agent by downloading the latest installation package. For more information, see Install Cloud Assistant Agent.

Example: Run the following command to download a Red Hat Package Manager (RPM) package and install the latest version of Cloud Assistant Agent on an x86 Linux instance:

wget "https://aliyun-client-assist.oss-accelerate.aliyuncs.com/linux/aliyun_assist_latest.rpm" && sudo rpm -ivh --force aliyun_assist_latest.rpm

Disable upgrades

Disable the automatic upgrade process to disable upgrades for Cloud Assistant Agent

You can disable the aliyun_assist_update process to disable upgrades of Cloud Assistant Agent.

  • If the instance on which Cloud Assistant Agent is installed runs a Windows Server operating system, run the following command in PowerShell:

    Rename-Item -Path 'C:\ProgramData\aliyun\assist\{version}\aliyun_assist_update.exe'-NewName 'C:\ProgramData\aliyun\assist\{version}\aliyun_assist_update.exe.bk'
  • If the instance on which Cloud Assistant Agent is installed runs a Linux operating system, run the following command:

    mv /usr/local/share/aliyun-assist/{version}/aliyun_assist_update /usr/local/share/aliyun-assist/{version}/aliyun_assist_update.bk
Note

{version} indicates the version number of Cloud Assistant Agent.

Use a configuration file to disable upgrades for Cloud Assistant Agent

For Cloud Assistant Agent 2.2.1.140 or later on Linux instances and Cloud Assistant Agent 2.1.1.140 or later on Windows instances, you can disable upgrades by creating a configuration file in a specific directory.

  • Disable Cloud Assistant Agent from checking for upgrades on startup

    To disable a specific version of Cloud Assistant Agent on an instance from checking for upgrades on startup, find the installation directory of the Cloud Assistant Agent version and create the disable_bootstrap_update file in the config directory. To disable all versions of Cloud Assistant Agent on an instance from checking for upgrades on startup, find the general installation directory of all Cloud Assistant Agent versions and create the disable_bootstrap_update file in the config directory. You do not need to write data to the disable_bootstrap_update file.

    • If the instance on which Cloud Assistant Agent is installed runs a Windows Server operating system, run the following command in PowerShell:

      # For example, run the following command to disable a specific version of Cloud Assistant Agent from checking for upgrades on startup:
      New-Item -Path C:\ProgramData\aliyun\assist\{version}\config\disable_bootstrap_update
      # For example, run the following command to disable all versions of Cloud Assistant Agent from checking for upgrades on startup:
      New-Item -Path C:\ProgramData\aliyun\assist\config\disable_bootstrap_update
    • If the instance on which Cloud Assistant Agent is installed runs a Linux operating system, run the following command:

      # For example, run the following command to disable a specific version of Cloud Assistant Agent from checking for upgrades on startup:
      touch /usr/local/share/aliyun-assist/{version}/config/disable_bootstrap_update
      # For example, run the following command to disable all versions of Cloud Assistant Agent from checking for upgrades on startup:
      touch /usr/local/share/aliyun-assist/config/disable_bootstrap_update
    Note

    {version} indicates the version number of Cloud Assistant Agent.

  • Disable Cloud Assistant Agent from checking for upgrades

    To disable a specific version of Cloud Assistant Agent on an instance from checking for upgrades, find the installation directory of the Cloud Assistant Agent version and create the disable_update file in the config directory. To disable all versions of Cloud Assistant Agent on an instance from checking for upgrades, find the general installation directory of all Cloud Assistant Agent versions and create the disable_update file in the config directory. You do not need to write data to the disable_update file.

    • If the instance on which Cloud Assistant Agent is installed runs a Windows Server operating system, run the following command in PowerShell:

      # For example, run the following command to disable a specific version of Cloud Assistant Agent from checking for upgrades:
      New-Item -Path C:\ProgramData\aliyun\assist\{version}\config\disable_update
      # For example, run the following command to disable all versions of Cloud Assistant Agent from checking for upgrades:
      New-Item -Path C:\ProgramData\aliyun\assist\config\disable_update
    • If the instance on which Cloud Assistant Agent is installed runs a Linux operating system, run the following command:

      # For example, run the following command to disable a specific version of Cloud Assistant Agent from checking for upgrades:
      touch /usr/local/share/aliyun-assist/{version}/config/disable_update
      # For example, run the following command to disable all versions of Cloud Assistant Agent from checking for upgrades:
      touch /usr/local/share/aliyun-assist/config/disable_update
    Note

    {version} indicates the version number of Cloud Assistant Agent.