私網串連(PrivateLink)能夠建立Virtual Private Cloud(Virtual Private Cloud)與阿里雲上服務的安全穩定的私人串連,從而簡化網路架構。通過PrivateLink私網訪問OSS,可以避免通過公網訪問服務帶來的潛在安全風險。本文介紹通過終端節點私網訪問MaxCompute資源。
地區限制
目前可用地區:華東1(杭州)、華東2(上海)、華北2(北京)、華北3(張家口)、華北6(烏蘭察布)、華南1(深圳)、西南1(成都)、中國香港、新加坡、馬來西亞(吉隆坡)、印尼(雅加達)、日本(東京)、韓國(首爾)、德國(法蘭克福)、美國(矽谷)、美國(維吉尼亞)。
費用說明
組件說明
私網串連主要包含服務使用方和服務提供者兩個主體的相關組件。
|
相關主體 |
相關組件 |
|
服務使用方 |
|
|
服務提供者 |
|
更多資訊請參見什麼是私網串連。
操作步驟
步驟一:建立終端節點
-
建立Virtual Private Cloud和交換器。具體操作請參見專用網路與交換器。
-
建立介面終端節點frontend,終端節點與Virtual Private Cloud和交換器需要在相同的地區。
-
登入專用網路管理主控台。
-
在左側導覽列選擇終端節點,在左上方選擇地區。
本樣本中使用華南1(深圳)。
-
在終端節點頁面,選擇介面終端節點頁簽。
-
單擊建立終端節點。若首次訪問,需要先單擊開通私網串連服務。
-
在建立終端節點頁面,按以下說明配置各項參數,其他參數保留預設配置。
參數
說明
節點名稱
輸入自訂終端節點的名稱。
終端節點類型
選擇介面終端節點,表示服務使用方通過介面終端節點訪問服務提供者提供的服務。
終端節點服務
-
本樣本選擇阿里雲服務,在終端節點服務名稱搜尋方塊輸入
com.aliyuncs.privatelink.cn-shenzhen.maxcompute.frontend,並選中該終端節點服務。 -
一個終端節點僅支援關聯一個終端節點服務。
專用網路
選擇需要建立終端節點的專用網路。
安全性群組
選擇要與終端節點網卡關聯的安全性群組,安全性群組可以管控到終端節點網卡的資料通訊。
可用區與交換器
選擇終端節點服務對應的可用性區域,然後選擇該可用性區域內的交換器。系統會自動在每個交換器下建立一個終端節點網卡。
-
-
-
建立關聯tunnel的終端節點。
-
在終端節點頁面,選擇介面終端節點頁簽。
-
單擊建立終端節點。
-
在建立終端節點頁面,按以下說明配置各項參數,其他參數保留預設配置。
參數
說明
節點名稱
輸入自訂終端節點的名稱。
終端節點類型
選擇介面終端節點,表示服務使用方通過介面終端節點訪問服務提供者提供的服務。
終端節點服務
-
本樣本選擇阿里雲服務,在終端節點服務名稱搜尋方塊輸入
com.aliyuncs.privatelink.cn-shenzhen.maxcompute.tunnel.share,並選中該終端節點服務。 -
一個終端節點僅支援關聯一個終端節點服務。
專用網路
選擇需要建立終端節點的專用網路。
安全性群組
選擇要與終端節點網卡關聯的安全性群組,安全性群組可以管控到終端節點網卡的資料通訊。
可用區與交換器
選擇終端節點服務對應的可用性區域,然後選擇該可用性區域內的交換器。系統會自動在每個交換器下建立一個終端節點網卡。
-
-
上述兩個終端節點的部分邏輯互相依賴,建議同時開啟,否則可能很多情境無法連通。
步驟二:開啟網域名稱訪問
-
登入專用網路管理主控台。
-
在左側導覽列選擇終端節點,在左上方選擇地區。
-
在終端節點頁面,單擊目標終端節點名稱。
本樣本中選擇frontend節點。
-
在該終端節點詳情頁,單擊基本資料頁簽。
在終端節點服務網域名稱地區,開啟自定義服務網域名稱開關。
各地區網域名稱
MaxCompute Endpoint同時支援HTTP和HTTPS協議,請按需使用。
|
地區 |
所在城市 |
開服狀態 |
MaxCompute終端節點Endpoint |
Tunnel終端節點Endpoint |
|
中國 |
華東1(杭州) |
已開服 |
http://service-pvl.cn-hangzhou-vpc.maxcompute.aliyun-inc.com/api |
http://dt-pvl.cn-hangzhou-vpc.maxcompute.aliyun-inc.com |
|
中國 |
華東2(上海) |
已開服 |
http://service-pvl.cn-shanghai-vpc.maxcompute.aliyun-inc.com/api |
http://dt-pvl.cn-shanghai-vpc.maxcompute.aliyun-inc.com |
|
中國 |
華北2(北京) |
已開服 |
http://service-pvl.cn-beijing-vpc.maxcompute.aliyun-inc.com/api |
http://dt-pvl.cn-beijing-vpc.maxcompute.aliyun-inc.com |
|
中國 |
華北3(張家口) |
已開服 |
http://service-pvl.cn-zhangjiakou-vpc.maxcompute.aliyun-inc.com/api |
http://dt-pvl.cn-zhangjiakou-vpc.maxcompute.aliyun-inc.com |
|
中國 |
華北6(烏蘭察布) |
已開服 |
http://service-pvl.cn-wulanchabu-vpc.maxcompute.aliyun-inc.com/api |
http://dt-pvl.cn-wulanchabu-vpc.maxcompute.aliyun-inc.com |
|
中國 |
華南1(深圳) |
已開服 |
http://service-pvl.cn-shenzhen-vpc.maxcompute.aliyun-inc.com/api |
http://dt-pvl.cn-shenzhen-vpc.maxcompute.aliyun-inc.com |
|
中國 |
西南1(成都) |
已開服 |
http://service-pvl.cn-chengdu-vpc.maxcompute.aliyun-inc.com/api |
http://dt-pvl.cn-chengdu-vpc.maxcompute.aliyun-inc.com |
|
中國 |
香港 |
已開服 |
http://service-pvl.cn-hongkong-vpc.maxcompute.aliyun-inc.com/api |
http://dt-pvl.cn-hongkong-vpc.maxcompute.aliyun-inc.com |
|
亞太地區 |
新加坡 |
已開服 |
https://service-pvl.ap-southeast-1-vpc.maxcompute.aliyun-inc.com/api |
https://dt-pvl.ap-southeast-1-vpc.maxcompute.aliyun-inc.com |
|
亞太地區 |
馬來西亞(吉隆坡) |
已開服 |
https://service-pvl.ap-southeast-3-vpc.maxcompute.aliyun-inc.com/api |
https://dt.ap-southeast-3-vpc.maxcompute.aliyun-inc.com |
|
亞太地區 |
印尼(雅加達) |
已開服 |
https://service-pvl.ap-southeast-5-vpc.maxcompute.aliyun-inc.com/api |
https://dt-pvl.ap-southeast-5-vpc.maxcompute.aliyun-inc.com |
|
亞太地區 |
日本(東京) |
已開服 |
https://service-pvl.ap-northeast-1-vpc.maxcompute.aliyun-inc.com/api |
https://dt-pvl.ap-northeast-1-vpc.maxcompute.aliyun-inc.com |
|
亞太地區 |
韓國(首爾) |
已開服 |
https://service-pvl.ap-northeast-2-vpc.maxcompute.aliyun-inc.com/api |
https://dt-pvl.ap-northeast-2-vpc.maxcompute.aliyun-inc.com |
|
歐美地區 |
德國(法蘭克福) |
已開服 |
https://service-pvl.eu-central-1-vpc.maxcompute.aliyun-inc.com/api |
https://dt-pvl.eu-central-1-vpc.maxcompute.aliyun-inc.com |
|
歐美地區 |
美國(矽谷) |
已開服 |
https://service-pvl.us-west-1-vpc.maxcompute.aliyun-inc.com/api |
https://dt-pvl.us-west-1-vpc.maxcompute.aliyun-inc.com |
|
歐美地區 |
美國(維吉尼亞) |
已開服 |
https://service-pvl.us-east-1-vpc.maxcompute.aliyun-inc.com/api |
https://dt-pvl.us-east-1-vpc.maxcompute.aliyun-inc.com |
步驟三:使用方式
-
已下載並安裝MaxCompute本地用戶端odpscmd。
-
配置odps_config.ini檔案,具體步驟及參數詳情可參考使用本地用戶端(odpscmd)串連。
-
end_point:
http://service-pvl.cn-shenzhen-vpc.maxcompute.aliyun-inc.com/api -
tunnel_endpoint:
http://dt-pvl.cn-shenzhen-vpc.maxcompute.aliyun-inc.com
############################################ Required fields ############################################ project_name=xxx access_id=xxx access_key=xxx end_point=http://service-pvl.cn-shenzhen-vpc.maxcompute.aliyun-inc.com/api ############################################ Optional fields ############################################ log_view_host=http://logview.odps.aliyun.com # https_check= # confirm threshold for query input size(unit: GB) # data_size_confirm= # this url is for odpscmd update # update_url= # download sql results by instance tunnel use_instance_tunnel=true # the max records when download sql results by instance tunnel instance_tunnel_max_record=10000 # IMPORTANT: # If leaving tunnel_endpoint untouched, console will try to automatically get one from odps service, which might charge networking fees in some cases. # Please refer to https://www.alibabacloud.com/help/document_detail/34951.html tunnel_endpoint=http://dt-pvl.cn-shenzhen-vpc.maxcompute.aliyun-inc.com # use set.<key>= # e.g. set.odps.sql.select.output.format= -
-
串連成功後:
[root@iZxxx vZ ~]# cd bin [root@iZxxx vZ bin]# ./odpscmd --config=test.conf __ --- ---/ /--- --- ---- --- - ----/ / / _ \/ _ // _ \ (_-</ __// ' \/ _ / \___/\_,_// .__//___/\__//_//_/\_,_/ /_/ Aliyun ODPS Command Line Tool Version 0.40.10 @Copyright 2020 Alibaba Cloud Computing Co., Ltd. All rights reserved. Connecting to http://service-pvl.cn-shenzhen-vpc.maxcompute.aliyun-inc.com/api, project: xxx Endpoint: http://service-pvl.cn-shenzhen-vpc.maxcompute.aliyun-inc.com/api Project: xxx Quota: default in region N/A Timezone: Asia/Shanghai Connected!