All Products
Search
Document Center

Enterprise Distributed Application Service:Use IntelliJ IDEA to deploy a Kubernetes application to EDAS

Last Updated:Jul 28, 2023

You can use Alibaba Cloud Toolkit to deploy applications to Enterprise Distributed Application Service (EDAS) in an efficient manner. 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 to only specify deployment parameters on the configuration interface to implement automated deployment. This topic describes how to use IntelliJ IDEA to deploy a Kubernetes application to EDAS.

Prerequisites

  • An application is created in EDAS and is deployed for the first time. For more information, see Use an image to deploy a Java microservices application in a Kubernetes cluster.

  • The remote debugging feature for microservices namespaces is enabled.

    You must perform the following steps to manually turn on Allow Remote Debugging for applications in microservices namespaces except the default microservices namespace:

    1. Log on to the EDAS console. In the left-side navigation pane, choose Resource Management > Microservice Namespaces. In the top navigation bar, select a region.

    2. On the Microservices Namespace page, find the microservices namespace that you want to manage and click Edit in the Actions column.

    3. In the Edit Microservices Namespace dialog box, turn on Allow Remote Debugging.

  • Alibaba Cloud Toolkit is installed and configured. For more information, see Install and configure Alibaba Cloud Toolkit in IntelliJ IDEA.

Deploy an application to an ACK cluster in EDAS

  1. Import your project to IntelliJ IDEA.

  2. In the Project section on the left side of IntelliJ IDEA, right-click Java_demo and choose Alibaba Cloud > Deploy to EDAS... > EDAS for Kubernetes Application. Java_demo is the name of your project.

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

    settings

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

    Category

    Parameter

    Description

    Application

    Region

    Specify the region where you want to deploy the application.

    Namespace

    Specify the namespace where you want to deploy the application.

    Application

    Specify the application name.

    Deploy File

    Maven Build

    If the project is built by using Maven, use the method to directly build and deploy the application.

    Upload File

    If the project is not built by using Maven or a deployment package exists in your on-premises environment, use the method to upload the on-premises deployment package.

    Build Image

    If you use the method to build the application, specify the Content Directory, Dockerfile, and Version parameters in sequence.

    Select Image

    If you use the method to build the application, select the image that you want to deploy from the Select Image list.

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

    advanced

    The following table describes deployment parameters on the Advanced tab.

    Parameter

    Description

    Application Environment

    The environment of the application.

    Startup Command

    The startup command for the application.

    Environments

    The environment variable.

    Persistence

    The network-attached storage (NAS) disks that are mounted.

    Storage

    The storage of the application.

    Application Management

    The management on the application.

  5. Click Apply and Run.

Check the result

After the deployment process starts, IntelliJ IDEA generates deployment logs in the Console section. You can check the deployment result based on the log information. You can also perform the following steps to check the deployment result: Log on to the EDAS console, find the deployed application, and then click the application name to go to the application details page. In the left-side navigation tree, click Change List.