You can release an application that has a large number of instances or an application that has a complex service architecture in multiple phases. The application is upgraded on only a few instances in each phase. The phased release is complete when the application is upgraded on all the instances. This topic describes how to release an application in multiple phases in the Enterprise Distributed Application Service (EDAS) console.

Phased release overview

During a phased release, an application is upgraded on only a few instances in each phase. If an error occurs during a phased release, you can terminate the process and roll back the application. You can release the application again after the error is fixed.

When an application in a Kubernetes cluster is released in multiple phases, the instances of the application are evenly distributed to each phase. If the instances cannot be evenly distributed, the number of instances allocated to an earlier phase is smaller than the number of instances allocated to a later phase.

Scenario example

An application contains 10 instances. The application version on these instances is V1 and needs to be upgraded to V2.

The following figure shows the process of releasing the application to these instances in three phases.

ED分批发布示意图AS

Notes

If you release an application in a Kubernetes cluster in multiple phases, a Deployment is created for application deployment.

Procedure

  1. Log on to the EDAS console.
  2. In the left-side navigation pane, click Applications. In the top navigation bar, select a region. In the upper part of the page, select a namespace.
  3. In the Cluster Type drop-down list on the Applications page, select Container Service or Serverless Kubernetes Cluster. Then, click the application that you want to manage.
  4. On the Application Overview page, choose Deploy > Deploy in the upper-right corner.
  5. On the Select Deployment Mode page, click Start Deployment in the Phased Release section.
  6. On the Phased Release page, upload the application deployment package of the new version.
    Parameter Description
    Application Runtime Environment Default value: Standard Java Application Runtime Environment
    Java Environment Select Open JDK 8, Open JDK 7, JDK 8, JDK 7, or Dragonwell 8.
    Current Environment The environment in which the application is running. This parameter is available only for applications that are deployed by using JAR packages or WAR packages. EDAS automatically upgrades the Java environment or application runtime environment to the latest version.
    File Uploading Method You can select Upload JAR Package or JAR Package Address.
    Note The file upload method must be the same as that selected for the release of the last application version. The file types include JAR packages, WAR packages, and images. A JAR package is used in this example.
    Upload JAR Package If you select Upload JAR Package for File Uploading Method, click Select File to select a JAR package.
    JAR Package Address If you select JAR Package Address for File Uploading Method, enter a JAR package address.
    Note If you enter the URL of an OSS file that has a signature, EDAS caches the file for subsequent operations, such as rollbacks and scale-outs, when you deploy the application.
    Version Enter the version of the JAR package. You can also click Use Timestamp as Version Number on the right side so that the corresponding timestamp is automatically generated.
    Time Zone Specify the time zone of the specified region in UTC.
  7. Set Release Policy.
    Release policy for the phased release

    The following table lists the release policy parameters.

    Parameter Description
    Release Batch The number of phases. The application is released to the instances in multiple phases.
    Batch Mode The following options are available:
    • Automatic: The application is automatically released in multiple phases at the specified interval. Interval: The release interval of the remaining phases. Unit: minute.
    • Manual: If you select this option, you must manually trigger the release of the next phase.
    Note The Batch Mode parameter appears only if Release Batch is larger than 1.
    Deployment Interval Between Batches The interval between the release to one instance and the release to another instance if more than one instance is involved in a release phase. Unit: minute.
  8. Optional:You can determine whether to configure Scheduling Rules, Startup Command, Environment Variables, Persistent Storage, Local Storage, Application Life Cycle Management, and Log Collection Settings as needed. For more information, see Use an image to deploy an application in a and Configure advanced application settings (optional).
  9. After you set the parameters, click OK.

Verify the result

Go to the application details page. In the left-side navigation pane, click Change List to view the status of the phased release. If the application is released in all phases, the phased release is complete.

On the application details page, view the instance deployment information. If the instance version becomes V2 and all instances are in the Running state, the release is successful.

Roll back an application

During a phased release, if the application is not upgraded to the new version on one or more instances, the release is not complete. When you upgrade an application, if an application instance in the first phase stops responding, you can go to the Change Details page and click Roll Back Immediately to roll back the released instances to the previous service pack and configuration.

Exceptions may occur during a phased release. For information about how to troubleshoot and fix the problems, see How do I troubleshoot issues in a change process?.
  • Exceptions such as unavailable deployment packages or health check failures may lead to failures of application upgrades. The current application changes are automatically terminated and the application is rolled back.
  • During the upgrade, the maximum time-out period for a single phase is 30 minutes. If the change process is suspended due to a time-out, you must go to the Change Details page to terminate the release and roll back the application.