Updated on 2024-07-01 GMT+08:00

Configuring Access Ports in the Environment

This section describes how to configure the ports for other components in the environment to access the component. After configuration, log in to the cluster node and run the curl command to access the component.

Prerequisites

You have created an application and component.

Adding a Port Configuration

  1. Log in to CAE.
  2. Choose Component Configurations.
  3. Select the target component from the drop-down list in the upper part of the page.

    Figure 1 Selecting a component

  4. Click Edit in the Access Mode module.
  5. In the Access Component from Other Components in the Environment area, click Add Configuration and set parameters by referring to Table 1.

    Table 1 Configuring private network access

    Parameter

    Description

    Protocol

    TCP and UDP are supported.

    Listening Port

    Listening port of program in a component, which is obtained from the user program code.

    Value range: 1 to 65535.

    Access Port

    Port provided by a component for external access, which is set by user and must be unique.

    Value range: 1 to 65535.

    If TCP is used, the listening port is 80 and the access port is 35475. After the configurations take effect, log in to the cluster node and run the curl command to access the component.

    Figure 2 Configuring private network access

  6. (Optional) To add more port configurations, click Add Port and set parameters by referring to Table 1.
  7. Click OK.
  8. Make the configurations take effect.

    • If the component has been deployed, click Activate Settings in the upper part of the page. In the dialog box displayed on the right, confirm the configurations and click OK for the configurations to take effect.
    • If the component has not been deployed, click Set and Deploy Component in the upper part of the page. In the dialog box displayed on the right, click OK. After the deployment is complete, the configurations take effect.
      Figure 3 Private network access

Modifying a Port Configuration

  1. Log in to CAE.
  2. Choose Component Configurations.
  3. Select the target component from the drop-down list in the upper part of the page.

    Figure 4 Selecting a component

  4. Click Edit in the Access Mode module.
  5. In the Access Component from Other Components in the Environment area, modify parameters by referring to Table 2.

    Table 2 Configuring private network access

    Parameter

    Description

    Protocol

    TCP and UDP are supported.

    Listening Port

    Listening port of program in a component, which is obtained from the user program code.

    Value range: 1 to 65535.

    Access Port

    Port provided by a component for external access, which is set by user and must be unique.

    Value range: 1 to 65535.

  6. Click OK.
  7. Make the configurations take effect.

    • If the component has been deployed, click Activate Settings in the upper part of the page. In the dialog box displayed on the right, confirm the configurations and click OK for the configurations to take effect.
    • If the component has not been deployed, click Set and Deploy Component in the upper part of the page. In the dialog box displayed on the right, click OK. After the deployment is complete, the configurations take effect.

Deleting a Port Configuration

  1. Log in to CAE.
  2. Choose Component Configurations.
  3. Select the target component from the drop-down list in the upper part of the page.
  4. Click Edit in the Access Mode module.
  5. In the Access Component from Other Components in the Environment area, select the target port configuration and click Delete in the Operation column.
  6. In the displayed dialog box, click Yes.

    Figure 5 Deleting a port configuration

  7. Click OK.
  8. Make the configurations take effect.

    • If the component has been deployed, click Activate Settings in the upper part of the page. In the dialog box displayed on the right, confirm the configurations and click OK for the configurations to take effect.
    • If the component has not been deployed, click Set and Deploy Component in the upper part of the page. In the dialog box displayed on the right, click OK. After the deployment is complete, the configurations take effect.