当前位置:网站首页>Cross tenant data integration link connection

Cross tenant data integration link connection

2022-06-23 03:20:00 User 8613074

background

In some customer scenarios, you need to use self built by other users MySQL perhaps CDB Data in the example ( Other data source types can also be referred to ), For example, in WeData The development platform needs to import the data of other tenants through the integration task , Or when the data warehouse task needs to import other user data sources , The target data source or... Cannot be directly connected in the development platform schema Or other information , This article provides a way to bypass the network restrictions , So as to obtain the target data information

Get ready

a) Get through to cross tenants CDB Instance and current execution resources (CVM) Where VPC The Internet , You can use peer-to-peer or cloud networking solutions

Reference resources :

Cloud networking https://cloud.tencent.com/document/product/877/30805

Peer to peer connection https://cloud.tencent.com/document/product/553

b) Create or use an existing... Under the current account CVM( Best with computing environments ( Performing computing tasks EMR perhaps CVM, This refers to one or more that need to access the target data source CVM) Located in the same VPC, Otherwise, it is necessary to ensure network interworking )

Install the network port mapping tool and configure

a) Log in to the prepared CVM On , Execute the following command to install and start the port mapping tool

yum install -y socat

nohup /usr/bin/socat TCP4-LISTEN:${LOCAL_PORT},reuseaddr,fork TCP4:${DB_IP}:${DB_PORT} &

notes : among LOCAL_PORT Is the local proxy port , DB_IP and DB_PORT It is the source side that needs proxy DB Information

b) Configure boot up

echo ‘/usr/bin/socat TCP4-LISTEN:11306,reuseaddr,fork TCP4:172.21.16.8:3306 &’ >> /etc/rc.d/rc.local

notes :

1、 If there are multiple data sources that need to be mapped , You need to start multiple socat process , And configure boot up , Otherwise, the data source will be abnormal after the host is restarted .

2、 Before repeating , To delete the previously added port mapping information , Do not add again .

Add data sources

go back to WeData platform , Add a data source using the mapped link information , Examples are as follows :

Link information after selecting the proxy IP+ port

WeData Add data source diagram
原网站

版权声明
本文为[User 8613074]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/01/202201201901218627.html