In this section, you will update the configuration of the HPC cluster you created in Lab I to:
Click on the Edit button in Pcluster Manager.
The first screen leave it as is, next advance to the HeadNode tab.
On the HeadNode tab add permission to access the Amazon Elastic Container Registry (ECR) by adding the managed AmazonEC2ContainerRegistryFullAccess
AWS IAM policy.
arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryFullAccess
. Click Add.Click next twice to advance to the Queues section, here we’re going to add a queue that has Docker and Singularity installed on the compute nodes.
8
.c5.xlarge
.Next add in a script that installs Docker and Singularity on the Compute Nodes.
https://raw.githubusercontent.com/aws-samples/aws-hpc-tutorials/isc22/static/scripts/post-install/container-install.sh
.arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryFullAccess
. Click Add.In the cluster’s config add the following snippet at the bottom of the queue1
section, line 56
:
ComputeSettings:
LocalStorage:
RootVolume:
Size: 50
On the next screen confirm the cluster configuration and update the cluster.
Once we’ve ran the update we’ll be redirected to the main pcluster console screen where we can view update progress.
If the update doesn’t succeed check the contents of the cluster configuration file looks similar to the below. If you are missing anything, review the steps above.
HeadNode:
InstanceType: m5.2xlarge
Ssh:
KeyName: hpc-lab-key
Networking:
SubnetId: subnet-123456789
LocalStorage:
RootVolume:
Size: 50
Iam:
AdditionalIamPolicies:
- Policy: arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore
- Policy: arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryFullAccess
Dcv:
Enabled: true
Imds:
Secured: true
Scheduling:
Scheduler: slurm
SlurmQueues:
- Name: queue0
ComputeResources:
- Name: queue0-c5n18xlarge
MinCount: 0
MaxCount: 2
InstanceType: c5n.18xlarge
DisableSimultaneousMultithreading: true
Efa:
Enabled: true
GdrSupport: true
Networking:
SubnetIds:
- subnet-123456789
PlacementGroup:
Enabled: true
ComputeSettings:
LocalStorage:
RootVolume:
Size: 50
- Name: queue1
ComputeResources:
- Name: queue1-c5xlarge
MinCount: 0
MaxCount: 8
InstanceType: c5.xlarge
Networking:
SubnetIds:
- subnet-123456789
CustomActions:
OnNodeConfigured:
Script: >-
https://github.com/aws-samples/aws-hpc-tutorials/blob/isc22/static/scripts/post-install/container-install.sh
Iam:
AdditionalIamPolicies:
- Policy: arn:aws:iam::aws:policy/AmazonEC2ContainerRegistryFullAccess
ComputeSettings:
LocalStorage:
RootVolume:
Size: 50
Region: eu-west-1
Image:
Os: alinux2
CustomAmi: ami-0975de9b755cc2d78
SharedStorage:
- Name: Ebs0
StorageType: Ebs
MountDir: /shared
EbsSettings:
VolumeType: gp2
DeletionPolicy: Delete
Size: '50'