v2.4.0.0 Example User-Data LSF
- Kevin R. SMITH
- Yajing Wang
Owned by Kevin R. SMITH
Sample User Data Scripts
Example
#!/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
Â