Skip to content

Commit

Permalink
Add support for us-east-2 x86 clusters
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaven committed Apr 28, 2024
1 parent 60948ab commit 6e830f7
Show file tree
Hide file tree
Showing 2 changed files with 270 additions and 1 deletion.
269 changes: 269 additions & 0 deletions ParallelCluster/CloudFormation/us-east-2.x86.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,269 @@
AWSTemplateFormatVersion: '2010-09-09'
Description: HPC-Application-Best-Practice
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
-
Label:
default: ""
Parameters:
- PrivateSubnet
- FSx
- ClusterSecurityGroup
ParameterLabels:
PrivateSubnet:
default: 'Private Subnet:'
FSx:
default: 'FSx:'
ClusterSecurityGroup:
default: 'Security Group:'
Parameters:
PrivateSubnet:
Description: 'Please, enter the ID of the Private Subnet you wish to use (if you want to re-use an existing one), or just leave "AUTO".'
Type: String
AllowedPattern: ^(AUTO|subnet-[0-9a-z]+)$
Default : AUTO
ClusterSecurityGroup:
Description: 'Please, enter the ID of the Security Group you wish to use (if you want to re-use an existing one), or just leave "AUTO".'
Type: String
AllowedPattern: ^(AUTO|sg-[0-9a-z]+)$
Default : AUTO
FSx:
Description: 'Please, enter your FSx ID, or just leave "AUTO" if you want to re-use an existing one.'
Type: String
AllowedPattern: ^(AUTO|fs-[0-9a-z]+)$
Default : AUTO
Conditions:
CreateVpc: !Equals [!Ref PrivateSubnet, AUTO]
CreateStorage: !Equals [!Ref FSx, AUTO]
Resources:
HPCNetworkStack:
Type: AWS::CloudFormation::Stack
Condition: CreateVpc
Properties:
TemplateURL: https://hpc-applications-best-practice.s3.eu-west-1.amazonaws.com/HPC-Networking.yaml
HPCStorageStack:
Type: AWS::CloudFormation::Stack
Condition: CreateStorage
Properties:
TemplateURL: https://hpc-applications-best-practice.s3.eu-west-1.amazonaws.com/HPC-Storage.yaml
Parameters:
PrivateSubnet: !If [CreateVpc, !GetAtt HPCNetworkStack.Outputs.PrivateSubnetA, !Ref PrivateSubnet]
SecurityGroup: !If [CreateVpc, !GetAtt HPCNetworkStack.Outputs.localSG, !Ref ClusterSecurityGroup]
PClusterPolicy:
Type: AWS::IAM::ManagedPolicy
Properties:
ManagedPolicyName: !Sub 'pc-attach-policy-${AWS::StackName}'
PolicyDocument:
Version: 2012-10-17
Statement:
- Effect: Allow
Action:
- iam:AttachRolePolicy
- iam:DetachRolePolicy
Resource: "*"
PclusterClusterProvider:
Type: AWS::CloudFormation::Stack
Properties:
Parameters:
AdditionalIamPolicies: !Ref PClusterPolicy
TemplateURL: !Sub
- https://${AWS::Region}-aws-parallelcluster.s3.${AWS::Region}.${AWS::URLSuffix}/parallelcluster/${Version}/templates/custom_resource/cluster.yaml
- { Version: 3.9.1, Region: !Ref AWS::Region }
PclusterCluster:
Type: Custom::PclusterCluster
Properties:
ServiceToken: !GetAtt [ PclusterClusterProvider , Outputs.ServiceToken ]
ClusterName: !Sub 'pc-${AWS::StackName}'
ClusterConfiguration:
Imds:
ImdsSupport: v2.0
Region: us-east-2
Image:
Os: alinux2
HeadNode:
InstanceType: m6i.2xlarge
Networking:
SubnetId: !If [CreateVpc, !GetAtt HPCNetworkStack.Outputs.PrivateSubnetA, !Ref PrivateSubnet]
AdditionalSecurityGroups:
- !If [CreateVpc, !GetAtt HPCNetworkStack.Outputs.localSG, !Ref ClusterSecurityGroup]
DisableSimultaneousMultithreading: false
SharedStorageType: Efs
LocalStorage:
RootVolume:
Size: 100
Encrypted: true
VolumeType: gp3
DeleteOnTermination: true
CustomActions:
OnNodeConfigured:
Script: s3://hpc-applications-best-practice/post-install.headnode.sh
Iam:
AdditionalIamPolicies:
- Policy: arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore
- Policy: arn:aws:iam::aws:policy/SecretsManagerReadWrite
S3Access:
- BucketName: '*'
EnableWriteAccess: true
Imds:
Secured: True
Scheduling:
Scheduler: slurm
SlurmSettings:
ScaledownIdletime: 10
QueueUpdateStrategy: TERMINATE
EnableMemoryBasedScheduling: true
SlurmQueues:
- Name: hpc7a
CapacityType: ONDEMAND
Networking:
SubnetIds:
- !If [CreateVpc, !GetAtt HPCNetworkStack.Outputs.PrivateSubnetA, !Ref PrivateSubnet]
AdditionalSecurityGroups:
- !If [CreateVpc, !GetAtt HPCNetworkStack.Outputs.localSG, !Ref ClusterSecurityGroup]
PlacementGroup:
Enabled: true
ComputeResources:
- Name: hpc7a-96xlarge
InstanceType: hpc7a.96xlarge
MinCount: 0
MaxCount: 200
Efa:
Enabled: true
- Name: hpc7a-48xlarge
InstanceType: hpc7a.48xlarge
MinCount: 0
MaxCount: 200
Efa:
Enabled: true
- Name: hpc7a-24xlarge
InstanceType: hpc7a.24xlarge
MinCount: 0
MaxCount: 200
Efa:
Enabled: true
- Name: hpc7a-12xlarge
InstanceType: hpc7a.12xlarge
MinCount: 0
MaxCount: 200
Efa:
Enabled: true
Iam:
AdditionalIamPolicies:
- Policy: arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore
- Policy: arn:aws:iam::aws:policy/SecretsManagerReadWrite
S3Access:
- BucketName: '*'
EnableWriteAccess: true
CustomActions:
OnNodeConfigured:
Script: s3://hpc-applications-best-practice/post-install.compute.sh
- Name: hpc6id
CapacityType: ONDEMAND
Networking:
SubnetIds:
- !If [CreateVpc, !GetAtt HPCNetworkStack.Outputs.PrivateSubnetA, !Ref PrivateSubnet]
AdditionalSecurityGroups:
- !If [CreateVpc, !GetAtt HPCNetworkStack.Outputs.localSG, !Ref ClusterSecurityGroup]
PlacementGroup:
Enabled: true
ComputeResources:
- Name: hpc6id-32xlarge
InstanceType: hpc6id.32xlarge
MinCount: 0
MaxCount: 200
Efa:
Enabled: true
Iam:
AdditionalIamPolicies:
- Policy: arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore
- Policy: arn:aws:iam::aws:policy/SecretsManagerReadWrite
S3Access:
- BucketName: '*'
EnableWriteAccess: true
CustomActions:
OnNodeConfigured:
Script: s3://hpc-applications-best-practice/post-install.compute.sh
- Name: hpc6a
CapacityType: ONDEMAND
Networking:
SubnetIds:
- !If [CreateVpc, !GetAtt HPCNetworkStack.Outputs.PrivateSubnetA, !Ref PrivateSubnet]
AdditionalSecurityGroups:
- !If [CreateVpc, !GetAtt HPCNetworkStack.Outputs.localSG, !Ref ClusterSecurityGroup]
PlacementGroup:
Enabled: true
ComputeResources:
- Name: hpc6a-48xlarge
InstanceType: hpc6a.48xlarge
MinCount: 0
MaxCount: 200
Efa:
Enabled: true
Iam:
AdditionalIamPolicies:
- Policy: arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore
- Policy: arn:aws:iam::aws:policy/SecretsManagerReadWrite
S3Access:
- BucketName: '*'
EnableWriteAccess: true
CustomActions:
OnNodeConfigured:
Script: s3://hpc-applications-best-practice/post-install.compute.sh
- Name: c5n
CapacityType: ONDEMAND
Networking:
SubnetIds:
- !If [CreateVpc, !GetAtt HPCNetworkStack.Outputs.PrivateSubnetA, !Ref PrivateSubnet]
AdditionalSecurityGroups:
- !If [CreateVpc, !GetAtt HPCNetworkStack.Outputs.localSG, !Ref ClusterSecurityGroup]
PlacementGroup:
Enabled: true
ComputeResources:
- Name: c5n-18xlarge
InstanceType: c5n.18xlarge
MinCount: 0
MaxCount: 200
Efa:
Enabled: true
Iam:
AdditionalIamPolicies:
- Policy: arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore
- Policy: arn:aws:iam::aws:policy/SecretsManagerReadWrite
S3Access:
- BucketName: '*'
EnableWriteAccess: true
CustomActions:
OnNodeConfigured:
Script: s3://hpc-applications-best-practice/post-install.compute.sh
SharedStorage:
- Name: FsxLustre
StorageType: FsxLustre
MountDir: /fsx
FsxLustreSettings:
FileSystemId: !If [CreateStorage, !GetAtt HPCStorageStack.Outputs.FileSystemId, !Ref FSx]
Monitoring:
DetailedMonitoring: true
Logs:
CloudWatch:
Enabled: true
RetentionInDays: 30
DeletionPolicy: Retain
Rotation:
Enabled: true
Dashboards:
CloudWatch:
Enabled: true
Outputs:
HeadNodeIp:
Description: The Public IP address of the HeadNode
Value: !GetAtt [ PclusterCluster, headNode.privateIpAddress ]
FileSystemId:
Value: !If [CreateStorage, !GetAtt HPCStorageStack.Outputs.FileSystemId, !Ref FSx]
SystemManagerUrl:
Description: URL to access the HeadNode via SystemManager
Value: !Sub
- https://${ConsoleDomain}/systems-manager/session-manager/${InstanceId}?region=${AWS::Region}
- { ConsoleDomain: !Sub '${AWS::Region}.console.aws.amazon.com',
InstanceId: !GetAtt [ PclusterCluster, headNode.instanceId ]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The 1-Click deployment procedure will take care of creating everything needed fo
|--------------| --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| US | --- | --- |
| N. Virginia (us-east-1) | Arm | [![Launch](https://samdengler.github.io/cloudformation-launch-stack-button-svg/images/us-east-1.svg)](https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/quickcreate?templateURL=https%3A%2F%2Fhpc-applications-best-practice.s3.eu-west-1.amazonaws.com%2Fus-east-1.Arm.yaml&stackName=hpc-best-practice&param_PrivateSubnet=AUTO&param_FSx=AUTO&param_ClusterSecurityGroup=AUTO) |
| Ohio (us-east-2) | x86 | [![Launch](https://samdengler.github.io/cloudformation-launch-stack-button-svg/images/us-east-2.svg)](https://console.aws.amazon.com/) |
| Ohio (us-east-2) | x86 | [![Launch](https://samdengler.github.io/cloudformation-launch-stack-button-svg/images/us-east-2.svg)]((https://us-east-2.console.aws.amazon.com/cloudformation/home?region=us-east-2#/stacks/quickcreate?templateURL=https%3A%2F%2Fhpc-applications-best-practice.s3.eu-west-1.amazonaws.com%2Fus-east-2.x86.yaml&stackName=hpc-best-practice&param_PrivateSubnet=AUTO&param_FSx=AUTO&param_ClusterSecurityGroup=AUTO) |
| EU | --- | --- |
| Stockholm (eu-north-1) | x86 | [![Launch](https://samdengler.github.io/cloudformation-launch-stack-button-svg/images/eu-north-1.svg)](https://eu-north-1.console.aws.amazon.com/cloudformation/home?region=eu-north-1#/stacks/quickcreate?templateURL=https%3A%2F%2Fhpc-applications-best-practice.s3.eu-west-1.amazonaws.com%2Feu-north-1.x86.yaml&stackName=hpc-best-practice&param_PrivateSubnet=AUTO&param_FSx=AUTO&param_ClusterSecurityGroup=AUTO) |
| Stockholm (eu-north-1) | GPU | [![Launch](https://samdengler.github.io/cloudformation-launch-stack-button-svg/images/eu-north-1.svg)](https://eu-north-1.console.aws.amazon.com/cloudformation/home?region=eu-north-1#/stacks/quickcreate?templateURL=https%3A%2F%2Fhpc-applications-best-practice.s3.eu-west-1.amazonaws.com%2Feu-north-1.GPU.yaml&stackName=hpc-best-practice&param_PrivateSubnet=AUTO&param_FSx=AUTO&param_ClusterSecurityGroup=AUTO) |
Expand Down

0 comments on commit 6e830f7

Please sign in to comment.