All Products
Search
Document Center

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

Last Updated:Jan 31, 2024

Cloud Assistant Agent is an agent that runs Cloud Assistant commands on Elastic Compute Service (ECS) instances. This topic describes how to upgrade and disable upgrades for Cloud Assistant Agent.

Prerequisites

Cloud Assistant Agent is installed on an ECS instance. For information about how to install Cloud Assistant Agent, see Install Cloud Assistant Agent.

Automatic upgrades

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.

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 these commands in the console. For information about how to run common commands by calling API operations or in a command-line interface (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 following common commands in their latest versions 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: Specify the time to execute the command. For more information, see Use the immediate execution feature.

    • Select Instance: Select the instance on which you want to upgrade Cloud Assistant Agent. The instance must be running and already have Cloud Assistant Agent installed.

      For more information about the parameters, see View and run common commands.

      If the execution result is similar to the following figure, Cloud Assistant Agent is upgraded. image.png

      Note

      If the command execution failed, 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 manually downloading the latest installation package. For more information, see Install Cloud Assistant Agent.

Example: Run the following command to download an 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 program 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 specified 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 updates

    To disable a specific version of Cloud Assistant Agent on an instance from checking for updates, find the installation directory of 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 updates, 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 updates:
      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 updates:
      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 updates:
      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 updates:
      touch /usr/local/share/aliyun-assist/config/disable_update
    Note

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