diff --git a/ParallelCluster/CloudFormation/us-east-1.Arm.yaml b/ParallelCluster/CloudFormation/us-east-1.Arm.yaml new file mode 100644 index 0000000..c61792b --- /dev/null +++ b/ParallelCluster/CloudFormation/us-east-1.Arm.yaml @@ -0,0 +1,185 @@ +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-1 + Image: + Os: alinux2 + HeadNode: + InstanceType: m7g.4xlarge + 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: hpc7g + 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: hpc7g-16xlarge + InstanceType: hpc7g.16xlarge + MinCount: 0 + MaxCount: 200 + Efa: + Enabled: true + - Name: hpc7g-8xlarge + InstanceType: hpc7g.8xlarge + MinCount: 0 + MaxCount: 200 + Efa: + Enabled: true + - Name: hpc7g-4xlarge + InstanceType: hpc7g.4xlarge + 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 ] + } \ No newline at end of file diff --git a/README.md b/README.md index d97c783..7609241 100644 --- a/README.md +++ b/README.md @@ -25,11 +25,11 @@ The 1-Click deployment procedure will take care of creating everything needed fo | Region | Type | Launch | |--------------| --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | US | --- | --- | -| N. Virginia (us-east-1) | Arm | [![Launch](https://samdengler.github.io/cloudformation-launch-stack-button-svg/images/us-east-1.svg)](https://console.aws.amazon.com/) | +| N. Virginia (us-east-1) | Arm | [![Launch](https://samdengler.github.io/cloudformation-launch-stack-button-svg/images/us-east-1.svg)](https://eu-north-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%2Feu-north-1.x86.yaml&stackName=hpc-best-practice¶m_PrivateSubnet=AUTO¶m_FSx=AUTO¶m_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/) | | 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=test2¶m_PublicSubnetAId=AUTO¶m_FSx=AUTO¶m_PrivateSubnetAId=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=test2¶m_PublicSubnetAId=AUTO¶m_FSx=AUTO¶m_PrivateSubnetAId=AUTO) | +| 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¶m_PrivateSubnet=AUTO¶m_FSx=AUTO¶m_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¶m_PrivateSubnet=AUTO¶m_FSx=AUTO¶m_ClusterSecurityGroup=AUTO) | | Ireland (eu-west-1) | x86 | [![Launch](https://samdengler.github.io/cloudformation-launch-stack-button-svg/images/eu-west-1.svg)](https://console.aws.amazon.com/) | | Ireland (eu-west-1) | Arm | [![Launch](https://samdengler.github.io/cloudformation-launch-stack-button-svg/images/eu-west-1.svg)](https://console.aws.amazon.com/) | | APJ | --- | --- |