Use IntelliJ IDEA to deploy an application to EDAS

更新时间:
复制 MD 格式

Cloud Toolkit lets you quickly deploy applications to Enterprise Distributed Application Service (EDAS). It is ideal for scenarios such as fast iterations and batch deployments. After you install and configure Cloud Toolkit in IntelliJ IDEA, you can automate deployments by setting parameters on the configuration interface.

Prerequisites

Deploy an application to an ECS cluster

You can perform the deployment using a local application. The steps are as follows:

  1. Import your local application into IntelliJ IDEA.

  2. In the top menu bar of IntelliJ IDEA, choose Tools > Alibaba Cloud > Deploy to EDAS... > EDAS for ECS Application.

  3. In the Deploy to EDAS ECS Cluster dialog box, configure the 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 open the EDAS console and create an application.

    The following describes the deployment parameters.

    Parameters

    Parameter

    Description

    Application

    Region

    The region where the application is located.

    Namespace

    The namespace where the application is located.

    Application

    The name of the application.

    Group

    The application group. The default value is All.

    Deploy File

    Maven Build

    If the current project is built using Maven, you can directly build and deploy the project.

    Upload File

    If the current project is not built using Maven, or a compressed deployment package already exists locally, upload the local deployment file.

    Advanced Batch Deployment

    Version

    The deployment version.

    Description

    The description of the deployment.

    Batch

    The number of batches. If your application has multiple groups and you choose to deploy all groups, the deployment is automatically batched by group. You do not need to set the Batch value.

    BatchWaitTime

    The wait time between batches, in minutes.

  4. Click Apply, and then click Run.

Deploy an application to a Container Service for Kubernetes (K8s) cluster

  1. Open your project in IntelliJ IDEA.

  2. In the top menu bar of IntelliJ IDEA, choose Tools > Alibaba Cloud > Deploy to EDAS... > EDAS for Kubernetes Application.

  3. In the Deploy to EDAS Container Service K8s Cluster dialog box, configure deployment parameters on the Settings tab.

    settings

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

    Parameter

    Parameter

    Description

    Application

    Region

    The region where the application is located.

    Namespace

    The namespace where the application is located.

    Application

    The name of the application.

    Deploy File

    Maven Build

    If the current project is built using Maven, you can directly build and deploy the project.

    Upload File

    If the current project is not built using Maven, or a compressed deployment package already exists locally, upload the local deployment file.

    Build Image

    If you select this method to build the application, you must enter the working directory Content Directory, the file path Dockerfile, and the image tag Version.

    Select Image

    If you select this method to build the application, you can select the image to deploy from the Select Image list.

  4. Click the Advanced tab and configure the related parameters.

    advanced

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

    Parameter

    Description

    Application Environment

    The application environment.

    Startup Command

    The startup command for the application.

    Environments

    Environment variables.

    Persistence

    NAS volume mount.

    Storage

    Application storage.

    Application Management

    Application management.

  5. Click Apply, and then click Run.

Verify the result

After the deployment starts, the Console area of IntelliJ IDEA displays deployment logs. Check the log information to verify the deployment result.

You can also log on to the EDAS console and view the deployment result on the Basic Information page of the application.