When you develop microservices locally, you often need to test against live cloud services without deploying every change. Alibaba Cloud Toolkit for IntelliJ IDEA establishes a proxy tunnel between your local machine and a cloud-based Microservices Engine (MSE) registry, so your on-premises applications can register with the registry, discover cloud services, and exchange calls with them in real time.
The plug-in supports three proxy types: SSH, SOCKS, and Kubernetes. Each creates a network path from your local environment into the virtual private cloud (VPC) where MSE runs.
Before you begin
Make sure you have:
IntelliJ IDEA 2018.3 or later
A proxy to establish the tunnel between your local machine and the cloud VPC:
Proxy type What you need SSH or SOCKS An Elastic Compute Service (ECS) instance accessible over SSH, deployed in the same VPC as the target applications. See Create and manage an ECS instance in the console (express version). Kubernetes A Kubernetes cluster deployed on Alibaba Cloud, with kubectl installed and configured locally. You can also use an existing Kubernetes cluster. See Create a managed Kubernetes cluster.
The SSH channel supports password logon only. Key pair logon is not supported.
Framework compatibility
Java applications
| Microservices framework | Version requirements |
|---|---|
| Spring Cloud | Spring Cloud Edgware or later (required when you use Nacos for configuration management) |
| Dubbo | Dubbo 2.7.2 or later, dubbo-nacos-registry 2.7.2 or later, edas-dubbo-extension 2.0.2 or later |
Non-Java applications
No special version requirements apply. Non-Java applications connect through containers.
Step 1: Install the plug-in
Open IntelliJ IDEA.
Open the plug-in settings:
macOS: Choose IntelliJ IDEA > Preference... > Plugins.
Windows: Choose File > Settings > Plugins.
Search for
Alibaba Cloud Toolkitand click Install.Restart IntelliJ IDEA. The Alibaba Cloud Toolkit icon appears in the toolbar after the restart.
Step 2: Configure your Alibaba Cloud account
In IntelliJ IDEA, choose Tools > Alibaba Cloud > Preferences....
In the left pane, go to Alibaba Cloud Toolkit > Appearance & Behavior > Accounts.
Enter your Access Key ID and Access Key Secret, then click OK.
To use existing credentials, click Get existing AK/SK. This opens the Alibaba Cloud logon page. After you log on with your Alibaba Cloud account, you are directed to the Security Management page where you can view your AccessKey pair.
To create a new account, click Sign up, create an Alibaba Cloud account, and then retrieve your AccessKey pair from the Security Management page.
Step 3: Set up local-to-cloud connectivity
This step registers your on-premises applications with the cloud registry and subscribes them to cloud services. After you complete this configuration, local and cloud applications can call each other.
In IntelliJ IDEA, choose Tools > Alibaba Cloud > Preferences....
In the left pane, go to Alibaba Cloud Toolkit > Microservice > Microservice.
Choose the configuration scope. Set Configuration Granularity to control what the connection applies to:
Option When to use Project (recommended) Single-module projects, or multi-module projects that share the same connection settings. Applies a single configuration to the entire project. Module Only specific modules need cloud connectivity, or different modules require different connection settings. Enable the connection. Select the Interconnection Between On-premises and Cloud Applications checkbox. To consume cloud services without registering your local services, also select Subscribe to only cloud services. Do not register on-premises services.
Specify the MSE instance.
Parameter Description Product Select Microservices Engine (MSE). Region Select the region where your MSE instance is deployed. Instance Select the target MSE instance. Namespace Select the namespace of the MSE instance. Set the service port (Spring Cloud only). If your application uses Spring Cloud, enter the application's service port number in the Spring Cloud Service Port field. Skip this for other frameworks.
Configure the proxy. Select a proxy from the Proxy dropdown. For SSH or SOCKS proxies, click Initialize Proxy... to configure the SSH rule required for the tunnel.
NoteIf the top-layer SSH proxy is not configured with a root account, the system prompts you for root permissions. After configuration completes, the proxy is ready. To skip automatic setup, configure the proxy manually.
(Optional) Adjust advanced settings. Under Advanced Settings, select Automatically Close Startup Prompt and set the display duration (in milliseconds) for the application startup prompt.
Click Apply, then click OK.
If your Enterprise Distributed Application Service (EDAS) runs on Apsara Stack Enterprise, configure an endpoint:
In the Preferences dialog, go to Appearance & Behavior > Endpoint in the left pane.
Enter the endpoint provided by EDAS technical support, then click Apply and OK.
Step 4 (optional): Verify the connection
Start your on-premises application. If the connection succeeds, an etrans process starts alongside your application.

Step 5 (optional): Connect through an on-premises container
Instead of running a local process directly, you can connect an application running in an on-premises container to cloud services.
Troubleshooting
If the etrans channel fails to start or a service remains unreachable after setup, click Quick Diagnostics on the Microservice configuration page to identify the issue.