A common application is an application deployed directly on an ECS instance. Only one common application can be deployed on each ECS instance.To publish a common application is to install an EDAS container on your ECS instance and then use a WAR/JAR package to deploy the application in the EDAS container.
Before creating an application on EDAS, you need to create resources.
Note: The ECS instance for publishing applications needs to be imported (install EDAS Agent and synchronize data to EDAS). If not, import an ECS instance first.
Log on to EDAS console。
Click Applications in the left-side navigation pane to go to the application list page.
Click Create Application in the upper-right corner of the Applications page.
In the Application Information page, enter application information and click Next Step: Application Configurations.
- Namespace: Select Region and Namespace from the drop-down list.If you do not select an option, the Default namespace is automatically selected.
- Cluster: Select an ECS cluster from the drop-down list.
- Type: The application type is determined by the cluster where the application is deployed. If you select an ECS cluster, the application type is Java application (that is, common application).
- Name: Enter the application name.
- Runtime Environment: Select the EDAS container version from the drop-down list. The latest version is selected by default.
- Java Environment: Select JDK 7 or JDK 8 from the drop-down list.
- Application Description: Enter basic information about the application. The description contains no more than 100 characters.
On the Application Configuration page, select Deployment Method and click New to add the instance as prompted.Click Create.
Deployment Method: You can select WAR or JAR.
Select Instances: Click New. In the Select the single-machine dialog box, select an ECS instance on the left, click > to add the instance to the area on the right, and click OK.
- If you click Create Blank Application without selecting any instance, you can create a blank application.Then you can click Scale Out, Add Instance, or Deploy Application to release the application.
- If you select an instance, click Create to create a blank application containing instances.Then you can click Deploy Application to release the application.
Deploy Now: This option is available only after you select an instance.
- If you select Deploy Now, you can deploy the application when you create it. For more information about parameter setting, see Deploy the application while creating it.
- If you do not select Deploy Now, you can click Deploy Application on the Application Details page after you create the application to deploy the application.
In the Application Creation Complete tab, click Application Details to view the basic information and instance information about the application.
Deploy the application while creating itWAR package deployment and JAR package deployment are similar in the configuration procedure. The following describes WAR package deployment as an example.
File Upload Method: You can select Upload WAR Package or WAR Location.
Upload WAR Package: Click Select and select a WAR package to upload.
If you select WAR Location, enter the WAR package address in the configuration bar.
Enter a version number: Set the version (for example, 1.1.0). We recommend that you do not use the timestamp as a version number.
Application Health Check (optional): Configure the URL, port, and configuration file for health check.The system checks health of the application after the container is started or when the container is running to verify whether the application is normal, and executes service routing based on the health check result.The default URL is http://127.0.0.1:8080/healthCheck.html.
Batch: If you select more than two batches, you need to set the batch time.
Batch Mode: Select Automatic.
Server Load Balancer distributes application access traffic to ECS instances based on a forwarding policy. This enhances the service capabilities and availability of applications.If your application is deployed on multiple ECS instances, we suggest configuring Server Load Balancer.
Today, most applications are deployed on VPCs.To open your application on the Internet, you must use Server Load Balancer (Internet).
Go to the Basic Information tab of the Application Details page. In the Application Settings area, click Add of Server Load Balancer (Internet) or Server Load Balancer (Intranet).
In the Bind Server Load Balancer to Application dialog box, set the Server Load Balancer parameters and then click Configure Server Load Balancer.
- SLB: Select the intranet or Internet Server Load Balancer address from the drop-down menu.
- Use the virtual server group: A virtual server group is a group of frontend ECS instances used to process requests distributed by Server Load Balancer.Listeners can be associated with different virtual server groups to monitor request forwarding.If you select Use Virtual Server Group, you must configure the Virtual Server Group parameter.
- Virtual Server Group: Select an existing virtual server group from the drop-down menu.If no virtual server group is available, click Create Virtual Server Group from the drop-down menu.
- Virtual Server Group Name: Enter the name for the new virtual server group if you select Create Virtual Server Group.The system creates a virtual server group with the specified name.
Listener: Server Load Balancer listeners regulate how requests are forwarded to backend servers.At least one listener must be created for each Server Load Balancer instance.You can select a listening port from the Listener drop-down menu.If no listener has been created, click Create Listener.
- SLB Frontend Protocol: The default setting is TCP, which cannot be configured manually.
- SLB Frontend Port: Enter the frontend port of the Server Load Balancer instance.
Application Port: The default setting is 8080 and cannot be changed.
Note: Do not delete the listener in the SLB console; otherwise, the application cannot be accessed normally.
Check the status of the ECS instance in the Instance Information tab of the Application Details page.If the status/time is Normal, then the application has been published successfully.
To open your application on the Internet, you must configure Server Load Balancer (Internet).Go to the Basic Information tab on the Application Details page. In the Application Settings area, copy the Server Load Balancer (Internet) IP Address and Port, for example, 22.214.171.124:81. Then, paste it in your browser and press Enter.If the Welcome page of the application is displayed, this also indicates that the application has been successfully released.