To update a Spring Cloud or Dubbo microservices application that is deployed in an Elastic Compute Service (ECS) cluster, you can release the application in canary mode to verify the new version on a small number of instances. If the verification is successful, you can update the application on all instances.
Prerequisites
Before you release an application in canary mode, make sure that the application contains at least two instance groups and at least two instance groups contain instances. For more information about how to create instance groups and add ECS instances to the instance groups, see Manage instance groups for an application deployed in an ECS cluster in the EDAS console.Limits
- High-Speed Service Framework (HSF) applications: Canary release is not supported.
- Dubbo applications: You can implement canary releases of Dubbo applications without limits.
- Spring Cloud applications: If you use Deployment.Metadata.Name or Deployment.Metadata.Uid to configure some features of an application, do not implement a canary release for the application. Otherwise, the native features of the application may be abnormal after the canary release.
Procedure
- Log on to the EDAS console.
- In the left-side navigation pane, choose .
- In the top navigation bar, select a region. On the Applications page, select a microservices namespace and click the name of the application that you want to release in canary mode.
- On the Basic Information page, click Deploy in the upper-right corner.
- On the Select Deployment Mode page, click Start Deployment in the upper-right corner of the Canary Release (Phased) section.
- On the Canary Release page, upload the deployment package of the new application version, set the canary release policy and rules, and then click OK.
After the canary release is started, the new application version is deployed to the specified instance group. On the Basic Information tab, the message A change process is ongoing for this application. The application is in Executing state appears. Click View Details. On the Change Details page, view the deployment progress and status.
If you stop the change, the following message appears: The application is in the canary release state and this change has been stopped. Please roll back the application before you perform other operations.
- You can check whether the traffic is distributed as expected. For more information, see Monitor canary traffic.
- After the traffic verification is complete, click Start Next Batch on the Change Details page. Complete the subsequent phased release.
If an issue occurs during the verification process, click Stop Change in the upper-right corner of the Change Details page. After the change is stopped, on the Basic Information tab, the following message appears: The application is in the canary release state and this change has been stopped. Please roll back the application before you perform other operations.
Verify the result
After the canary release is complete, check whether Deployment Package is of the new version on the Basic Information tab. On the Instance Information tab, check whether the instances are in the Normal state.