How to deploy Java application to Alibaba Cloud EDAS in Eclipse

This tutorial will show you how to use the Cloud Toolkit to deploy your application on Enterprise Distributed Application Service (EDAS).

image.png

About EDAS

Enterprise Distributed Application Services (https://www.alibabacloud.com/en/product/edas) (EDAS) is a PaaS platform that involves applications and microservices. It provides a variety of application release capabilities and lightweight microservices solutions to help you solve monitoring, diagnostics, and high availability O & M issues in your application and service management processes. EDAS is available in the Spring Cloud and Dubbo environments.

Local development of application

The coding method is the same whether you compile a Java application that runs on EDAS or a Java application that runs locally. Therefore, in this article, we will explain how to deploy using a Java Servlet for printing "Hello World" on a Web page as an example.

image.png

public class IndexServlet extends HttpServlet {
    private static final long serialVersionUID = -112210702214857712L;

    @Override
    public void doGet( HttpServletRequest req, HttpServletResponse resp ) throws ServletException, IOException {
        PrintWriter writer = resp.getWriter();
        // Demo: Use Alibaba Cloud Toolkit to modify the code of a local application and deploy the application to the cloud.
        writer.write("Deploy from alibaba cloud toolkit. 2018-10-24");
        return;
    }
    @Override
    protected void doPost( HttpServletRequest req, HttpServletResponse resp ) throws ServletException, IOException {
        return;
    }}

[This link](https://alicloud-common.oss-ap-southeast-1.aliyuncs.com/Cloud_Toolkit_Blog/IndexSer...%5B%E9%93%B6%E6%97%B6%5D.1540514368. You can download the source code from zip? spm = a2c65.11461447.0.0.69096c5bNP5YC4 & file = IndexSer ...% 5B% E9% 93% B6% E6% 97% B6% 5D.1540514368.zip).

The above code is a standard Java project for displaying the string "Hello World" on a web page.

Plugin installation

Alibaba Cloud provides Eclipse-based plugins for developers to efficiently deploy applications written in the local IDE to EDAS.

Plugin URL: https://www.aliyun.com/product/cloudtoolkit_en

The procedure for installing this Eclipse-based plug-in is similar to a typical plug-in, so we won't go into details here.

Plugin preferences

After installing the plugin, select it and configure the preferences.

Top Menu> Window> Preferences> Alibaba Cloud Toolkit> Account

When the following page is displayed, set the AK and SK of the Alibaba Cloud account, and the setting of the environment setting is completed (If you are using a RAM user account, enter the AK and SK of the RAM user ).

image.png

Deploy application

image.png

Right-click on the project name in Eclipse and select Alibaba Cloud> Deploy to EDAS from the shortcut menu. The following deployment screen will be displayed.

image.png

In the EDAS Deployment Settings dialog box, set regions, namespaces, applications, and groups based on your requirements, select a deployment package generation mode, and click Deploy.

Note: If you have not created the application in EDAS, click Create Application in EDAS Console in the upper right corner of the dialog box to go to the EDAS Console and create the application. For more information on how to create an application, see https://www.alibabacloud.com/help/doc-detail/99912.html See .html).

Description of placement parameters

Application pane parameter description:

-Region: Indicates the region of the application. --Namespace: Indicates the application namespace. --Application: Represents the application name. --Group: Indicates a group of applications.

Deploy file: You have two options.

--Build Maven: If you are using Maven to build your current project, you can use Alibaba Cloud Toolkit to build and deploy your application directly. --File Upload: If you are not using Maven to build your current project, or if you already have a locally packaged deployment file, you can select your local deployment file and upload it directly.

Recommended Posts

How to deploy Java application to Alibaba Cloud EDAS in Eclipse
How to use Alibaba Cloud LOG Java Producer
How to Git manage Java EE projects in Eclipse
How to run JUnit in Eclipse
How to learn JAVA in 7 days
How to use classes in Java?
How to set Lombok in Eclipse
java Eclipse How to debug javaScript
How to concatenate strings in java
Deploy a Java application developed locally with the Cloud Toolkit to an Alibaba Cloud ECS instance
Deploy your application to EDAS using the Cloud Toolkit Maven plugin
How to implement date calculation in Java
How to implement Kalman filter in Java
Multilingual Locale in Java How to use Locale
How to include Spring Tool in Eclipse 4.6.3?
How to do base conversion in Java
How to implement coding conventions in Java
How to get the date in java
[For beginners] How to debug in Eclipse
How to deploy
[JavaFX] How to write Eclipse permissions in build.gradle
How to color code console output in Eclipse
How to display a web page in Java
How to get Class from Element in Java
How to hide null fields in response in Java
[Java] How to substitute Model Mapper in Jackson
How to solve an Expression Problem in Java
How to write Java String # getBytes in Kotlin?
How to automatically generate a constructor in Eclipse
To debug in eclipse
How to call functions in bulk with Java reflection
How to create a Java environment in just 3 seconds
[Java] How to omit the private constructor in Lombok
How to jump from Eclipse Java to a SQL file
How to deploy Java to AWS Lambda with Serverless Framework
How to input / output IBM mainframe files in Java?
How to use Z3 library in Scala with Eclipse
How to create a data URI (base64) in Java
How to generate / verify ID token in Java Memo
How to use JDD library in Scala with Eclipse
How to convert a file to a byte array in Java
How to run Java EE Tutial on github on Eclipse
How to debug the generated jar file in Eclipse
Summary of how to implement default arguments in Java
How to put old Java (8 series) in macOS 10.15 Catalina
Notes on how to use regular expressions in Java
How to get the class name / method name running in Java
How to create an application
[Java] How to use Map
How to lower java version
[Java] How to use Map
How to uninstall Java 8 (Mac)
Java --How to make JTable
How to use JSON data in WebSocket communication (Java, JavaScript)
Guide: Deploy your application using the Alibaba Cloud Toolkit plugin
How to deploy a simple Java Servlet app on Heroku
Memo: [Java] How to check groupId etc. described in pom.xml
How to deploy on heroku
How to write java comments
[Java] Deploy the Spring Boot application to Azure App Service
How to use java class