Cloud9 is a web-based code editor, terminal and file-browser. You can connect to the cluster via Cloud9 and advantage of the following convenient features:
To setup the connection, we need to run a script to install the Cloud9 packages on the HeadNode.
cloud9.sh
script, we also use the SSMManagedInstanceCore
policy to connect to the headnode.HeadNode:
InstanceType: t2.micro
Ssh:
KeyName: keypair
Networking:
SubnetId: subnet-123456789
CustomActions:
OnNodeConfigured:
Script: >-
https://raw.githubusercontent.com/aws-samples/pcluster-manager/main/resources/scripts/multi-runner.py
Args:
- >-
https://raw.githubusercontent.com/aws-samples/pcluster-manager/main/resources/scripts/cloud9.sh
Iam:
AdditionalIamPolicies:
- Policy: arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore
Scheduling:
Scheduler: slurm
SlurmQueues:
- Name: queue0
ComputeResources:
- Name: queue0-t2-micro
MinCount: 0
MaxCount: 4
Instances:
- InstanceType: t2.micro
Networking:
SubnetIds:
- subnet-123456789
Region: us-east-2
Image:
Os: alinux2
HeadNode
:Copy the public key and then connect to the cluster using SSM, on the headnode paste in the key at the bottom of the ~/.ssh/authorized_keys
file.
Install Node.js by executing the following commands on the HeadNode
sudo yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_14.x | sudo -E bash -
sudo yum install -y nodejs