If your application has a large scale and a complex architecture, you can upgrade it in stages. Each time, only some of the application instances are upgraded. This continues until all application instances are upgraded. This topic describes how to use the Enterprise Distributed Application Service (EDAS) console to release an application in stages.

Background information

If an application has multiple instances, it can be released in stages. An ECS cluster may contain instance groups. Each group has multiple application instances. You can also release the application in stages by instance group.

Procedure

  1. Log on to the EDAS console.
  2. In the left-side navigation pane, click Applications.
  3. On the Applications page, select a region in the top navigation bar and select a namespace from the Namespace drop-down list. From the Cluster Type drop-down list, select ECS Cluster. Then, click the name of the required application in the application list.
  4. On the Basic Information page of the application, click Deploy Application in the upper-right corner.
  5. On the Select Deployment Mode page, click Start Deployment next to Regular Release (Single-batch/Multi-batch).
  6. On the Regular Release (Single-batch/Multi-batch) page, set the deployment package and other required parameters for the current version of the application, and specify the release policy. Then, click OK.
    1. Set the deployment package and other parameters for the current version of the application.
      Parameter Description
      Deployment Method The deployment method of the application is used when the application is deployed for the first time. This method cannot be modified. For example, a JAR package is used when the application is deployed for the first time. You can specify only JAR as the deployment method when you upgrade the application.
      Note If you set Deployment Method to Historical Versions, the application is rolled back to its previous version. For more information, see Roll back an application.
      File Uploading Method You can upload a JAR or WAR package, or specify a JAR or WAR package address. The deployment package type depends on the deployment package that is used when you deploy the application for the first time.
      • If you select Upload JAR Package or Upload WAR Package, click Select File and upload the deployment package of the current application version.
      • If you select JAR Package Address or WAR Package Address, enter the IP address of the deployment package in the field. However, you must first upload the application to a cloud service, such as Object Storage Service (OSS).
      Version The current application version. You can enter the version number or click Use Timestamp as Version Number.
      Description The description of the current version.
    2. Configure a release policy.
      Parameter Description
      Group The instance groups on which you want to release the application in stages.
      • If the current application has only one group, select All Groups from the Group drop-down list. The maximum number of instances of the current application is displayed in the bracket after All Groups. The Group drop-down list also includes Default Group, which is the same as All Groups.
      • If the current application has multiple groups, select a group as needed.
        Note If you select All Groups, all instances in all groups of the application are upgraded based on the Batches per Group parameter set below.
      Batches per Group The number of batches in the group. The minimum number of instances in a single batch is 1. The default number of instances in a single batch is 2. You can specify this parameter based on your business requirements.
      Batch Mode The method that is used to perform the release of the next batch. Valid values: Automatic and Manual.
      • Automatic: The next batch is automatically released based on the Wait Time Before Next Batch parameter.
      • Manual: The next batch is manually released.
      Wait Time Before Next Batch The interval between release batches. Unit: minutes. You can select an interval from the drop-down list based on your business requirements.
      Java Environment The Java environment for the current version of the application. Valid values: Open JDK 8, Open JDK 7, and Dragonwell 8. Set this parameter as needed.
      Note After the release policy is set, the script of the current release policy is generated in the Generate Maven Plug-in Configuration section. If you use the toolkit-maven-plugin plug-in to release the application in stages, you can directly use the plug-in in the script.
    3. Click OK.
      After the release is started, the Change Details page appears. On the Change Details page, you can view the progress and status of the release. For more information, see View application changes.

Verify the result

  1. View change records.
    1. On the application details page, click Change Records in the left-side navigation pane.
    2. On the Change Records page, check whether the value in the Change Status column is Executed.
      • If the value is Executed, the application is released.
      • If the value is Execute failed, the application fails to be released. You can click View in the Actions column to view the change records and troubleshoot the problem.
  2. View application details.
    1. On the application details page, click Basic Information in the left-side navigation pane.
    2. On the Basic Information page, click the Basic Information tab. In the Application Information section of the Basic Information tab, check whether the Deployment Package parameter indicates the latest deployment package.
    3. On the Basic Information page, click the Instance Information tab. On the Instance Information tab, check whether the value of the Running Status parameter is Normal.