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

  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. Priority: When equal, 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 priorityhigher priority so that jobs are placed on the smallest fitting node, something like:

      1. 2-core nodes : Priority=101000

      2. 4-core nodes : Priority=100

      3. 8-core nodes : Priority=100010

      4. So that jobs are scheduled on the smallest node that fulfills the resource requirements of the job.

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

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

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

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

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

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

    9. 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. You may format user_data.sh in the usual ways:

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

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

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

...

  1. Add three lines to the Resource Definitions in lsf.shared:

    1. Code Block
      cd ${LSF_TOP}/conf
      vi lsblsf.shared
  2. Example with the required line 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

...

  1. Code Block
    #exostellar
    LSB_STDOUT_DIRECT=Y
    LSB_RC_EXTERNAL_HOST_FLAG=xiohost
    LSF_LOCAL_RESOURCES="[resource xiohost] [type X86_64]"
    LSF_DYNAMIC_HOST_WAIT_TIME=2
    LSF_DYNAMIC_HOST_TIMEOUT=10m
    ENABLE_DYNAMIC_HOSTS=Y
    LSF_REG_FLOAT_HOSTS=Y
    EBROKERD_HOST_CLEAN_DELAY=5
    LSF_MQ_BROKER_HOSTS=head
    LSB_RC_EXTERNAL_HOST_IDLE_TIME=2
    LSBEGO_BHOSTSDEFINE_FORMAT="HOST_NAME:47 status:13 max:-8 njobs:-8 run:-8 ssusp:-8 ususp:-8 comments"
    LSF_LSHOSTS_FORMAT="HOST_NAME:47 res:13 nprocs:-8 ncores:-8 nthreads:-8 ncpus:-8 maxmem:-8:S maxswp:8:S server:7 type"
    EGO_DEFINE_NCPUS=threads NCPUS=threads 
  2. The values assigned for variables with TIME and DELAY may be tuned for the best timing scenario of your cluster and assets. The LSF Admin may opt for different timing than above, but

Compute AMI Import

During Prepping the LSF Integration an AMI for compute nodes was identified or created. This step will import that AMI into Infrastructure Optimizer. Ideally, this AMI is capable of booting quickly.

...