Public IP

Before we connect, let’s fetch the IP of the headnode. We’ll need the IP later to connect Cloud9.

PC_HEAD_PUBIP=$(aws ec2 describe-instances \
    --filters "[{\"Name\":\"tag:Application\", \"Values\": [\"parallelcluster-${CLUSTER_NAME}\"]}]" \
    --query "Reservations[0].Instances[0].PublicIpAddress" --output text)
echo "export PC_HEAD_PUBIP=${PC_HEAD_PUBIP}"| tee -a ~/.bashrc

Connect to the cluster

Once finished we can connect to the cluster via ssh.

pcluster ssh ${CLUSTER_NAME} -i ~/.ssh/${SSH_KEY} 

Type yes (1) to accept the connection to this new host.

Check post-install

Once you logged in you can check the log files for post-install logs.

grep -C3 Hello /var/log/cfn-init.log