To demonstrate how to deploy microservice-oriented applications in Enterprise Distributed Application Service (EDAS), EDAS provides sample microservice-oriented applications based on Spring Cloud, Dubbo, and High-speed Service Framework (HSF). This topic describes how to deploy an HSF microservice-oriented application in an Elastic Compute Service (ECS) instance that is purchased based on the existing example specifications or the instance startup template in the default environment. The default environment indicates that the default Virtual Private Cloud (VPC) and cluster are used.
- Activate EDAS
- You have activated and granted permissions to the Auto Scaling service. For more information, see Step 1. Activate and authorize the Auto Scaling service.
The sample microservice-oriented application requires a service provider and a service consumer. The following describes how to create a service provider. You can follow a similar procedure to create a service consumer.
- Log on to the EDAS console.
- On the Overview page, click Create New Application in the Applications section.
- On the Create Application page, click the Application Information tab, enter the following information, and then click Next.
- Cluster Type: Select ECS Cluster.
- Application Runtime Environment: Select EDAS-Container (HSF).
- Java Environment: Select Open JDK 8.
- Container Version: Select EDAS-Container 3.5.4.
- Application Name: Enter the name of the application.
- (Optional) Application Description: Enter application description.
- On the Application Configuration tab, enter the following information and click Next.
- Deployment Package Source: select Official Demo.
- Demo Type: select HSF Service-side Applications from the list.
- Instances: select Default Purchasing.
Selecting this item means you will purchase instances with default specifications (2 cores, 4 GB memory) in the current namespace of the default VPC and default cluster. The current namespace, default VPC, and default cluster are described as follows:
- Current namespace:
- If you have selected a namespace on the top of the Applications page, use the selected namespace.
- If you do not select a namespace on the top of the Applications page or you access from the Overview page, use the default namespace.
- Default VPC:
- Use the default VPC instance in VPC. If no such VPC instance is available:
- Use the default VPC named edas-default-vpc in EDAS. If no such VPC is available:
- Create a VPC named edas-default-vpc and use it. If the creation fails due to reasons such as the VPC quota:
- Select one of your existing VPC instances.
- Default cluster:
- Use the cluster named default cluster under the selected namespace and VPC. If no such cluster is available:
- Create a cluster named default under the selected namespace and VPC and use it as the default cluster.
- Current namespace:
- On the Apply Advanced Settings tab, enter the following information and then click Create Application.
- Version: the current timestamp is used as the version of an EDAS configuration by default,
in the format of
yyyymmdd:hhmmss. You can also specify other version IDs.
- (Optional) Application Health Check: set the URL of the health check to check whether the application is healthy.
- Version: the current timestamp is used as the version of an EDAS configuration by default, in the format of
- On the Application Creation Complete tab, check the application information, application configuration, and advanced settings, and then click Confirm to Create Application.
Verify the result
After you perform the preceding steps, EDAS automatically creates a change record for this application. You can view the application creation progress and status in change details. After the application is created, Execution Successful appears in the change record, and you can see that:
- On the Basic Information tab, the application information displayed is the same as that specified when you created it.
- On the Instance Information tab, the runtime status is Normal, and Change Status is Successful. In addition, the ID, IP address, specifications, and VPC information of the purchased ECS instance are displayed.