...
Copy
default-lsf-env.json
to something convenient likeenv0.json
.Code Block cp default-lsf-env.json env0.json
Note Line numbers listed below reference the above example file. Once changes start being made on the system, the line numbers may change.
Line 2 :
"EnvName"
is set tolsf
by default, but you can specify something unique if needed.Lines 5-17 can be modified for a single pool of identical compute resources or they can be duplicated and then modified for each “hardware” configuration or “pool” you choose. When duplicating, be sure to add a comma after the brace on line 17, except when it is the last brace, or the final pool declaration.
PoolName
: This will be the apparent hostnames of the compute resources provided for slurmLSF.It is recommended that all pools share a common trunk or base in each
PoolName
.
Priority
: LSF will treat all pools as having equal priority and then make scheduling decisions based on alphabetical naming. It may be beneficial to set smaller nodes with a lower priority, something like:2-core nodes : Priority=10
4-core nodes : Priority=100
8-core nodes : Priority=1000
So that jobs are scheduled on the smallest node that fulfills the resource requirements of the job.
PoolSize
: This is the maximum number of these compute resources.ProfileName
: This is the default profile name,az1
: If this is changed, you will need to carry the change forward.CPUs
: This is the targeted CPU-core limit for this "hardware" configuration or pool.ImageName
: This is tied to the AMI that will be used for your compute resources. This name will be used in subsequent steps.MaxMemory
: This is the targeted memory limit for this "hardware" configuration or pool.MinMemory
: reserved for future use; can be ignored currently.UserData
: This string is a base64 encoded version of user_data.To generate it:
cat user_data.sh | base64 -w 0
To decode it:
echo "<LongBase64EncodedString>" | base64 -d
It’s not required to be perfectly fine-tuned at this stage; it will be refined and corrected later.
You may format
user_data.sh
in the usual ways:Code Block #cloud-config runcmd: - [sh, -c, "set -x"] - [sh, -c, "hostname $( echo ip-$ (hostname -I |sed 's/\./-/g' |sed 's/ //g' ) )"] - [sh, -c, "echo root:AAAAAA |chpasswd"] - [sh, -c, "sed -i.orig '3d' /etc/hosts"] - [sh, -c, "echo >> /etc/hosts"] - [sh, -c, "echo -e \"$( hostname -I )\t\t\t$( hostname )\" >> /etc/hosts"] - [sh, -c, "sed -i 's/awshost/xiohost/g' /opt/lsf/conf/lsf.conf"] - [sh, -c, "source /opt/lsf/conf/profile.lsf"] - [sh, -c, "lsadmin limstartup"] - [sh, -c, "lsadmin resstartup"] - [sh, -c, "badmin hstartup"]
or
Code Block #!/bin/bash set -x #hostname XSPOT_NODENAME hostname $( echo ip-$ (hostname -I |sed 's/\./-/g' |sed 's/ //g' ) ) echo root:AAAAAA |chpasswd #delete an /etc/hosts entry sed -i.orig '3d' /etc/hosts #add an /etc/hosts self-identifying entry echo >> /etc/hosts echo -e "$( hostname -I )\t\t\t$( hostname )" >> /etc/hosts #change resource designation sed -i 's/awshost/xiohost/g' /opt/lsf/conf/lsf.conf . /opt/lsf/conf/profile.lsf lsadmin limstartup lsadmin resstartup badmin hstartup
VolumeSize: reserved for future use; can be ignored currently.
All other fields/lines in this asset can be ignored.
...
If the EnvName was changed (above in Edit the Slurm LSF Environment JSON for Your Purposes - Step 2 ), then the following command can be used with your CustomEnvironmentName
:
...
The AMI-ID should be based on a slurm LSF compute node from your cluster, capable of running your workloads.
The AMI should be created by this account.
The AMI should not have product codes.
The Image Name was specified in the environment set up previously and will be used in this command.
Additionally, we can pass
-s script.sh
if troubleshooting is required.
Validation of Migratable VM Joined to Your
...
LSF Cluster
The script test_createVm.sh
exists for a quick validation that new compute resources can successfully connect and register with the scheduler.
...