本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
步驟 1 – 擷取目標 AWS PCS 叢集的地址和秘密
使用 AWS CLI 搭配接下來的 命令,擷取目標 AWS PCS 叢集的詳細資訊。執行命令之前,請執行下列替換:
-
將
region-code
取代為目標叢集執行 AWS 區域 所在的 。 -
將
cluster-ident
取代為目標叢集的名稱或識別符
aws pcs get-cluster --region
region-code
--cluster-identifiercluster-ident
命令會傳回類似此範例的輸出。
{ "cluster": { "name": "get-started", "id": "pcs_123456abcd", "arn": "arn:aws:pcs:us-east-1:111122223333:cluster/pcs_123456abcd", "status": "ACTIVE", "createdAt": "2024-12-17T21:03:52+00:00", "modifiedAt": "2024-12-17T21:03:52+00:00", "scheduler": { "type": "SLURM", "version": "24.05" }, "size": "SMALL", "slurmConfiguration": { "authKey": { "secretArn": "arn:aws:secretsmanager:us-east-1:111122223333:secret:pcs!slurm-secret-pcs_123456abcd-a12ABC", "secretVersion": "ef232370-d3e7-434c-9a87-ec35c1987f75" } }, "networking": { "subnetIds": [ "subnet-0123456789abcdef0" ], "securityGroupIds": [ "sg-0123456789abcdef0" ] }, "endpoints": [ { "type": "SLURMCTLD", "privateIpAddress": "10.3.149.220", "port": "6817" } ] } }
在此範例中,叢集 Slurm 控制器端點的 IP 地址為 ,10.3.149.220
且正在連接埠 上執行6817
。secretArn
將在後續步驟中使用 來擷取叢集秘密。稍後的步驟將使用 IP 地址和連接埠來設定sackd
服務。