You can group Elastic Compute Service (ECS) instances deployed with an application so that you can deploy different versions of the application in different groups. You can adjust traffic and perform canary release based on instance groups.

Instance groups

For example, the itemcenter application is deployed on 10 ECS instances that are divided into two groups: the default group and the beta group. The default group includes six instances and the beta group includes four instances. Now, you can deploy different versions of the application to the two instance groups.

Note
  • When an application is created in Enterprise Distributed Application Service (EDAS), EDAS creates a default group for the application. The default group cannot be deleted.
  • If you do not need to adjust traffic or perform canary release for multi-version deployment, we recommend that you use the default group without the need to create other groups.

Create a group

If a new version of an application is released and you want to verify the new version without affecting the traffic in the production environment, canary release is usually used. In this case, you must create a group for the application.

  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. On the Applications page, click the name of the desired application.
  3. On the application details page, click the Instance Information tab. On the tab that appears, click Create Group in the upper-right corner.
  4. In the Create Group dialog box, enter a name in the Group Name field and click Create.
    After the group is created, the message The group is created. appears on the top of the page.

Add an instance

After a group is created, you can add instances to the new group by using one of the following methods: Scale Out and Change Group. Perform the following steps:

  • For more information about how to add an instance to a group by using the Scale Out method, see Add instances to applications that are deployed in ECS clusters.
  • Click Change Group to add an instance to a new group.
    1. On the Instance Information tab, click Change Group in the Actions column.
    2. In the Change Group dialog box, select a group from the Target Group drop-down list, confirm the information or select a deployment policy, and then click OK.

      The association among groups, instances, and application versions is complex. The following section describes the association in detail.

      • If no application version is deployed to the new group, the application version V1.0 of the current instance is used as the default deployment version for the new group.
      • If an application version is deployed to the new group, such as V2.0, but the version is inconsistent with the application version V1.0 of the current instance, the two versions are displayed in the Change Group dialog box. You can select different deployment policies as needed.
        • If you want to deploy the application version V2.0 in the new group to the instance, select Re-deploy the current instance using the target group's version.
        • If you want to continue using the application version V1.0 that is deployed on this instance, select Change Group Only Without Re-deployment.
        Note If the deployment package version for the instance is different from that of its group, a prompt appears.

View groups

  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. On the Applications page, click the name of the desired application.
  3. On the application details page, click the Instance Information tab. On the tab that appears, view the instance group information of the application and the deployment package version in each group.
    Group information:
    • No deployment package version is available for the new group.
    • If an application is deployed in this group, the deployment package version that is last deployed is displayed after the group name.
    • Application instances are displayed based on instance groups to which they belong.

Set JVM and Tomcat parameters for the group

You can set JVM and Tomcat parameters for groups, or set JVM and Tomcat parameters for an application. For more information, see Configure applications deployed in ECS clusters.

  1. On the application details page, click the Instance Information tab, and click Group Settings next to a group.
  2. From the drop-down list, select JVM or Tomcat.
  3. In the Group Settings dialog box, set the JVM or Tomcat parameters, and then click Configure JVM Parameters or Configure Tomcat.
    For more information about JVM and Tomcat parameters, see Configure applications deployed in ECS clusters.

Bind an instance startup template

You can bind an instance startup template to an instance group of an application to scale out ECS instances.

  1. On the application details page, click the Instance Information tab, and click Group Settings next to a group.
  2. In the drop-down list, click Instance Launch Template.
  3. In the Group Settings dialog box, select Binding Launch Template, select an instance startup template and a version, and then click Modify.

Delete a group

You can delete a group if the group does not contain instances and is no longer needed. Deleted groups cannot be restored. Exercise caution when you perform this operation.

  1. On the application details page, click the Instance Information tab, and click Delete Group next to a group.
  2. In the Delete Group message, click Delete.