

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# CloudFormation 用于创建示例 AWS PCS 集群
<a name="get-started-cfn-create"></a>

以下过程使用中的 CloudFormation 模板创建示例 AWS PCS 集群。 AWS 管理控制台 有关的更多信息 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 控制台）：
   + [美国东部（弗吉尼亚北部）](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)
   + [美国东部（俄亥俄）](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)
   + [美国西部（俄勒冈）](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)
   + [亚太地区（孟买）](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)
   + [亚太地区（新加坡）](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)
   + [亚太地区（悉尼）](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)
   + [亚太地区（东京）](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-south-2)](https://console.aws.amazon.com/cloudformation/home?region=eu-south-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-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-East) (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-West) (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\_64 兼容实例的集群，或者选择 **Graviton 以使用 Ar** m64 实例。

   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 Reference》**中的 [CreateStack](https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_CreateStack.html#API_CreateStack_RequestParameters)。

1. 选择**创建堆栈**。

1. 监控堆栈的状态。在堆栈的状态变为之后，您就可以连接到集群`CREATE_COMPLETE`。