workshops/eda-workshop-lsf/templates/02-lsf-master.yaml [223:289]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              mkdir /var/log/lsf && chmod 777 /var/log/lsf

              # TODO: Setup CloudWatch Logs daemon and send LSF logs to CloudWatch
              # TODO: Install CodeDeploy agent so that we can push LSF config file changes from CodeCommit repo
              # See docs

              ##############################################
              # Install LSF using customer-provided packages
              ##############################################

              # Add LSF admin account
              adduser -m -u 1500 $LSF_ADMIN

              # Download customer-provided LSF binaries and entitlement file
              aws --quiet s3 cp ${CustomerLSFInstallUri} /tmp
              aws --quiet s3 cp ${CustomerLSFBinsUri} /tmp
              aws --quiet s3 cp ${CustomerLSFEntitlementUri} /tmp
              aws --quiet s3 cp ${CustomerLSFFixPackUri} /tmp

              
              cd /tmp
              tar xf $LSF_INSTALL_PKG
              cp $LSF_BIN_PKG lsf10.1_lsfinstall
              cd lsf10.1_lsfinstall

              # Create LSF installer config file
              cat << EOF > install.config
              LSF_TOP="$LSF_INSTALL_DIR"
              LSF_ADMINS="$LSF_ADMIN"
              LSF_CLUSTER_NAME="${LSFClusterName}"
              LSF_MASTER_LIST="$HOSTNAME"
              SILENT_INSTALL="Y"
              LSF_SILENT_INSTALL_TARLIST="ALL"
              ACCEPT_LICENSE="Y"
              LSF_ENTITLEMENT_FILE="/tmp/$LSF_ENTITLEMENT"
              EOF

              ./lsfinstall -f install.config

              # Setup LSF environment
              source $LSF_INSTALL_DIR/conf/profile.lsf

              # Install fix pack
              cd $LSF_INSTALL_DIR/10.1/install
              cp /tmp/$LSF_FP_PKG .
              echo "schmod_demand.so" >> patchlib/daemonlists.tbl
              ./patchinstall --silent $LSF_FP_PKG

              ## Create Resource Connector config dir
              mkdir -p $LSF_ENVDIR/resource_connector/aws/conf
              chown -R lsfadmin:root $LSF_ENVDIR/resource_connector/aws

              # Configure LSF and Resource Connector
              # Sets AWS as the sole host provider
              wget https://s3.amazonaws.com/aws-eda-workshop-files/workshops/eda-workshop-lsf/config/lsf/hostProviders.json \
                -O $LSF_ENVDIR/resource_connector/hostProviders.json

              # awsprov.config.json
              wget https://s3.amazonaws.com/aws-eda-workshop-files/workshops/eda-workshop-lsf/config/lsf/awsprov_config.json \
                -O $LSF_ENVDIR/resource_connector/aws/conf/awsprov_config.json
              sed -i -e "s/_CFN_AWS_REGION_/${AWS::Region}/" $LSF_ENVDIR/resource_connector/aws/conf/awsprov_config.json

              # awsprov.templates.json
              wget https://s3.amazonaws.com/aws-eda-workshop-files/workshops/eda-workshop-lsf/config/lsf/awsprov_templates.json \
                -O $LSF_ENVDIR/resource_connector/aws/conf/awsprov_templates.json
              
              sed -i -e "s|%CFN_COMPUTE_AMI%|${LSFComputeNodeAmi}|" \
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



workshops/eda-workshop-lsf/templates/eda-lsf-simple-workshop.yaml [348:413]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              mkdir /var/log/lsf && chmod 777 /var/log/lsf

              # TODO: Setup CloudWatch Logs daemon and send LSF logs to CloudWatch
              # TODO: Install CodeDeploy agent so that we can push LSF config file changes from CodeCommit repo
              # See docs

              ##############################################
              # Install LSF using customer-provided packages
              ##############################################

              # Add LSF admin account
              adduser -m -u 1500 $LSF_ADMIN

              # Download customer-provided LSF binaries and entitlement file
              aws --quiet s3 cp ${CustomerLSFInstallUri} /tmp
              aws --quiet s3 cp ${CustomerLSFBinsUri} /tmp
              aws --quiet s3 cp ${CustomerLSFEntitlementUri} /tmp
              aws --quiet s3 cp ${CustomerLSFFixPackUri} /tmp

              cd /tmp
              tar xf $LSF_INSTALL_PKG
              cp $LSF_BIN_PKG lsf10.1_lsfinstall
              cd lsf10.1_lsfinstall

              # Create LSF installer config file
              cat << EOF > install.config
              LSF_TOP="$LSF_INSTALL_DIR"
              LSF_ADMINS="$LSF_ADMIN"
              LSF_CLUSTER_NAME="${LSFClusterName}"
              LSF_MASTER_LIST="$HOSTNAME"
              SILENT_INSTALL="Y"
              LSF_SILENT_INSTALL_TARLIST="ALL"
              ACCEPT_LICENSE="Y"
              LSF_ENTITLEMENT_FILE="/tmp/$LSF_ENTITLEMENT"
              EOF

              ./lsfinstall -f install.config

              # Setup LSF environment
              source $LSF_INSTALL_DIR/conf/profile.lsf

              # Install fix pack
              cd $LSF_INSTALL_DIR/10.1/install
              cp /tmp/$LSF_FP_PKG .
              echo "schmod_demand.so" >> patchlib/daemonlists.tbl
              ./patchinstall --silent $LSF_FP_PKG

              ## Create Resource Connector config dir
              mkdir -p $LSF_ENVDIR/resource_connector/aws/conf
              chown -R lsfadmin:root $LSF_ENVDIR/resource_connector/aws

              # Configure LSF and Resource Connector
              # Sets AWS as the sole host provider
              wget https://s3.amazonaws.com/aws-eda-workshop-files/workshops/eda-workshop-lsf/config/lsf/hostProviders.json \
                -O $LSF_ENVDIR/resource_connector/hostProviders.json

              # awsprov.config.json
              wget https://s3.amazonaws.com/aws-eda-workshop-files/workshops/eda-workshop-lsf/config/lsf/awsprov_config.json \
                -O $LSF_ENVDIR/resource_connector/aws/conf/awsprov_config.json
              sed -i -e "s/_CFN_AWS_REGION_/${AWS::Region}/" $LSF_ENVDIR/resource_connector/aws/conf/awsprov_config.json

              # awsprov.templates.json
              wget https://s3.amazonaws.com/aws-eda-workshop-files/workshops/eda-workshop-lsf/config/lsf/awsprov_templates.json \
                -O $LSF_ENVDIR/resource_connector/aws/conf/awsprov_templates.json
              
              sed -i -e "s|%CFN_COMPUTE_AMI%|${LSFComputeNodeAmi}|" \
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



