Enterprise Distributed Application Service (EDAS) allows you to create and deploy applications in Elastic Compute Service (ECS) clusters.
Prerequisites
Auto Scaling is activated and authorized to access resources of other cloud services. For more information, see Grant permissions to Auto Scaling.
An ECS cluster is created. For more information, see Create an ECS cluster in the EDAS console.
Create and deploy an application in an ECS cluster
Log on to the EDAS console.
In the left-side navigation pane, choose .
In the top navigation bar of the Applications page, select the region in which you want to create and deploy an application. In the upper part of the page, select the microservices namespace that you want to use. Then, click Create Application in the upper-left corner of the page.
In the Create Application wizard, configure basic information about the application that you want to create in the Basic Information step, and click Next to go to the Configurations step.
In the Configurations step, specify the deployment package source and instance source, and click Next.
Parameter
Description
Source of Deployment Package
Custom Program
To deploy an existing application to EDAS, you must configure the File Uploading Method parameter.
Upload JAR Package, Upload WAR Package, or Upload Deploy Package: Select an on-premises application package and upload it.
JAR Package Address, WAR Package Address, or Deploy Package Address: Enter the public URL of your deployment package.
Official Demo
EDAS provides a pair of application demos in the Spring Cloud, Apache Dubbo, and HSF frameworks to help you create and deploy applications. For more information, see Get started with EDAS.
Do Not Deploy
The system creates an application and generates its basic information. However, the system does not deploy the application.
Instance Source
Purchase Instance: EDAS purchases ECS instances for you.
Use Existing Instance: Use existing idle instances in your cluster.
Environment
Default Environment
Create a default cluster in the default microservices namespace. The cluster uses the default virtual private cloud (VPC) in the current region.
Custom Environment
From the Microservices Namespace and Cluster drop-down lists, select the microservices namespace and cluster that you created. If no microservices namespaces or clusters are created, you can click Create Microservices Namespace or Create Cluster to create a microservices namespace or a cluster.
Purchase Method
Purchase Based on Recommended Specifications
Select instance specifications based on your business requirements, configure the Quantity and Logon Password parameters, and then select the check box to agree to Elastic Compute Service Terms of Service | Terms of Service for Images.
Purchase Based on Existing Instance Specifications
Select an instance in the Select Template Instance section as the template, configure the Recycling Mode, Password, and Quantity parameters, and then select the check box to agree to Elastic Compute Service Terms of Service | Terms of Service for Images.
Purchase Based on Instance Launch Template
Select an instance launch template, configure the Recycling Mode and Quantity parameters, and then select the check box to agree to Elastic Compute Service Terms of Service | Terms of Service for Images.
In the Advanced Settings step, configure the Version and Application Health Check parameters, and click Create Application.
In the Creation Completed step, confirm the information in the Basic Information, Configurations, and Advanced Settings sections, and then click Create Application.
At the top of the Basic Information page, click View Details. You can view the change process on the Change Details page. Wait several minutes until the application is deployed. Then, check the instance status on the Instance Information tab of the Basic Information page. If the instance is in the Normal state, the application is deployed.
Configure an Internet-facing SLB instance
The application is created and deployed in a VPC. Therefore, the application does not have a public IP address by default. If you want to access your application over the Internet, we recommend that you configure an Internet-facing Server Load Balancer (SLB) instance for the application.
Then, EDAS enables the session persistence feature for HTTP listeners. The feature cannot be disabled.
Log on to the EDAS console.
In the left-side navigation pane, choose .
In the top navigation bar of the Applications page, select the region in which your application resides. In the upper part of the page, select the microservices namespace of your application and select ECS Clusters from the Cluster Type drop-down list. Then, click the name of the application for which you want to configure an Internet-facing SLB instance.
In the Application Settings section of the Basic Information tab, click Add next to SLB (Internet).
In the Add Load Balancing (Public) dialog box, configure the SLB parameters as prompted. For more information, see Configure a dedicated SLB instance for an application.
Copy the public IP address and port of the configured Internet-facing SLB instance, such as
39.XX.XX.65:81
, and paste it into the browser address bar. Then, press the Enter key to go to the web page of the application.
Limits on system configurations of an ECS instance
After the application is created, you may log on to an ECS instance of the application to configure the instance. Take note of the following limits during the configuration:
You cannot delete the admin user.
You cannot delete the /home/admin configuration.
You cannot stop the following processes on the ECS instance:
/home/staragent/bin/staragentd
com.alibaba.edas.agent.AgentDaemon
You cannot delete the following crontab files on the ECS instance:
bash /home/admin/edas-agent/bin/monitor.sh crontab file of the root user
bash /home/admin/edas-agent/bin/rotator.sh crontab file of the admin user
You must reserve enough free space in the root disk partition.
If you use the CentOS operating system, make sure that you correctly configure yum repositories.
If the ECS instance has multiple network interface controllers (NICs) and the application that you use is a High-Speed Service Framework (HSF) application, you must specify the -Dhsf.server.ip parameter for the application to ensure that the registered IP address works. For example, the ECS instance has multiple NICs if Docker is installed. For more information, see Set JVM -D startup parameters.
The time clock of the ECS instance must be accurate. The maximum error cannot exceed 15 seconds. Otherwise, the access from the application to the EDAS registry will be affected.
Custom OpenJDK versions
EDAS allows you to install a custom OpenJDK version to deploy an application to an ECS instance. When the ECS instance is being created, the installation command that you enter is run.
The custom OpenJDK version that can be installed varies based on the operating system that you use. The following section uses the aliyun_3_x64_20G_alibase_20210910.vhd
system image as an example to describe how to install an OpenJDK version.
For applications that are deployed on ECS instances, you must install Java Development Kit (JDK) and pass environment variables into Java or Jar commands. You can view the command output only after you enter java or jar commands in the CLI.
Query the minor versions of built-in OpenJDK 8.
Run one of the following commands on your ECS instance to query the minor versions of OpenJDK 8 provided by the operating system image:
# Search for jre. yum search --showduplicates java-1.8.0-openjdk # Search for jdk. yum search --showduplicates java-1.8.0-openjdk | grep devel
Sample query results:
java-1.8.0-openjdk-1:1.8.0.292.b10-0.1.al8.x86_64 : OpenJDK 8 Runtime Environment java-1.8.0-openjdk-1:1.8.0.292.b10-0.1.al8.x86_64 : OpenJDK 8 Runtime Environment java-1.8.0-openjdk-1:1.8.0.302.b08-0.1.al8.x86_64 : OpenJDK 8 Runtime Environment java-1.8.0-openjdk-1:1.8.0.312.b07-2.al8.x86_64 : OpenJDK 8 Runtime Environment java-1.8.0-openjdk-1:1.8.0.322.b06-2.al8.x86_64 : OpenJDK 8 Runtime Environment java-1.8.0-openjdk-1:1.8.0.272.b10-1.1.al8.x86_64 : OpenJDK Runtime Environment 8
This system image allows you to install OpenJDK 8 of the preceding minor versions by using Yellowdog Updater, Modified (YUM).
Install an OpenJDK 8 minor version.
Run the following command on your ECS instance to install a custom minor version of OpenJDK. Then, run the java -version command to view the installation result. If a version of OpenJDK is returned, the custom minor version of OpenJDK is installed.
yum install -y java-1.8.0-openjdk-1:1.8.0.302.b08-0.1.al8.x86_64 java-1.8.0-openjdk-devel-1:1.8.0.302.b08-0.1.al8.x86_64