You can use Alibaba Cloud Toolkit to deploy applications to Enterprise Distributed Application Service (EDAS). This is applicable to scenarios, such as fast iterative updates and batch deployment of applications. After you install and configure Alibaba Cloud Toolkit in IntelliJ IDEA, you need only to specify deployment parameters on the configuration interface to implement automated deployment.

Prerequisites

Deploy an application to an Elastic Compute Service (ECS) cluster

In this example, the Java_demo application is deployed by performing the following steps:

  1. Import the Java_demo project into IntelliJ IDEA.
  2. In the Project section on the left side of the IntelliJ IDEA interface, right-click Java_demo (project name). In the menu, choose Alibaba Cloud > Deploy to EDAS... > EDAS for ECS Application.
  3. In the Deploy to EDAS ECS Cluster dialog box, specify deployment parameters.
    Note If you have not created an application in EDAS, click Create application on EDAS Console in the upper-right corner of the dialog box to go to the EDAS console to create an application.

    The following table describes the deployment parameters.

    Parameter Parameter Description
    Application Region The region where the application is to be deployed.
    Namespace The namespace where the application is to be deployed.
    Application The name of the application.
    Group The application group. Default value: All.
    Deploy File Maven Build If the current project is built by using Maven, you can directly build and deploy the application.
    Upload File If the current project is not built by using Maven or a package of deployment files is already available in your on-premises environment, upload the on-premises deployment files.
    Advanced Version The version of the application to be deployed.
    Description The description about deployment.
    Batch The number of batches. If your applications have multiple groups and you deploy all the groups of applications, the applications are deployed in batches based on the groups. You do not need to specify the Batch parameter.
    BatchWaitTime The interval between deployment of two batches of applications. Unit: min.
  4. Click Apply and then click Run.

Deploy an application to a Container Service Kubernetes cluster

  1. Import your project into IntelliJ IDEA.
  2. In the Project section on the left side of the IntelliJ IDEA interface, right-click Java_demo (project name). In the menu, choose Alibaba Cloud > Deploy to EDAS... > EDAS for Kubernetes Application.
  3. On the Settings tab in the Deploy to EDAS Container Service K8s Cluster dialog box, specify deployment parameters.

    The following table describes the deployment parameters on the Settings tab.

    Parameter Parameter Description
    Application Region The region where the application is to be deployed.
    Namespace The namespace where the application is to be deployed.
    Application The name of the application.
    Deploy File Maven Build If the current project is built by using Maven, you can directly build and deploy the application.
    Upload File If the current project is not built by using Maven or a package of deployment files is already available in your on-premises environment, upload the on-premises deployment files.
    Build Image If you select this method to build the application, sequentially enter the values of Content Directory, Dockerfile, and Version.
    Select Image If you select this method to build the application, you can select the docker image to be deployed in the Select Image list.
  4. Click the Advanced tab and specify relevant parameters.

    The following table describes deployment parameters on the Advanced tab.

    Parameter Description
    Application Environment The application environment.
    Startup Command The command for starting the application.
    Environments The environment variables.
    Persistence The NAS disks that are mounted.
    Storage Application storage.
    Appcalition Management Application management.
  5. Click Apply and then click Run.

Verify the result

After the deployment process starts, IntelliJ IDEA generates deployment logs in the Console section. You can check the deployment results based on log information.

You can also log on to the EDAS console, and view the deployment results on the Basic Information tab of the deployed application.