You can add Elastic Compute Service (ECS) instances that are associated with an application to different groups. This way, you can deploy different versions of the application in different groups. You can adjust traffic and perform canary release for the application by application instance group in the Enterprise Distributed Application Service (EDAS) console.
Overview of application instance groups
For example, you deploy the itemcenter application on 10 ECS instances and divide the instances into two groups: the default group and the beta group. The default group contains six instances and the beta group contains four instances. You can deploy different versions of the application in different instance groups.
When an application is created in the EDAS console, EDAS creates the default group for the application. The default group cannot be deleted.
The default group is sufficient for day-to-day use by the application. If your application is deployed in multiple versions, you can create other groups to adjust traffic for or perform canary release of specific versions.
When you deploy an application, we recommend that you use the Java Virtual Machine (JVM), Tomcat, launch template, and Server Load Balancer (SLB) configurations of the application instance group.
Create an application instance 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, you can perform canary release for the application. In this case, you must create an application instance group.
Log on to the EDAS console.
In the left-side navigation pane, choose . In the top navigation bar, select the region. In the upper part of the Applications page, select the microservice namespace from the Microservice Namespace drop-down list and then click the name of the desired application.
On the application details page, click the Instance Information tab. On the tab that appears, click Create Group in the upper-right corner.
In the Create Group dialog box, configure the Group Name and Deployment Package Version parameters, and click Create.
After you create the group, the message The group is created. appears on the top of the page.
Add an instance to an application instance group
After an application instance group is created, you can add an instance to the group by using one of the following methods:
Scale out the application. For more information, see Add ECS instances to an application that is deployed in an ECS cluster.
Move an instance from one group to another group.
On the Instance Information tab, find the instance that you want to manage and click Change Group in the Actions column.
In the Change Group dialog box, select a new group from the Target Group drop-down list, confirm the version information, specify a deployment policy, and then click OK.
The association among groups, instances, and application versions is complex. The following section describes the association:
If no application version is deployed in the new group, the application version of the instance, such as V1.0, is used as the default deployment version of the new group.
If an application version is deployed in the new group, such as V2.0, but the version is inconsistent with the application version V1.0 of the instance, the two versions are displayed in the Change Group dialog box. In this case, select one of the following deployment policies based on your business requirements:
If you want to use the application version V2.0 of the new group for the instance, set the Re-deployment parameter to Use Target Group Version for Re-deployment.
If you want to use the application version V1.0 of the instance, set the Re-deployment parameter to Change Group Without Re-deployment.
NoteIf the deployment package version of an instance is different from the deployment package version of the application instance group, a message appears.
View an application instance group
Log on to the EDAS console.
In the left-side navigation pane, choose . In the top navigation bar, select the region. In the upper part of the Applications page, select the microservice namespace from the Microservice Namespace drop-down list and then click the name of the desired application.
On the application details page, click the Instance Information tab. On the tab that appears, view the group information about the application and the deployment package version of each group.
Group information:
If an application is deployed in the group, the version of the last deployed package is displayed next to the group name.
Instances are displayed based on the groups to which the instances belong.
Configure JVM and Tomcat parameters for an application instance group
You can configure JVM and Tomcat parameters for an application instance group. You can also configure JVM and Tomcat parameters for an application. For more information, see Configure applications deployed in ECS clusters.
On the application details page, click the Instance Information tab. On the tab that appears, find the group that you want to manage and click Group Settings on the right side.
From the drop-down list, select JVM or Tomcat.
In the Group Settings dialog box, configure JVM parameters and click Configure JVM Parameters, or configure Tomcat parameters and click Configure Tomcat.
For more information about JVM and Tomcat parameters, see Configure applications deployed in ECS clusters.
Associate a launch template with an application instance group
A launch template is used to create an ECS instance within a few steps. You can associate a launch template with an application instance group to scale out ECS instances in the group in an efficient manner.
On the application details page, click the Instance Information tab. On the tab that appears, find the group that you want to manage and click Group Settings on the right side.
From the drop-down list, select Instance Launch Template.
In the Group Settings dialog box, select Bind Launch Template, specify a launch template and a template version, and then click Modify.
Delete an application instance group
You can delete an application instance group if the group does not contain instances and is no longer needed. Deleted groups cannot be recovered. Exercise caution when you delete a group.
On the application details page, click the Instance Information tab. On the tab that appears, find the group that you want to manage and click Delete Group on the right side.
In the Delete Group message, click Delete.