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.
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:
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.
On the Microservices Namespace page, find the microservices namespace that you want to manage and click Edit in the Actions column.
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
Import your project to IntelliJ IDEA.
In the Project section on the left side of IntelliJ IDEA, right-click Java_demo and choose . Java_demo is the name of your project.
On the Settings tab in the Deploy to EDAS Container Service K8s Cluster dialog box, configure deployment parameters.
The following table describes the deployment parameters on the Settings tab.
Specify the region where you want to deploy the application.
Specify the namespace where you want to deploy the application.
Specify the application name.
If the project is built by using Maven, use the method to directly build and deploy the application.
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.
If you use the method to build the application, specify the Content Directory, Dockerfile, and Version parameters in sequence.
If you use the method to build the application, select the image that you want to deploy from the Select Image list.
Click the Advanced tab and configure the relevant parameters.
The following table describes deployment parameters on the Advanced tab.
The environment of the application.
The startup command for the application.
The environment variable.
The network-attached storage (NAS) disks that are mounted.
The storage of the application.
The management on the application.
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.