This topic uses an ApsaraDB RDS for MySQL instance as an example to describe how to establish a network connection between a data source and DataWorks when they are in the same region and belong to the same Alibaba Cloud account.
Scenarios
If your data source and resource group meet the following conditions at the same time, we recommend that you use this solution:
The data source belongs to an Alibaba Cloud service.
The data source and resource group belong to the same Alibaba Cloud account.
The data source and resource group reside in the same region.
Solution description
For this scenario, use a virtual private cloud (VPC) connection. Deploy the DataWorks resource group and the data source in the same VPC to establish a network connection.
Prerequisites
An Alibaba Cloud data source that DataWorks supports is available.
The data source and the DataWorks workspace meet the requirements described in the Scenarios section.
Configure network connectivity
Step 1: Obtain basic information
Data source side
VPC information:
NoteThis topic uses RDS for MySQL as an example. For other Alibaba Cloud instances, see the official documentation for the specific product for instructions on how to obtain VPC information.
Go to the RDS console. Find the destination instance and click the Instance Name to go to the Basic Information page.
In the navigation pane on the left, click Database Connection to obtain the VPC information of the RDS for MySQL instance. This example names the VPC
VPC 1
.
DataWorks side
VPC and vSwitch information of the attached resource group:
Go to the DataWorks resource group list page. Find the destination resource group and click Network Settings in the Operation column.
Find the attached VPC and VSwitch CIDR Block information under the relevant feature module.
For example, to connect RDS for MySQL to DataWorks for data synchronization, find the corresponding VPC (named
VPC 2
in this example) and VSwitch CIDR Block under Data Scheduling & Data Integration.
Step 2: Establish a network connection
If
VPC 1
andVPC 2
are the same, the data source and the DataWorks resource group are in the same VPC. The network is connected by default.If
VPC 1
andVPC 2
are different, go to the network settings page of the resource group and click Add Binding. AttachVPC 1
to the resource group. This places the DataWorks resource group and the data source in the same VPC.
Step 3: Add to the whitelist
If the data source uses a whitelist for access control, add the vSwitch CIDR block of the resource group to the data source's whitelist. This allows the resource group to access the data source.
This topic uses setting an IP whitelist for RDS for MySQL as an example. Add the VSwitch CIDR Block of the DataWorks resource group to the Whitelist And Security Group.
For other Alibaba Cloud instances, see the official documentation for the specific product for instructions on how to configure a whitelist.
Test network connectivity
Log on to the DataWorks console. In the top navigation bar, select the desired region. In the left-side navigation pane, choose . On the page that appears, select the desired workspace from the drop-down list and click Go to Data Integration.
In the navigation pane on the left, click Data Source. On the Data Source page, click Add Data Source. Select a data source type and configure the connection parameters as needed.
In the connection configuration, select the resource group that is connected to the data source network and click Test Connectivity.
NoteIf the connectivity test returns Failed, use the Connectivity Diagnosis Tool to troubleshoot the issue. If the resource group still cannot connect to the data source, submit a ticket.
References
For answers to common questions about network connectivity, see Resource group operations and network connectivity.