From 2b88d99a0306c9f6b1a2020f68af72b6e9db0fc6 Mon Sep 17 00:00:00 2001 From: mellor Date: Mon, 5 Apr 2010 02:25:33 +0000 Subject: [PATCH] HPC integration - fix PE install git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5662 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- .../xcat/IBMhpc/IBMhpc.sles11.ppc64.pkglist | 1 + .../compute.sles11.ppc64.otherpkgs.pkglist | 2 +- .../IBMhpc/compute.sles11.ppc64.postinstall | 22 ++++-- .../share/xcat/IBMhpc/pe/pe.otherpkgs.pkglist | 1 + xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe.pkglist | 3 +- .../pe/pe.sles11.ppc64.otherpkgs.pkglist | 8 -- xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe_install | 78 +++++++++++++++++++ xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe_updates | 31 -------- 8 files changed, 97 insertions(+), 49 deletions(-) create mode 100644 xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe.otherpkgs.pkglist delete mode 100644 xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe.sles11.ppc64.otherpkgs.pkglist create mode 100755 xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe_install delete mode 100755 xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe_updates diff --git a/xCAT-IBMhpc/share/xcat/IBMhpc/IBMhpc.sles11.ppc64.pkglist b/xCAT-IBMhpc/share/xcat/IBMhpc/IBMhpc.sles11.ppc64.pkglist index af07d98e5..82a3f812a 100644 --- a/xCAT-IBMhpc/share/xcat/IBMhpc/IBMhpc.sles11.ppc64.pkglist +++ b/xCAT-IBMhpc/share/xcat/IBMhpc/IBMhpc.sles11.ppc64.pkglist @@ -19,6 +19,7 @@ numactl libnuma1 src libpython2_6-1_0 +xinetd gcc-32bit gcc diff --git a/xCAT-IBMhpc/share/xcat/IBMhpc/compute.sles11.ppc64.otherpkgs.pkglist b/xCAT-IBMhpc/share/xcat/IBMhpc/compute.sles11.ppc64.otherpkgs.pkglist index 77bf091db..a4a1cf43e 100644 --- a/xCAT-IBMhpc/share/xcat/IBMhpc/compute.sles11.ppc64.otherpkgs.pkglist +++ b/xCAT-IBMhpc/share/xcat/IBMhpc/compute.sles11.ppc64.otherpkgs.pkglist @@ -4,5 +4,5 @@ #INCLUDE:/opt/xcat/share/xcat/IBMhpc/compilers/compilers.otherpkgs.pkglist# #NEW_INSTALL_LIST# #INCLUDE:/opt/xcat/share/xcat/IBMhpc/gpfs/gpfs.otherpkgs.pkglist# -#INCLUDE:/opt/xcat/share/xcat/IBMhpc/pe/pe.sles11.ppc64.otherpkgs.pkglist# +#INCLUDE:/opt/xcat/share/xcat/IBMhpc/pe/pe.otherpkgs.pkglist# #INCLUDE:/opt/xcat/share/xcat/IBMhpc/loadl/loadl.sles11.ppc64.otherpkgs.pkglist# diff --git a/xCAT-IBMhpc/share/xcat/IBMhpc/compute.sles11.ppc64.postinstall b/xCAT-IBMhpc/share/xcat/IBMhpc/compute.sles11.ppc64.postinstall index 2fdbe772b..df1f47cfd 100755 --- a/xCAT-IBMhpc/share/xcat/IBMhpc/compute.sles11.ppc64.postinstall +++ b/xCAT-IBMhpc/share/xcat/IBMhpc/compute.sles11.ppc64.postinstall @@ -19,31 +19,37 @@ arch=$3 profile=$4 workdir=$5 +hpc=/opt/xcat/share/xcat/IBMhpc +otherpkgs=/install/post/otherpkgs/$osver/$arch + + # Run default postinstall shipped with xcat /opt/xcat/share/xcat/netboot/sles/compute.sles11.postinstall $1 $2 $3 $4 $5 + # Run general IBMhpc postinstall script -/opt/xcat/share/xcat/IBMhpc/IBMhpc.sles.postinstall $1 $2 $3 $4 $5 +$hpc/IBMhpc.sles.postinstall $1 $2 $3 $4 $5 + # Run script to install gpfs updates -installroot=$installroot NODESETSTATE=genimage /opt/xcat/share/xcat/IBMhpc/gpfs/gpfs_updates +installroot=$installroot NODESETSTATE=genimage $hpc/gpfs/gpfs_updates # Run script to update GPFS mmsdrfs file in the image -installroot=$installroot /opt/xcat/share/xcat/IBMhpc/gpfs/gpfs_mmsdrfs +installroot=$installroot $hpc/gpfs/gpfs_mmsdrfs # Run script to accept compiler license -installroot=$installroot NODESETSTATE=genimage /opt/xcat/share/xcat/IBMhpc/compilers/compilers_license +installroot=$installroot NODESETSTATE=genimage $hpc/compilers/compilers_license -# Run script for PE -installroot=$installroot NODESETSTATE=genimage /opt/xcat/share/xcat/IBMhpc/pe/pe_updates +# Run script to install PE and accept license +installroot=$installroot pedir=$otherpkgs/pe NODESETSTATE=genimage $hpc/pe/pe_install # Run script to install ESSL and PESSL rpms -installroot=$installroot essldir=/install/post/otherpkgs/$osver/$arch/essl NODESETSTATE=genimage /opt/xcat/share/xcat/IBMhpc/essl/essl_install +installroot=$installroot essldir=$otherpkgs/essl NODESETSTATE=genimage $hpc/essl/essl_install # Run script to accept LoadLeveler license, install product rpms, # and do some config -installroot=$installroot loadldir=/install/post/otherpkgs/$osver/$arch/loadl NODESETSTATE=genimage /opt/xcat/share/xcat/IBMhpc/loadl/loadl_install +installroot=$installroot loadldir=$otherpkgs/loadl NODESETSTATE=genimage $hpc/loadl/loadl_install diff --git a/xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe.otherpkgs.pkglist b/xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe.otherpkgs.pkglist new file mode 100644 index 000000000..aa2b3c7fb --- /dev/null +++ b/xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe.otherpkgs.pkglist @@ -0,0 +1 @@ +pe/ibm-java2-ppc64-jre diff --git a/xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe.pkglist b/xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe.pkglist index 720f23c80..8f83a10a7 100644 --- a/xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe.pkglist +++ b/xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe.pkglist @@ -1 +1,2 @@ -java-1_4_2-ibm +libibverbs +libibverbs-32bit diff --git a/xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe.sles11.ppc64.otherpkgs.pkglist b/xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe.sles11.ppc64.otherpkgs.pkglist deleted file mode 100644 index 65dcd2a43..000000000 --- a/xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe.sles11.ppc64.otherpkgs.pkglist +++ /dev/null @@ -1,8 +0,0 @@ -IBM_pe_license -#NEW_INSTALL_LIST# -ibm_lapi_ip_sles11 -ibm_lapi_us_sles11 -ibm_pe_sles11 -ppe_pdb_ppc_sles1100 -sci_ppc_32bit_sles1100 -sci_ppc_64bit_sles1100 diff --git a/xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe_install b/xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe_install new file mode 100755 index 000000000..2fd883912 --- /dev/null +++ b/xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe_install @@ -0,0 +1,78 @@ +# +# Sample script to customize options for PE +# For AIX: +# TBD +# For Linux: +# - Create a smaller PNSD log file in /tmp +# - Configure poe.limits file + +OS=`uname` +INSTALL_DIR='/install' +PE_DIR=$pedir + +if [ -z $PE_DIR ]; then + # try to default + PE_DIR=$INSTALL_DIR/post/otherpkgs/$OSVER/$ARCH/pe +fi + + +if [ $NODESETSTATE != "genimage" ]; then + # running as a postscript in a full-disk install or AIX diskless install + installroot="" +fi + + + +if [ $OS != "AIX" ]; then + if [ $NODESETSTATE == "install" ]; then + # Being run from a stateful install postscript + # Copy rpms directly from the xCAT management node and install + mkdir -p /tmp/pe + rm -f -R /tmp/pe/* + cd /tmp/pe + download_dir=`echo $PE_DIR | cut -d '/' -f3-` + wget -l inf -N -r --waitretry=10 --random-wait --retry-connrefused -t 0 -T 60 -nH --cut-dirs=3 ftp://$SITEMASTER/$download_dir/*.rpm 2> /tmp/wget.log + rpm -Uvh IBM_pe_license*.rpm + rpm -Uvh ibm_lapi*.rpm ibm_pe*.rpm ppe_*.rpm sci_*.rpm + cd / + rm -Rf /tmp/pe + fi + + if [ $NODESETSTATE == "genimage" ]; then + # Being called from .postinstall script + # Assume we are on the same machine + chroot $installroot mount -t proc none /proc + if [[ $OS = sles* ]] || [[ $OS = suse* ]] || [[ -f /etc/SuSE-release ]]; then + # For SLES, assume zypper is available on the system running genimage + + IBM_PE_LICENSE_PROMPT=N zypper -R $installroot install $PE_DIR/IBM_pe_license*.rpm + zypper -R $installroot install $PE_DIR/ibm_lapi*.rpm $PE_DIR/ibm_pe*.rpm $PE_DIR/ppe_*.rpm $PE_DIR/sci_*.rpm + else + # For Redhat, etc., assume yum is available on the system running genimage + IBM_PE_LICENSE_PROMPT=N yum --installroot $installroot --nogpgcheck localupdate $PE_DIR/IBM_pe_license*.rpm + yum --installroot $installroot --nogpgcheck localupdate $PE_DIR/ibm_lapi*.rpm $PE_DIR/ibm_pe*.rpm $PE_DIR/ppe_*.rpm $PE_DIR/sci_*.rpm + fi + umount -l $installroot/proc + fi +fi + + + +# Configure the PNSD.cfg to use a smaller log so it doesn't use so much memory +# for a stateless image. Normally, pnsd creates this file if it does not +# exist, but it will not fill it in if it does exist. +if [ ! -f $installroot/etc/PNSD.cfg ]; then + echo "log_file = /tmp/serverlog" > $installroot/etc/PNSD.cfg + echo "log_file_size = 2097152" >> $installroot/etc/PNSD.cfg + echo "socket_file = /tmp/PNSD" >> $installroot/etc/PNSD.cfg +else + /usr/bin/sed -i 's/log_file_size = .*/log_file_size = 2097152/g' $installroot/etc/PNSD.cfg +fi + +# Configure the poe.limits file +if [ ! -f $installroot/etc/poe.limits ]; then + echo "MP_POE_LAUNCH=all" > $installroot/etc/poe.limits +else + /usr/bin/sed -i 's/MP_POE_LAUNCH=.*/MP_POE_LAUNCH=all/g' $installroot/etc/poe.limits +fi + diff --git a/xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe_updates b/xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe_updates deleted file mode 100755 index 09b7a9cfa..000000000 --- a/xCAT-IBMhpc/share/xcat/IBMhpc/pe/pe_updates +++ /dev/null @@ -1,31 +0,0 @@ -# -# Sample script to customize options for PE -# For AIX: -# TBD -# For Linux: -# - Create a smaller PNSD log file in /tmp -# - Configure poe.limits file - -if [ $NODESETSTATE != "genimage" ]; then - # running as a postscript in a full-disk install or AIX diskless install - installroot="" -fi - -# Configure the PNSD.cfg to use a smaller log so it doesn't use so much memory -# for a stateless image. Normally, pnsd creates this file if it does not -# exist, but it will not fill it in if it does exist. -if [ ! -f $installroot/etc/PNSD.cfg ]; then - echo "log_file = /tmp/serverlog" > $installroot/etc/PNSD.cfg - echo "log_file_size = 2097152" >> $installroot/etc/PNSD.cfg - echo "socket_file = /tmp/PNSD" >> $installroot/etc/PNSD.cfg -else - /usr/bin/sed -i 's/log_file_size = .*/log_file_size = 2097152/g' $installroot/etc/PNSD.cfg -fi - -# Configure the poe.limits file -if [ ! -f $installroot/etc/poe.limits ]; then - echo "MP_POE_LAUNCH=all" > $installroot/etc/poe.limits -else - /usr/bin/sed -i 's/MP_POE_LAUNCH=.*/MP_POE_LAUNCH=all/g' $installroot/etc/poe.limits -fi -