Upgrade an MSE agent

Updated at:
Copy as MD

When a new Microservices Engine (MSE) agent version is available, upgrade promptly. The upgrade method depends on your deployment environment.

EnvironmentUpgrade methodAutomatic upgrade
EDASRedeploy the application-
Kubernetes (no version pinned)Restart the application podYes (via ack-onepilot)
Kubernetes (version pinned)Update the pinned version, then restart the podNo
ECS or manual installationDownload the latest agent and replace the existing filesNo

Upgrade in EDAS environments

Redeploy the application to upgrade the Java agent in Enterprise Distributed Application Service (EDAS) environments.

Upgrade in Kubernetes environments

The upgrade path depends on whether a specific agent version is pinned to the application. To check your current configuration, see Specify the agent version.

No version pinned

The ack-onepilot component handles automatic MSE agent upgrades. Restart the application pod to pick up the latest agent version:

kubectl rollout restart deployment/<deployment-name> -n <namespace>

Version pinned

  1. Find the latest version or a non-expired version in Release notes for the Java agent. For version support timelines, see Manage the lifecycles of MSE component versions.

  2. Replace the pinned version in your configuration with the target version.

  3. Restart the application pod for the change to take effect:

       kubectl rollout restart deployment/<deployment-name> -n <namespace>
Note

If the agent version remains unchanged after you perform the preceding operations, a canary release rule may be configured on the server side. Submit a ticket for assistance.

Upgrade in ECS and other environments (manual installation)

Automatic upgrades are not supported in ECS or other environments where the MSE agent was installed manually.

  1. Back up the current agent directory. This allows a quick rollback if the new version causes issues.

       cp -r /path/to/current/agent /path/to/current/agent_backup_$(date +%Y%m%d)
  2. Download the latest AliyunJavaAgent.zip. Replace ${regionId} with the region ID of your deployment. For available region IDs, see Supported regions. For example, to download over the Internet in the Singapore region:

    NetworkDownload URL
    Internethttp://arms-apm-${regionId}.oss-${regionId}.aliyuncs.com/AliyunJavaAgent.zip
    VPChttp://arms-apm-${regionId}.oss-${regionId}-internal.aliyuncs.com/AliyunJavaAgent.zip
       wget http://arms-apm-ap-southeast-1.oss-ap-southeast-1.aliyuncs.com/AliyunJavaAgent.zip
  3. Extract the downloaded file and replace the existing agent directory with the new files.

       unzip AliyunJavaAgent.zip -d /path/to/agent/
  4. Restart the application.