

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 使用 CloudFormation 建立範例 AWS PCS 叢集
<a name="get-started-cfn-create"></a>

下列程序使用 中的 CloudFormation 範本 AWS 管理主控台 來建立範例 AWS PCS 叢集。如需詳細資訊 CloudFormation，請參閱[什麼是 CloudFormation？](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html) *AWS CloudFormation 《 使用者指南*》中的 。如需 中 AWS PCS 資源類型的詳細資訊 CloudFormation，請參閱*AWS CloudFormation 《 使用者指南*》中的 [AWS PCS 資源類型參考](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/AWS_PCS.html)。

**建立範例叢集**

1. 選擇要在 中 AWS 區域 建立叢集的 （連結會開啟具有 範本的 CloudFormation 主控台）：
   + [US East (N. Virginia) (美國東部 (維吉尼亞北部))](https://console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create/review?stackName=get-started-cfn&templateURL=https://s3.amazonaws.com/aws-hpc-recipes/main/recipes/pcs/getting_started/assets/cluster.yaml&param_ClientIpCidr=0.0.0.0%2F0) (us-east-1)
   + [US East (Ohio) (美國東部 (俄亥俄))](https://console.aws.amazon.com/cloudformation/home?region=us-east-2#/stacks/create/review?stackName=get-started-cfn&templateURL=https://s3.amazonaws.com/aws-hpc-recipes/main/recipes/pcs/getting_started/assets/cluster.yaml&param_ClientIpCidr=0.0.0.0%2F0) (us-east-2)
   + [US West (Oregon) (美國西部 (奧勒岡))](https://console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/create/review?stackName=get-started-cfn&templateURL=https://s3.amazonaws.com/aws-hpc-recipes/main/recipes/pcs/getting_started/assets/cluster.yaml&param_ClientIpCidr=0.0.0.0%2F0) (us-west-2)
   + [Asia Pacific (Mumbai) (亞太區域 (孟買))](https://console.aws.amazon.com/cloudformation/home?region=ap-south-1#/stacks/create/review?stackName=get-started-cfn&templateURL=https://s3.amazonaws.com/aws-hpc-recipes/main/recipes/pcs/getting_started/assets/cluster.yaml&param_ClientIpCidr=0.0.0.0%2F0) (ap-south-1)
   + [Asia Pacific (Singapore) (亞太區域 (新加坡))](https://console.aws.amazon.com/cloudformation/home?region=ap-southeast-1#/stacks/create/review?stackName=get-started-cfn&templateURL=https://s3.amazonaws.com/aws-hpc-recipes/main/recipes/pcs/getting_started/assets/cluster.yaml&param_ClientIpCidr=0.0.0.0%2F0) (ap-southeast-1)
   + [Asia Pacific (Sydney) (亞太區域 (雪梨))](https://console.aws.amazon.com/cloudformation/home?region=ap-southeast-2#/stacks/create/review?stackName=get-started-cfn&templateURL=https://s3.amazonaws.com/aws-hpc-recipes/main/recipes/pcs/getting_started/assets/cluster.yaml&param_ClientIpCidr=0.0.0.0%2F0) (ap-southeast-2)
   + [Asia Pacific (Tokyo) (亞太區域 (東京))](https://console.aws.amazon.com/cloudformation/home?region=ap-northeast-1#/stacks/create/review?stackName=get-started-cfn&templateURL=https://s3.amazonaws.com/aws-hpc-recipes/main/recipes/pcs/getting_started/assets/cluster.yaml&param_ClientIpCidr=0.0.0.0%2F0) (ap-northeast-1)
   + [歐洲 （法蘭克福） (eu-central-1)](https://console.aws.amazon.com/cloudformation/home?region=eu-central-1#/stacks/create/review?stackName=get-started-cfn&templateURL=https://s3.amazonaws.com/aws-hpc-recipes/main/recipes/pcs/getting_started/assets/cluster.yaml&param_ClientIpCidr=0.0.0.0%2F0)
   + [歐洲 （愛爾蘭） (eu-west-1)](https://console.aws.amazon.com/cloudformation/home?region=eu-west-1#/stacks/create/review?stackName=get-started-cfn&templateURL=https://s3.amazonaws.com/aws-hpc-recipes/main/recipes/pcs/getting_started/assets/cluster.yaml&param_ClientIpCidr=0.0.0.0%2F0)
   + [歐洲 （倫敦） (eu-west-2)](https://console.aws.amazon.com/cloudformation/home?region=eu-west-2#/stacks/create/review?stackName=get-started-cfn&templateURL=https://s3.amazonaws.com/aws-hpc-recipes/main/recipes/pcs/getting_started/assets/cluster.yaml&param_ClientIpCidr=0.0.0.0%2F0)
   + [歐洲 （巴黎） (eu-west-3)](https://console.aws.amazon.com/cloudformation/home?region=eu-west-3#/stacks/create/review?stackName=get-started-cfn&templateURL=https://s3.amazonaws.com/aws-hpc-recipes/main/recipes/pcs/getting_started/assets/cluster.yaml&param_ClientIpCidr=0.0.0.0%2F0)
   + [歐洲 （米蘭） (eu-south-1)](https://console.aws.amazon.com/cloudformation/home?region=eu-south-1#/stacks/create/review?stackName=get-started-cfn&templateURL=https://s3.amazonaws.com/aws-hpc-recipes/main/recipes/pcs/getting_started/assets/cluster.yaml&param_ClientIpCidr=0.0.0.0%2F0)
   + [歐洲 （斯德哥爾摩） (eu-north-1)](https://console.aws.amazon.com/cloudformation/home?region=eu-north-1#/stacks/create/review?stackName=get-started-cfn&templateURL=https://s3.amazonaws.com/aws-hpc-recipes/main/recipes/pcs/getting_started/assets/cluster.yaml&param_ClientIpCidr=0.0.0.0%2F0)
   + [AWS GovCloud （美國東部） (us-gov-east-1)](https://console.amazonaws-us-gov.com/cloudformation/home?region=us-gov-east-1#/stacks/create/review?stackName=get-started-cfn&templateURL=https://s3.amazonaws.com/aws-hpc-recipes/main/recipes/pcs/getting_started/assets/cluster.yaml)
   + [AWS GovCloud （美國西部） (us-gov-west-1)](https://console.amazonaws-us-gov.com/cloudformation/home?region=us-gov-west-1#/stacks/create/review?stackName=get-started-cfn&templateURL=https://s3.amazonaws.com/aws-hpc-recipes/main/recipes/pcs/getting_started/assets/cluster.yaml)

1. 在**提供堆疊名稱**下，輸入描述性名稱。這是 CloudFormation 堆疊的名稱。範本使用此值做為 AWS PCS 叢集的名稱。

1. 在**參數**下：

   1. 在 **SlurmVersion** 下，選擇您要叢集使用的 Slurm 版本。

   1. 在 **NodeArchitecture** 下，選擇 **x86** 以部署使用 x86\$164 相容執行個體的叢集，或選擇 **Graviton** 以使用 Arm64 執行個體。

   1. 針對 **KeyName**，選擇 SSH 金鑰對以存取叢集登入節點。請確定您擁有所選金鑰對的 PEM 檔案。

   1. 針對 **ClientIpCidr**，以 CIDR 格式輸入 IP 範圍，以控制對登入節點的存取。
**警告**  
 的預設值`0.0.0.0/0`允許從所有 IP 地址存取 。

   1. 將 **HpcRecipesS3Bucket** 和 **HpcRecipesBranch** 的值保留為預設值。

1. 在**功能和轉換**下：

   1. 選取核取方塊以確認 CloudFormation 將建立 IAM 資源。

   1. 選取核取方塊以確認 CloudFormation 將使用自訂名稱建立 IAM 資源。

   1. 選取核取方塊以確認`CAPABILITY_AUTO_EXPAND`新堆疊。如需詳細資訊，請參閱 *AWS CloudFormation API 參考*中的 [CreateStack](https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_CreateStack.html#API_CreateStack_RequestParameters)。

1. 選擇**建立堆疊**。

1. 監控堆疊的狀態。您可以在堆疊的狀態為 之後連線到叢集`CREATE_COMPLETE`。