Prerequisites

The following requirements are met:

  • The version of IntelliJ IDEA is 2018.3 or later.
  • The plug-in supports Secure Shell (SSH), SOCKS, and Kubernetes proxies.
    • Use the SSH or SOCKS proxy: An Elastic Compute Service (ECS) instance that can be accessed over SSH is prepared to establish channels between on-premises and cloud applications. For more information, see Create and manage an ECS instance by using the ECS console (express version)Quick start.
      Notice
      • Make sure that the ECS instance and the applications to be interconnected are deployed on the same virtual private cloud (VPC).
      • The SSH channel requires password logon. Key pair logon is not supported.
    • Use the Kubernetes proxy: A Kubernetes cluster is deployed on the cloud, and the on-premises kubectl is installed and configured to access the cluster. You can also use an existing Kubernetes cluster. For more information, see Create a managed Kubernetes cluster.

Limits

Limits on Java applications

Java applications can be used for connecting on-premises and cloud applications. The following table describes limits on Java microservices frameworks.

Microservices framework Limits
Spring Cloud If you use Nacos to manage Spring Cloud configurations, make sure that you use Spring Cloud Edgware or later.
Dubbo
  • You must use Dubbo 2.7.2 or later.
  • You must use the following component versions for service registration and discovery:
    • dubbo-nacos-registry 2.7.2 or later
    • edas-dubbo-extension 2.0.2 or later

Settings for applications in other languages

Non-Java applications can use containers without special limits.

Step 2: Configure an Alibaba Cloud Toolkit account

After Alibaba Cloud Toolkit is installed, use your AccessKey ID and AccessKey secret to configure your Alibaba Cloud Toolkit account.

  1. Start IntelliJ IDEA.
  2. In the top navigation bar, choose Tools > Alibaba Cloud > Preferences....
  3. In the left-side navigation pane of the Settings page, choose Alibaba Cloud Toolkit > Appearance & Behavior > Accounts.
  4. On the Accounts page, set Access Key ID and Access Key Secret and click OK.

    The following section describes an Alibaba Cloud account:

    • If you already have an Alibaba Cloud account, click Get existing AK/SK on the Accounts page. The logon page of Alibaba Cloud appears. After you log on to the system by using your Alibaba Cloud account, you are directed to the Security Management page. On this page, obtain the AccessKey ID and the AccessKey secret of your account.
    • If you do not have an Alibaba Cloud account, click Sign up on the Accounts page. On the page that appears, create an Alibaba Cloud account. Then, obtain the AccessKey ID and the AccessKey secret of the account by using the preceding method.

Step 3: Configure interconnection between on-premises and cloud applications

  1. Start IntelliJ IDEA.
  2. In the top navigation bar, choose Tools > Alibaba Cloud > Preferences....
  3. In the left-side navigation pane of the Preferences dialog box, choose Alibaba Cloud Toolkit > Microservice > Microservice.
  4. On the Microservice page, configure the parameters related to interconnection between on-premises and cloud applications.

    Parameter Description
    Configuration Granularity The object for which you can configure interconnection between on-premises and cloud applications. The object can be an on-premises project or a module in an on-premises project.
    • (Recommended) Project: The current project uses a unified configuration for interconnection between on-premises and cloud applications. The project granularity is ideal for single-module projects or multi-module projects in which no configuration difference exists among modules.
    • Module: The current project contains multiple modules. Among the modules, only one module needs to use interconnection between on-premises and cloud applications, or modules require different configurations for interconnection between on-premises and cloud applications. When modules require different configurations, select and complete the configuration for each module.
    Interconnection Between On-premises and Cloud Applications Select Interconnection Between On-premises and Cloud Applications to enable interconnection between on-premises and cloud applications.

    After interconnection between on-premises and cloud applications is enabled, on-premises applications are registered with the cloud registry by default and subscribe to services in the cloud registry. The services provided by the on-premises applications and cloud services can then call each other.

    If you want only cloud services to be called, you can select Subscribe to only cloud services. Do not register on-premises services.

    Product Select Microservices Engine (MSE).
    Region Select the region where the MSE instance resides.
    Instance Select the MSE instance.
    Namespace Select the namespace where the MSE instance resides.
    Spring Cloud Service Port If your application is a Spring Cloud application, you must enter the service port number of your application in the Spring Cloud Service Port field. You do not need to specify this parameter for other types of applications.
    Proxy Select a proxy server.
    Initialize Proxy...

    This operation is required only for an SSH or SOCKS proxy. You must configure an SSH rule to enable interconnection between on-premises and cloud applications.

    Note If the top-layer SSH proxy in the proxy list is not configured by using a root account, the system prompts you to provide root permissions to configure the proxy. The proxy is ready for use after the configuration is complete. If you do not want the plug-in to automatically complete the configuration, you can also manually configure the proxy.
    Advanced Settings Select Automatically Close Startup Prompt to specify how long the application startup prompt is displayed. Unit: ms.
    Quick Diagnostics

    When you attempt to connect on-premises and cloud applications and an exception occurs, such as abnormal startup of the etrans channel and service unconnected, you can click Quick Diagnostics to troubleshoot the issue.

  5. Click Apply and then click OK.
    Notice If your EDAS is deployed on Apsara Stack Enterprise, you must perform the following steps to configure an endpoint in Alibaba Cloud Toolkit. To obtain an endpoint, contact EDAS technical support.
    1. In the Preferences dialog box, choose Appearance & Behavior > Endpoint in the left-side navigation pane.
    2. On the Endpoint page, specify the endpoint, and then click Apply and OK after the configuration is complete.

(Optional) Step 4: Use the on-premises process for interconnection

Start the on-premises application. If the application is connected with a cloud application, the message appears.

An etrans process is started after the application starts.

Start the etrans process

(Optional) Step 5: Use an on-premises container for interconnection

You can also connect an application running in an on-premises container to a cloud application.