d. Build an HPC Cluster

In this section, you create a cluster based on the specifications defined in the configuration file. To create a cluster, you use the command pcluster create and the –config (or -c) option to use another configuration file other than the default one.

If you create your cluster without using the –config (or -c) option, then AWS ParallelCluster uses the default configuration with the minimum requirements to get a cluster running. For example, the default configuration for head and compute nodes is t2.micro instances instead of c5.xlarge.

In your AWS Cloud9 terminal, run the following to create a cluster. Make sure that the configuration file path is correct.

pcluster create hpc-cluster-lab -c my-cluster-config.ini -r $AWS_REGION

Your cluster will take a few minutes to build. The creation status displays in your terminal. Once the cluster is ready, you should see a result similar to the one shown in the following image.

ParallelCluster creation output

There can be only one cluster of a given name at any time on your account.

What’s Happening in the Background

When the pcluster create command is executed, AWS ParallelCluster generates an AWS CloudFormation template to generate an infrastructure in AWS. The bulk of the work is done in AWS and once the create is launched, you don’t need to keep AWS ParallelCluster running. If you want to see AWS CloudFormation generating the infrastructure, you can view the CloudFormation console. The following image shows cluster creation in the CloudFormation console.

ParallelCluster CloudFormation