This topic describes how to modify the network configurations of a Data Science Workshop (DSW) instance in the Platform for AI (PAI) console to access an OpenSearch Retrieval Engine Edition instance.
Scenario example
You have an OpenSearch Retrieval Engine Edition instance that stores large volumes of raw data in a region. You want to access the raw data from a PAI DSW instance, perform cleansing, feature extraction, and transformation on the raw data, and then store the processed data back to OpenSearch or upload the processed data to another storage system.
To implement the preceding scenario, perform the following steps:
Obtain the IP address of the OpenSearch Retrieval Engine Edition instance.
Create a DSW instance and add information about the OpenSearch Retrieval Engine Edition instance, such as the virtual private cloud (VPC), vSwitch, and IP address, to the DSW instance.
Verify network connectivity to check whether the DSW instance can connect to the OpenSearch Retrieval Engine Edition instance.
Step 1: Obtain the IP address of the OpenSearch Retrieval Engine Edition instance
Go to the details page of the OpenSearch Retrieval Engine Edition instance in the OpenSearch console, copy the endpoint of the instance, and then ping the endpoint to obtain the IP address of the instance. In this example, the IP address 100.103.22.210 is obtained.
Step 2: Modify the network configurations of the DSW instance
Log on to the PAI console. In the left-side navigation pane, click Workspaces. On the Workspaces page, find the desired workspace and click its ID. In the left-side navigation pane of the page that appears, click Data Science Workshop (DSW).
On the Instance tab of the Data Science Workshop (DSW) page, find your DSW instance and click its name.
On the instance details page, click Change Settings in the upper-right corner.
In the Network Information section, modify the configurations.
Set the VPC parameter to the VPC where the OpenSearch Retrieval Engine Edition instance resides.
Select a security group from the Security Group drop-down list, or click Create Security Group.
Set the vSwitch parameter to the vSwitch to which the OpenSearch Retrieval Engine Edition instance belongs.
For the Extended CIDR Block parameter, select an existing default CIDR block or click Create to add a custom extended CIDR block.
Enter the IP address obtained in Step 1. In this example, the IP address 100.103.22.210 is entered, as shown in the following figure.
Click Yes.
Go back to the Data Science Workshop (DSW) page, find the DSW instance and click Stop in the Actions column to stop the service. Then, click Start to restart the service.
Step 3: Verify network connectivity
On the details page of the DSW instance, click Open in the upper-right corner. In the top navigation bar of the page that appears, click Terminal. Then, run the following command. Replace
{username}
,{password}
, and{instanceId}
in the command with the actual values of the OpenSearch Retrieval Engine Edition instance.curl -i -u "{username}:{password}" http://{instanceId}.ha.aliyuncs.com/network/active
If the 200 status code is returned, the DSW instance is connected to the OpenSearch Retrieval Engine Edition instance.
HTTP/1.1 200 OK Server: Tengine Date: Tue, 26 Nov 2024 08:29:34 GMT Content-Type: application/json; charset=utf-8 Content-Length: 0 Connection: keep-alive Keep-Alive: timeout=320 X-Request-Id: 037a9080181d0b90b8c99b25af7e****
If the
403 Forbidden
error is returned, the DSW instance is not connected to the OpenSearch Retrieval Engine Edition instance. In this case, submit a ticket to contact Alibaba Cloud technical support.