Rename gpfs-nas-postinstall.sh to install_gpfs_nas.sh and factor out GPFS fu
authorMartin Schwenke <martin@meltin.net>
Fri, 1 Jun 2012 02:51:02 +0000 (12:51 +1000)
committerMartin Schwenke <martin@meltin.net>
Fri, 1 Jun 2012 02:51:02 +0000 (12:51 +1000)
The script name should say what it does, not what it might be used
for...

Also add setup_build.sh.

Signed-off-by: Martin Schwenke <martin@meltin.net>
base/all/root/scripts/install_gpfs.sh [new file with mode: 0755]
base/all/root/scripts/install_gpfs_nas.sh [moved from base/all/root/scripts/gpfs-nas-postinstall.sh with 55% similarity]
base/all/root/scripts/setup_build.sh [new file with mode: 0755]
examples/create_cluster.sh

diff --git a/base/all/root/scripts/install_gpfs.sh b/base/all/root/scripts/install_gpfs.sh
new file mode 100755 (executable)
index 0000000..9eda202
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# we have to force the base GPFS package first, due to the way gpfs updates work
+echo "Installing GPFS base"
+yum -y install gpfs.base-@@GPFS_BASE_VERSION@@.@@RHEL_ARCH@@
+
+# then update it
+
+echo "Updating GPFS base"
+yum -y update
+
+echo "Installing remaining GPFS packages"
+yum -y install gpfs.docs gpfs.gpl gpfs.msg.en_US
+
+echo "Rebuilding the GPFS modules"
+(cd /usr/lpp/mmfs/src && make Autoconfig World InstallImages)
similarity index 55%
rename from base/all/root/scripts/gpfs-nas-postinstall.sh
rename to base/all/root/scripts/install_gpfs_nas.sh
index 1784e9d..68cf0ab 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # Make this explicit so we only get RHEL updates to make things nice
 # and clear.  This duplicates what happens in basic-postinstall.sh but
@@ -7,14 +7,7 @@
 echo "Updating from YUM repositories"
 yum -y update
 
-# we have to force the base GPFS package first, due to the way gpfs updates work
-echo "Installing GPFS base"
-yum -y install gpfs.base-@@GPFS_BASE_VERSION@@.@@RHEL_ARCH@@
-
-# then update it
-
-echo "Updating GPFS base"
-yum -y update
+$(dirname $0)/install_gpfs.sh
 
 echo "Installing ctdb packages"
 yum -y install ctdb ctdb-debuginfo ctdb-devel ctdb-tests
@@ -22,11 +15,5 @@ yum -y install ctdb ctdb-debuginfo ctdb-devel ctdb-tests
 echo "Installing samba packages"
 yum -y install samba samba-debuginfo samba-client samba-doc
 
-echo "Installing remaining GPFS packages"
-yum -y install gpfs.docs gpfs.gpl gpfs.msg.en_US
-
-echo "Rebuilding the GPFS modules"
-(cd /usr/lpp/mmfs/src && make Autoconfig World InstallImages)
-
 echo "Installing rssh"
 yum -y install rssh
diff --git a/base/all/root/scripts/setup_build.sh b/base/all/root/scripts/setup_build.sh
new file mode 100755 (executable)
index 0000000..2acccfa
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+#
+# Setup build node                                                              
+#
+
+$(dirname $0)/install_gpfs.sh
+
+# Setup RPM development                                                         
+echo "Installing RPM developing and setting up rpm build"
+yum -y install rpmdevtools
+rpmdev-setuptree
+
+# Packages required for samba development                                       
+echo "Installing Samba build dependencies"
+yum -y install readline-devel libacl-devel \
+    libxslt docbook-utils docbook-style-xsl
index 650e5ee..474983d 100755 (executable)
@@ -54,7 +54,7 @@ waitfor "/var/log/kvm/serial.${n1}" "login:" 120
 nodes=$(sed -r -n -e "s@.*[[:space:]](${CLUSTER}n[[:digit:]]+)\$@\1@p" /etc/hosts)
 # Could avoid this by creating a special base and doing it in postinstall
 for i in $nodes ; do
-    ssh -o StrictHostKeyChecking=no "$i" ./scripts/gpfs-nas-postinstall.sh
+    ssh -o StrictHostKeyChecking=no "$i" ./scripts/install_gpfs_nas.sh
 done
 
 ssh "$n1" ./scripts/setup_gpfs.sh