Now that AWS ParallelCluster is installed, you will create a configuration file to build a simple HPC system. This file will be generated in your home directory.
Please double check you are using the correct key-pair.
We will be generating a cluster with the following settings:
disable_hyperthreading = true
in the configuration file.For more details about the configuration options of AWS ParallelCluster please review the user guide.
For now you can paste the following commands in your terminal:
IFACE=$(curl --silent http://169.254.169.254/latest/meta-data/network/interfaces/macs/)
SUBNET_ID=$(curl --silent http://169.254.169.254/latest/meta-data/network/interfaces/macs/${IFACE}/subnet-id)
VPC_ID=$(curl --silent http://169.254.169.254/latest/meta-data/network/interfaces/macs/${IFACE}/vpc-id)
AZ=$(curl http://169.254.169.254/latest/meta-data/placement/availability-zone)
REGION=${AZ::-1}
cd ~/environment
cat > my-cluster-config.conf << EOF
[aws]
aws_region_name = ${REGION}
[global]
cluster_template = default
update_check = false
sanity_check = true
[cluster default]
key_name = lab-3-your-key
base_os = alinux2
vpc_settings = public
ebs_settings = myebs
compute_instance_type = c4.xlarge
master_instance_type = c4.xlarge
cluster_type = ondemand
placement_group = DYNAMIC
placement = compute
initial_queue_size = 2
max_queue_size = 8
disable_hyperthreading = true
s3_read_write_resource = *
scheduler = slurm
[vpc public]
vpc_id = ${VPC_ID}
master_subnet_id = ${SUBNET_ID}
[ebs myebs]
shared_dir = /shared
volume_type = gp2
volume_size = 20
[aliases]
ssh = ssh {CFN_USER}@{MASTER_IP} {ARGS}
EOF
Now you are ready to launch a cluster, proceed to the next step.