Endpoint-to-cloud connection with Cloud Toolkit in Eclipse

更新时间:
复制 MD 格式

Use the endpoint-to-cloud connection feature of Cloud Toolkit in Eclipse to connect your local and cloud-based applications, improving development efficiency.

Prerequisites

  • The endpoint-to-cloud connection feature has specific requirements for development frameworks and cluster types. For more information, see Endpoint-to-cloud connection overview.

  • Download and install Eclipse IDE 4.5.0 or later.

  • Log on to the ECS console and create an ECS instance accessible via SSH. This instance is used to establish the endpoint-to-cloud connection tunnel.

    Important

    Key pair authentication is not supported.

Step 1: Install Cloud Toolkit

  1. Start Eclipse.
  2. From the top menu bar, choose Help > Eclipse Marketplace.
  3. In the Eclipse Marketplace dialog box, enter Alibaba Cloud Toolkit in the text box next to Find.
    eclipse marketplace.png
  4. In the search results, click Install in the lower-right corner of the Alibaba Cloud Toolkit section.
  5. Follow the prompts on the Eclipse installation page to complete the installation.
    After the installation, restart Eclipse. The Alibaba Cloud Toolkit icon appears in the toolbar.安装Cloud Toolki之重启eclipse

Step 2: Configure your Cloud Toolkit account

Configure your Cloud Toolkit account by providing an AccessKey ID and an AccessKey secret.

  1. Start Eclipse.

  2. In the toolbar, click the drop-down arrow next to the Alibaba Cloud Toolkit icon, and then click Preferences....

  3. In the Preferences (Filtered) dialog box, click Accounts in the navigation pane on the left.

  4. On the Accounts page, enter your AccessKey ID and AccessKey secret, and then click Apply.

    Important

    If you use the AccessKey ID and AccessKey secret of a Resource Access Management (RAM) user, ensure that the RAM user has at least the Deploy Applications permission. For more information, see RAM User Authorization.

    配置Cloud Toolkit账号 您需使用Access Key ID和Access Key Secret来配置Cloud Toolkit的账号。

    • If you have an Alibaba Cloud account, click Get existing AK/SK on the Accounts page. Log on to your account. You are then redirected to the security information management page to obtain your AccessKey ID and AccessKey secret.

    • If you do not have an Alibaba Cloud account, click Sign up on the Accounts page to create one. After you create the account, obtain the AccessKey ID and AccessKey secret as described in the previous step.

Step 3: Configure the local and cloud connection

  1. In Eclipse, click the Alibaba Cloud Toolkit icon (Alibaba Cloud Toolkit图标) in the toolbar, and then click Preferences… in the drop-down menu.

  2. In the Preferences (Filtered) dialog box, choose Alibaba Cloud Toolkit > EDAS in the navigation pane on the left. Configure the local and cloud connection in the settings area on the right.

    端云互联配置eclipse

    1. Select Join EDAS Register to enable the local and cloud connection feature.

    2. Set Region and Namespace to the region and namespace where the connected application is located.

      For namespaces other than the default, you must manually enable the Allow remote debugging option.

      1. Log on to the EDAS console.

      2. Select a Region and go to Application Management > Namespaces.

      3. In the namespace list, find the target namespace and click Edit in the Actions column.

      4. In the Edit Namespace dialog box, turn on the Allow remote debugging switch.

    3. In the SSH Configuration area, configure the following settings.

      1. In the Gateway Host text box, enter the public IP address of the ECS instance that you created.

      2. In the Username and Password text boxes, enter the credentials for the SSH connection. You can use the credentials for your ECS instance, or enter a new username and password and add the new credentials by clicking Add SSH Rule.

      3. For Spring Cloud applications, enter the service port of the application in the Server Port text box. This field is not required for other application types.

    4. Click Add SSH Rule to complete the configuration.

      • If you enter the root username and password for the ECS instance, the root account is used for the configuration. A Configuration added successfully message appears.Add SSH Rule

      • If you use a new or non-root account, root permissions are required to configure the agent for that account. In the Add SSH Rule dialog box, enter the root Password, and then click Add.Add SSH Rule

        Important
        • The ECS instance password is used only to create a network agent. It is not used for any other purpose.

        • Use a new or non-root account for the connection. You can share the credentials of this account with other team members who need to connect. This practice helps prevent the exposure of root account information.

  3. Click Apply, and then click OK.

    Important

    If you use EDAS on Apsara Stack Enterprise Edition, you must also configure the Endpoint in Cloud Toolkit. Contact EDAS technical support to obtain the Endpoint.

    1. In the Preference (Filtered) dialog box, choose Appearance & Behavior > Endpoint in the navigation pane on the left.

    2. On the Endpoint page, enter the Endpoint. After the configuration is complete, click Apply and Close.

Step 4: Start the local application

In your project list, select the root directory of your project and start the application. The following indicators show that the endpoint-to-cloud connection is active:

  • A dialog box appears, confirming that the endpoint-to-cloud connection is available.端云互联提示框
  • In the Console panel, the "Join EDAS Register" console displays logs for initializing the endpoint-to-cloud connection.Join EDAS Register

More information