...
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 collapsible example file above. 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.NOTE: Currently,
-
characters are not supported in values forEnvName
.
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 LSF.It is recommended that all pools share a common trunk or base in each
PoolName
.
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.
Example
user_data.sh
:Code Block #!/bin/bash set -x IP=$( hostname -I |awk '{print $1}' ) NEW_HOSTNAME=ip-$( echo ${IP} |sed 's/\./-/g' ) hostname ${NEW_HOSTNAME} echo >> /etc/hosts echo -e "${IP}\t\t${NEW_HOSTNAME}" >> /etc/hosts . /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 currently.
...
Tagging instances created by the backend is controlled by two sections, depending on the function of the asset:
Controllers are On-Demand instances that manage other instances. By default, they are tagged as seen on lines 6-9, above, and 1-4 below.
Code Block { "Key": "exostellar.xspot-role", "Value": "xspot-controller" }
To add additional tags, duplicate lines 1-4 as 5-8 below (as many times as you need), noting that an additional comma is added on line 4.
Code Block { "Key": "exostellar.xspot-role", "Value": "xspot-controller' }, { "Key": "MyCustomKey", "Value": "MyCustomValue" }
Don’t forget the comma between tags.
Workers will be created by Controllers as needed and they can be On-Demand/Reserved instances or Spot. By default, they are tagged as seen on lines 26-30, above, and 1-4 below:
Code Block { "Key": "exostellar.xspot-role", "Value": "xspot-worker" }
Add as many tags as needed.
Code Block { "Key": "exostellar.xspot-role", "Value": "xspot-worker" }, { "Key": "MyCustomKey", "Value": "MyCustomValue" }
Don’t forget the comma between tags.
Note Line numbers listed below reference the above collapsible example file above. Once changes start being made on the system, the line numbers may change.
Line 11 -
InstanceType
: Controllers do not generally require large instances.In terms of performance, these On-Demand Instances can be set as
c5.xlarge
orm5.xlarge
with no adverse effect.
Line 20 -
MaxControllers
: This will define an upper bound for your configuration.Controllers Each controller will manage upto 80 workers.
The default upper bound is 800 nodes joining your production cluster: notice line 20
"MaxControllers": 10,
.If you plan to autoscale past 800 nodes joining your production cluster,
MaxControllers
should be increased.If you want to lower that upper bound,
MaxControllers
should be decreased.
Line 21 -
ProfileName
: This is used for your logical tracking, in the event you configure multiple profiles.Lines 31-34 -
InstanceTypes
here in the Worker section, this refers to On-Demand instances – if there is no spot availability, what instances do you want to run on.Lines 38-43 -
SpotFleetTypes
: here in the Worker section, this refers to Spot instance types – because of the discounts, you may be comfortable with a much broader range of instance types.More types and families here, means more opportunities for cost optimization.
Priorities can be managed by appending a
:
and an integer, e.g.m5:1
is a higher priority thanc5:0
.
Line 48 -
EnableHyperthreading
: Settrue
for hyperthreaded cores andfalse
to disable hyperthreading.Line 49 -
EnableBalloon
: This will always be set to true. It increases migration efficiency. Setting to false may be useful in a troubleshooting scenario, but is not recommended under normal cicrcumstances.Line 52 -
NodeGroupName
: This string appears in Controller Name tagging <profile>-NGN-countAll other field/lines can be ignored in the asset.
...
Code Block |
---|
cd ${LSF_TOP}/conf/lsbatch/<ClusterName>/configdir vi lsb.queues |
...
Expand | ||
---|---|---|
| ||
|
Insert a Queue Declaration as in the collapsible example above.
NOTE: The
xiohost
strings are required in the queue declaration: this is not modifiable.
Add resources to the Resource Definitions in
lsf.shared
:
Code Block |
---|
cd ${LSF_TOP}/conf
vi lsf.shared |
Example with the required lines added:
Code Block Begin Resource RESOURCENAME TYPE INTERVAL INCREASING DESCRIPTION # Keywords ... xiohost Boolean () () (instances from Infrastructure Optimizer) rc_account String () () (account name for the external hosts) templateID String () () (template ID for the external hosts) ... End Resource
Resource Connector can leverage
xiohost
,rc_account
, andtemplateID
when provisioning compute capacity.
Add Required Lines to lsf.conf
...