Skip to main content
Skip table of contents

Example User-Data LSF

Sample User Data Scripts

Example

Simple user_data.sh
CODE
#!/bin/bash

set -x

#typical aws-style hostname
NEW_HOSTNAME=$( echo ip-$( hostname -I |sed 's/\./-/g' |sed 's/ //g' ) )
hostname ${NEW_HOSTNAME}

##temporarily change the root password
#echo root:AAAAAA |chpasswd

##delete line 3 of /etc/hosts
#sed -i.orig '3d' /etc/hosts

#add an /etc/hosts self-identifying entry
echo >> /etc/hosts
echo -e "$( hostname -I )\t\t\t${NEW_HOSTNAME}" >> /etc/hosts

##aws-resource-connector based AMI has a local /opt/lsf/conf asset
## and needs configuration file updated to faciliate startup under
## the XIO Provider in Resource Connector:
## change resource designation
sed -i 's/awshost/xiohost/g' /opt/lsf/conf/lsf.conf
. /opt/lsf/conf/profile.lsf
lsadmin limstartup
lsadmin resstartup
badmin hstartup

 

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.