Installing an LSF server host on the AWS EC2 instance

Follow these steps to install an LSF server host on the Amazon Web Services (AWS) for EC2 instance.

Before you begin

You must already have launched an AWS EC2 instance.

About this task

AWS uses public-key cryptography to secure the login information for an instance. A Linux instance has no password; you use a key pair to log in to your instance securely. You specify the name of the key pair when you launch your instance, then provide the private key when you log in using SSH.

After the instance is created, use ssh to log in to the instance with the key file generated above and perform the following tasks to install LSF on the EC2 instance.

Procedure

  1. Copy the LSF package to EC2 host.
    • lsf10.1.0_linux2.6-glibc2.3-x86_64.tar.Z
    • lsf10.1.0_lsfinstall_linux_x86_64.tar.Z
    • license.dat or lsf.entitlement
  2. Set up firewall communications on the instance.

    Modify the instance's firewall to open all LSF listening ports. The ports must match those from the existing LSF cluster. The ports are required to be opened so the LSF daemons can communicate from the AWS instance to the on-premise management host. The following are the default port number values:

    • LSF_LIM_PORT=7869 (TCP and UDP)
    • LSF_RES_PORT=6878 (TCP)
    • LSB_SBD_PORT=6882 (TCP)
  3. Prepare users for LSF. (Optional)

    For jobs submitted by a user to run on the instance, the instance must have this user prepared or LSF user mapping configured. For more information about user groups and user account mapping, see Managing Users and User Groups and Between-Host User Account Mapping.

  4. Install the required software (ed.x86_64).

    If no software is installed, you can use command yum install to install it:

    yum install ed

  5. Configure the server.config file and install LSF as a server host on AWS EC2.

    ./lsfinstall -s -f server.config

    The following example shows typical installation parameters to set in the server.config file.

    
    $ cat /home/ec2-user/lsf/lsf10.1_lsfinstall/server.config
    #  The LSF_ADMIN must be same admin as the primary cluster and you must make sure the user 
    exists in the instance
    LSF_TOP="/home/ec2-user/lsf"
    LSF_ADMINS="ec2-user"
    LSF_TARDIR="/home/ec2-user/lsf/"
    
    # The below is not required if an entitlement (LSF_ENTITLEMENT_FILE) is used.
    LSF_LICENSE="/home/ec2-user/lsf/license.dat"
    LSF_SERVER_HOSTS="management.myserver.com"
    
    # The [resource awshost] is required in the server.config
    LSF_LOCAL_RESOURCES="[resource awshost] [resource define_ncpus_threads]"
    LSF_LIM_PORT="7869"
    
    

    LSF_LOCAL_RESOURCES (Required): LSF uses the Boolean resource name awshost to identify AWS instances.

    LSF_LIM_PORT (Required): The port number must be the same as the one defined on the LSF management host of your cluster.

    LSF_SERVER_HOSTS (Required): List of management host candidates that the server host will communicate with for the cluster.

    Note: By default, LSF maps ncpus to cores (number_processors x number_cores), but AWS treats each virtual CPU as a hyperthreaded core. To map the exact number of AWS instance virtual CPUs to LSF ncpus, add the resource name define_ncpus_threads to the list of local resources. The define_ncpus_threads resource maps the number of LSF ncpus to threads instead of cores for AWS server hosts.
  6. If required, update the /etc/hosts file on the EC2 host to add the management host name so the EC2 host can ping the management host.
  7. Start the LSF daemons on the instance manually and make sure that the EC2 instance can join the management host cluster as a dynamic host.

    If the EC2 instance is started properly, the lshosts and lsload commands show this dynamic host information, and the bhosts command shows a status of closed_RC.

    LSF looks up host names and addresses for all communication between hosts borrowed from a resource provider and management host candidates. Make sure that your environment settings for IP address resolution work between the LSF management host and borrowed hosts that join the cluster.

    Tip: Check whether the management host candidates can ping the borrowed EC2 instances by using the host name from the hostname command and vice versa. Also, make sure that the borrowed EC2 instances can ping themselves with the reported host name from the hostname command.

    If the hosts can ping themselves and each other only by using IP address but not by using the host name, DNS settings need to be configured.

    If the borrowed host cannot join the cluster, check the VPN, firewall, or security group settings. You must open firewall rules for all LSF ports between the LSF management and borrowed server host IP ranges.

    For more information on troubleshooting refer to Logging and troubleshooting the LSF resource connector.

  8. Shut down the daemons.
  9. Create an Amazon machine image (AMI) from the EC2 instance.
    Tip: Remember the name of the image (imageId) as it is required in the awsprov_templates.json file for LSF to launch instances based on this AMI with LSF installed.
    Note: The hostsetup script must not be executed on the AWS EC2 instance. LSF uses the user_data.sh script to startup the LSF daemons on the launched instances.