Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Copy default-lsf-env.json to something convenient like env0.json.

    1. Code Block
      cp default-lsf-env.json env0.json
  2. 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.

  3. Line 2 : "EnvName" is set to lsf by default, but you can specify something unique if needed.

    1. NOTE: Currently, - characters are not supported in values forEnvName.

  4. 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.

    1. PoolName: This will be the apparent hostnames of the compute resources provided for LSF.

      1. It is recommended that all pools share a common trunk or base in each PoolName.

    2. PoolSize: This is the maximum number of these compute resources.

    3. ProfileName: This is the default profile name, az1: If this is changed, you will need to carry the change forward.

    4. CPUs: This is the targeted CPU-core limit for this "hardware" configuration or pool.

    5. ImageName: This is tied to the AMI that will be used for your compute resources. This name will be used in subsequent steps.

    6. MaxMemory: This is the targeted memory limit for this "hardware" configuration or pool.

    7. MinMemory: reserved for future use; can be ignored currently.

    8. UserData: This string is a base64 encoded version of user_data.

      1. To generate it:

        1. cat user_data.sh | base64 -w 0

      2. To decode it:

        1. echo "<LongBase64EncodedString>" | base64 -d

      3. It’s not required to be perfectly fine-tuned at this stage; it will be refined and corrected later.

      4. Exampleuser_data.sh:

        1. 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
    9. VolumeSize: reserved for future use; can be ignored currently.

  5. All other fields/lines in this asset can be ignored currently.

...

  1. Tagging instances created by the backend is controlled by two sections, depending on the function of the asset:

    1. 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.

      1. Code Block
              {
                "Key": "exostellar.xspot-role",
                "Value": "xspot-controller"
              }
      2. 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.

      3. Code Block
              {
                "Key": "exostellar.xspot-role",
                "Value": "xspot-controller'
              },
              {
                "Key": "MyCustomKey",
                "Value": "MyCustomValue"
              }
      4. Don’t forget the comma between tags.

    2. 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:

      1. Code Block
              {
                "Key": "exostellar.xspot-role",
                "Value": "xspot-worker"
              }
      2. Add as many tags as needed.

      3. Code Block
              {
                "Key": "exostellar.xspot-role",
                "Value": "xspot-worker"
              },
              {
                "Key": "MyCustomKey",
                "Value": "MyCustomValue"
              }
      4. Don’t forget the comma between tags.

  2. 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.

  3. Line 11 - InstanceType: Controllers do not generally require large instances.

    1. In terms of performance, these On-Demand Instances can be set as c5.xlarge or m5.xlarge with no adverse effect.

  4. Line 20 - MaxControllers : This will define an upper bound for your configuration.

    1. Controllers Each controller will manage upto 80 workers.

    2. The default upper bound is 800 nodes joining your production cluster: notice line 20 "MaxControllers": 10,.

    3. If you plan to autoscale past 800 nodes joining your production cluster, MaxControllers should be increased.

    4. If you want to lower that upper bound, MaxControllers should be decreased.

  5. Line 21 - ProfileName: This is used for your logical tracking, in the event you configure multiple profiles.

  6. 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.

  7. 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.

    1. More types and families here, means more opportunities for cost optimization.

    2. Priorities can be managed by appending a : and an integer, e.g. m5:1 is a higher priority than c5:0.

  8. Line 48 - EnableHyperthreading: Set true for hyperthreaded cores and false to disable hyperthreading.

  9. 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.

  10. Line 52 - NodeGroupName : This string appears in Controller Name tagging <profile>-NGN-count

  11. All other field/lines can be ignored in the asset.

...

Code Block
cd ${LSF_TOP}/conf/lsbatch/<ClusterName>/configdir
vi lsb.queues

...

Expand
titleQueue Declaration
Code Block
Begin Queue
QUEUE_NAME              = xio
PRIORITY                = 90
NICE                    = 20
FAIRSHARE               = USER_SHARES[[default,10]]
RC_DEMAND_POLICY        = THRESHOLD[ [1, 1] [10, 60] [100] ]
RC_HOSTS                = xiohost
RES_REQ                 = xiohost
RC_ACCOUNT              = xio
DESCRIPTION             = xspot
NEW_JOB_SCHED_DELAY     = 0
REQUEUE_EXIT_VALUES     = 99
End Queue
  1. Insert a Queue Declaration as in the collapsible example above.

    1. NOTE: The xiohost strings are required in the queue declaration: this is not modifiable.

  2. Add resources to the Resource Definitions in lsf.shared:

Code Block
cd ${LSF_TOP}/conf
vi lsf.shared

Example with the required lines added:

  1. 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
  2. Resource Connector can leverage xiohost, rc_account, and templateID when provisioning compute capacity.

Add Required Lines to lsf.conf

...