Now that you installed AWS ParallelCluster and set up the foundation, you can create a configuration file to build a simple HPC Cluster. This file is generated in your home directory.
Generate the cluster with the following settings:
/shared
. It is generally a good location to store applications or scripts. Keep in mind that the /home
directory is shared on NFS as well.disable_hyperthreading : true
in the configuration file.For more details about the AWS ParallelCluster configuration options, see the AWS ParallelCluster User Guide.
For now, paste the following commands in your terminal:
source env_vars
echo ${AWS_REGION}
echo ${INSTANCES}
echo ${SSH_KEY_NAME}
echo ${VPC_ID}
echo ${SUBNET_ID}
echo ${CUSTOM_AMI}
NCAR provides an Amazon Machine Image (AMI) that contains a compiled version of WRF v4. You will leverage this AMI to run WRF on a test case in the next section of this lab.
Your env_vars file already contains the AMI ID you need, you can see below - just for your convenience - how we did retrieve this AMI ID.
CUSTOM_AMI=`aws ec2 describe-images --owners 280472923663 \
--query 'Images[*].{ImageId:ImageId,CreationDate:CreationDate}' \
--filters "Name=name,Values=*-amzn2-parallelcluster-3.1.2-wrf-4.2.2-*" \
--region ${AWS_REGION} \
| jq -r 'sort_by(.CreationDate)[-1] | .ImageId'`
cat > my-cluster-config.yaml << EOF
HeadNode:
InstanceType: m5.2xlarge
Ssh:
KeyName: ${SSH_KEY_NAME}
Networking:
SubnetId: ${SUBNET_ID}
LocalStorage:
RootVolume:
Size: 50
Iam:
AdditionalIamPolicies:
- Policy: arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore
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
Networking:
SubnetIds:
- ${SUBNET_ID}
PlacementGroup:
Enabled: true
ComputeSettings:
LocalStorage:
RootVolume:
Size: 50
Region: ${AWS_REGION}
Image:
Os: alinux2
CustomAmi: ${CUSTOM_AMI}
SharedStorage:
- Name: Ebs0
StorageType: Ebs
MountDir: /shared
EbsSettings:
VolumeType: gp2
DeletionPolicy: Delete
Size: '50'
EOF
Now, you are ready to launch a cluster! Proceed to the next section.