EDAS Agent is a daemon that runs on ECS instances and handles communication between an EDAS cluster and deployed applications. EDAS deploys applications only on ECS instances that have EDAS Agent installed, including initial installation and scale-out. Install EDAS Agent before deploying applications to an ECS instance.
EDAS Agent provides the following capabilities:
Application lifecycle management: deploys, starts, and stops applications.
Status reporting: reports application liveness status, health check status, and Ali-Tomcat container status.
Information retrieval: retrieves monitoring information of ECS instances and containers.
Prerequisites
Before you begin, ensure that you have:
An ECS instance running 64-bit CentOS 7.0 or later
Root user access to the ECS instance (required for the command script method)
Choose an installation method
Three methods are available. Choose the one that fits your scenario.
|
Criteria |
EDAS base image |
Import ECS |
Command script |
|
Best for |
New ECS purchases |
Existing unmanaged ECS instances |
Custom JDK versions or existing instances |
|
Disk formatting |
Yes |
Yes (with image conversion) / No (direct import) |
No |
|
Default JDK |
JDK 8 |
JDK 8 |
JDK 8 (supports JDK 7 via |
By default, EDAS Agent installs Java Development Kit (JDK) 8. To use JDK 7 or other versions, use the command script method.
The EDAS Agent status varies based on the image and cluster type that you select. The EDAS Agent status determines the types of applications that can be deployed on the ECS instance. Follow the instructions for the installation method that you use.
Install via EDAS base image
Select the EDAS base image when purchasing a new ECS instance. This method installs EDAS Agent in a single step.
This method formats disks. To avoid disk formatting, use the command script method instead.
Log in to the EDAS console.
In the left-side navigation pane, choose Resource Management > ECS.
On the ECS page, click Create Instance in the upper-right corner.
In the Image section of the ECS purchase page, select Marketplace Images and click Select from Alibaba Cloud Marketplace (with Operating System).
In the Alibaba Cloud Marketplace dialog box, enter EDAS in the search box and click Search.
In the search results, select EDAS Java Environment (Common ECS). The latest version is selected by default. Do not select earlier versions. Click Use.
Complete the ECS purchase by following the on-screen instructions.
Install via ECS import
If you have an ECS instance that was not purchased with the EDAS Java Environment (Common ECS) image, import it through the EDAS console. You can import an instance directly or by using an image.
Import restrictions
An ECS instance cannot be imported if any of the following conditions apply:
The instance was created before December 1, 2017.
The instance was created in the classic network and is being imported to a cluster that uses the classic network.
The instance is stopped, starting, or stopping.
The instance is Windows-based or does not support simple Shell commands.
The instance is not imported from an ECS cluster.
If you use an ECS image, the disks on the ECS instance are formatted. To avoid disk formatting, use the command script method instead.
Procedure
Log in to the EDAS console.
In the left-side navigation pane, choose Resource Management > ECS.
On the ECS page, select a region in the top navigation bar and optionally select a microservices namespace from the Microservices Namespace drop-down list. Then click Import ECS in the upper-right corner.
-
In the Select Cluster and Existing ECS Instances step of the Import ECS wizard, select a microservices namespace and the destination cluster. Select the ECS instance from the list, and click Next.
If the instance is not listed, click Synchronize ECS to refresh the list.
If you have not created a destination cluster, click Create Cluster next to the Select Destination Cluster drop-down list.
To install EDAS Agent manually instead, click Switch to Manual Installation in the upper-right corner. Then run a command script to install EDAS Agent.
-
In the Ready to Import step, review the instance information and proceed based on the import type:
Instances that can be imported directly: These appear in the The following instances can be imported directly without conversion (expected conversion time is 10 seconds) section. Click Confirm and Import.
Instances that require conversion: If Cloud Assistant is not installed or not working as expected, the instance must be converted before import. Select I agree to convert the preceding instances that need to be imported, and I understand that the data in the original system will be lost after the conversion, enter the new root user logon password, and click Confirm and Import.
Ubuntu-based instances in the classic network: Manually run a script before importing the instance.
-
In the Import step, monitor the import progress:
If the instance is imported directly, wait for the Directly imported. message, then click Back to Cluster Details. The import is complete when the ECS instance status changes to Running.
If the instance is imported by using an image, the status shows Converting. It might take...
If you click Back to Cluster Details before the import finishes, the health check status displays Converting. When the import completes, the status changes to Running.
Install via command script
Use a command script to manually install EDAS Agent on an ECS instance in an ECS cluster. This is the only method that supports custom JDK versions.
Before running the script, note the following:
Log on to the ECS instance as the root user to run the script. The script can be run repeatedly. Each run overwrites the existing EDAS Agent installation. EDAS Agent does not provide a separate update script. To update EDAS Agent, re-run the installation script. The installation script is region-specific. Switch to the correct region in the EDAS console before copying the script.
Log in to the EDAS console.
In the left-side navigation pane, choose Resource Management > ECS.
In the top navigation bar of the ECS page, select a region and a microservices namespace, then click Import ECS in the upper-right corner.
-
In the Import ECS wizard, click Switch to Manual Installation in the upper-right corner. On the Manually Install EDAS Agent on Single Instance page, click Copy.
To install EDAS Agent using an image instead, click Switch to Image Installation. For more information, see Install via ECS import.
Log in to the ECS instance as the root user. Paste and run the copied command. If the log contains
EDAS Agent installation finished!, the installation is complete.
Verify the installation
After installation, verify that EDAS Agent is running:
In the EDAS console, choose Resource Management > ECS in the left-side navigation pane.
Select a region in the top navigation bar of the ECS page, then select a microservices namespace.
Check the Agent Status column. If EDAS Agent is installed and running, the status displays Online.
If the status is not Online, try the following:
For the command script method, re-run the installation script on the ECS instance as the root user.
Make sure you selected the correct region and microservices namespace.
Update EDAS Agent
EDAS Agent does not provide a separate update script. To update EDAS Agent, re-run the installation command script. For more information, see Install via command script.