×
Community Blog Deploy an Application to Alibaba Cloud EDAS in Eclipse

Deploy an Application to Alibaba Cloud EDAS in Eclipse

In this tutorial, we will show you how to deploy applications on Enterprise Distributed Application Service (EDAS) using Cloud Toolkit.

In the previous article, we have discussed how to deploy a local Java application directly to an Alibaba Cloud ECS instance. For those who are already using Alibaba Cloud Enterprise Distributed Application Service (EDAS), you may be wondering how to use this plug-in to deploy applications on EDAS. In this article, we will answer this question and explain how to deploy Java applications to Alibaba Cloud EDAS in Eclipse.

1

About EDAS

Enterprise Distributed Application Service (EDAS) is a PaaS platform involving applications and microservices. It provides a variety of application release capabilities and lightweight microservice solutions that can 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.

Develop an Application Locally

The coding method is similar no matter whether you are compiling Java applications that run on EDAS or locally. Therefore, this article takes a Java servlet for printing "Hello World" on a Web page as an example to explain the deployment method.

2

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;
    }}

You can download the source code through this link.

The preceding code is a standard Java project used to print the string "Hello World" on a Web page.

Install Plug-in

Alibaba Cloud provides an Eclipse-based plug-in to help developers efficiently deploy applications written in the local IDE to EDAS.

URL of the plug-in: https://www.aliyun.com/product/cloudtoolkit_en

The installation process of this Eclipse-based plug-in is similar to that of a common plug-in, and therefore will not be detailed here.

Configure the Plug-in Preferences

After installing the plug-in, configure the preferences by choosing:

Top menu > Window > Preferences > Alibaba Cloud Toolkit > Accounts

When the following page is displayed, configure the AK and SK of your Alibaba Cloud account to complete the configuration of preferences.( If you are using a RAM user account, enter the AK and SK of the RAM user.)

3

Deploy the Application

4

In Eclipse, right-click the project name and choose Alibaba Cloud > Deploy to EDAS from the shortcut menu. The following deployment window is displayed:

5

In the EDAS Deployment Configuration dialog box, set Region, Namespace, Application, and Group based on your actual requirements, choose a deployment package generation mode, and click Deploy.

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

Description of Deployment Parameters

Description of parameters in the Application pane:

  • Region: Indicates the region of the application.
  • Namespace: Indicates the namespace of the application.
  • Application: Indicates the application name.
  • Group: Indicates the application group.

Deploy File: Two options are available.

  • Maven Build: If Maven is used to build the current project, you can use Alibaba Cloud Toolkit to directly build and deploy the application.
  • Upload File: If Maven is not used to build the current project, or a locally packaged deployment file already exists, you can select and directly upload the local deployment file.
0 0 0
Share on

Nick

9 posts | 1 followers

You may also like

Comments

Nick

9 posts | 1 followers

Related Products

  • Application Real-Time Monitoring Service

    Build business monitoring capabilities with real time response based on frontend monitoring, application monitoring, and custom business monitoring capabilities

    Learn More
  • EDAS

    A PaaS platform for a variety of application deployment options and microservices solutions to help you monitor, diagnose, operate and maintain your applications

    Learn More
  • Sports Solution

    From immersive stadiums to data analytics, our sports solutions empower teams, athletes, and fans through the digital transformation of the sports industry

    Learn More
  • Enterprise Distributed Application Service

    A PaaS platform for a variety of application deployment options and microservices solutions to help you monitor, diagnose, operate and maintain your applications

    Learn More