<?xml version="1.0" standalone="no"?>

<kickstart>

<description>
App node

</description>


<changelog>
</changelog>

<main>
   <!-- kickstart 'main' commands go here -->
</main>

<pre>
   <!-- partitioning commands go here -->
</pre>


<!-- There may be as many packages as needed here. Just make sure you only
     uncomment as many package lines as you need. Any empty <package></package>
     tags are going to confuse rocks and kill the installation procedure
-->
<package>emacs-common</package> 
<package>emacs-nox</package> 
<package>SL_rpm_show_arch</package>
   <!-- ATLAS Requirements -->
<package>mysql</package>
<package>mysql.i386</package>
<package>compat-gcc-34</package>
<package>compat-gcc-34.i386</package>
<package>compat-gcc-34-c++</package>
   <!-- Need to put into place -->
<package>compat-gcc-34-c++.i386</package>
<package>compat-gcc-34-g77</package>
   <!-- Need to put into place -->
<package>compat-gcc-34-g77.i386</package>
<package>compat-glibc-headers</package>
<package>compat-glibc-headers.i386</package>
<package>compat-glibc</package>
<package>compat-glibc.i386</package>
<package>compat-libgcc-296.i386</package>
<package>compat-libstdc++-296.i386</package>
<package>compat-openldap</package>
<package>compat-openldap.i386</package>
<package>compat-readline43</package>
<package>compat-readline43.i386</package>
<package>libidn.i386</package>
<package>curl.i386</package>
<package>openssl097a</package>
<package>openssl097a.i386</package>
<package>openssl-devel</package>
<package>libidn-devel</package>
<package>libidn-devel.i386</package>
<package>zlib-devel</package>
<package>zlib-devel.i386</package>
<package>libsepol-devel</package>
<package>libsepol-devel.i386</package>
<package>libselinux-devel</package>
<package>libselinux-devel.i386</package>
<package>keyutils-libs-devel</package>
<package>keyutils-libs-devel.i386</package>
<package>e2fsprogs-devel</package>
<package>e2fsprogs-devel.i386</package>
<package>krb5-devel</package>
<package>krb5-devel.i386</package>
<package>curl-devel</package>
<package>curl-devel.i386</package>
<package>gmp</package>
<package>gmp.i386</package>
<package>libstdc++43-devel</package>
<package>libstdc++43-devel.i386</package>
<package>libgfortran43</package>
<package>libgfortran43.i386</package>
<package>gcc43</package>
<package>gcc43-c++</package>
<package>gcc43-gfortran</package>
<package>glib</package>
<package>glib.i386</package>
<package>libpng.i386</package>
<package>libjpeg.i386</package>
<package>libXpm.i386</package>
<package>gd</package>
<package>gd.i386</package>
<package>glibc-utils</package>
<package>libgomp.i386</package>
<package>glib2-devel</package>
<package>glib2-devel.i386</package>
<package>libIDL.i386</package>
<package>libIDL-devel</package>
<package>libIDL-devel.i386</package>
<package>libpcap.i386</package>
<package>libstdc++-devel</package>
<package>libstdc++-devel.i386</package>
<package>libtermcap-devel</package>
<package>libtermcap-devel.i386</package>
<package>popt.i386</package>
<package>libuser.i386</package>
<package>libXinerama.i386</package>
<package>libxml2-devel</package>
<package>libxml2-devel.i386</package>
<package>perl-Config-General</package>
<package>perl-Convert-ASN1</package>
<package>perl-DateManip</package>
<package>perl-DBD-MySQL</package>
<package>perl-Digest-SHA1</package>
<package>perl-Digest-HMAC</package>
<package>perl-Net-SSLeay</package>
<package>perl-IO-Socket-SSL</package>
<package>perl-Compress-Zlib</package>
<package>perl-HTML-Tagset</package>
<package>perl-HTML-Parser</package>
<package>perl-URI</package>
<package>perl-libwww-perl</package>
<package>perl-XML-Parser</package>
<package>perl-libxml-perl</package>
<package>perl-TermReadKey</package>
<package>mx</package>
<package>MySQL-python</package>
<package>lapack</package>
<package>lapack.i386</package>
<package>blas</package>
<package>blas.i386</package>
<package>blas-devel</package>
<package>blas-devel.i386</package>
<package>urw-fonts</package>
<package>libtiff.i386</package>
<package>gnutls.i386</package>
<package>cups-libs.i386</package>
<package>ghostscript-fonts</package>
<package>ghostscript</package>
<package>ghostscript.i386</package>
<package>giflib</package>
<package>giflib.i386</package>
<package>compat-db</package>
<package>compat-db.i386</package>
<package>libXft.i386</package>
<package>libXrender.i386</package>
<package>subversion</package>
<package>subversion.i386</package>
<package>subversion-devel</package>
<package>subversion-devel.i386</package>
<package>subversion-javahl</package>
<package>subversion-perl</package>
<package>subversion-ruby</package>
<package>vim-common</package>
<package>vim-enhanced</package>
<package>libgfortran44.i386</package>
<package>libgfortran44</package>
<package>openmotif22.i386</package>
<package>openmotif22</package>


<post>
   <!-- Insert your post installation script here. This
   code will be executed on the destination node after the
   packages have been installed. Typically configuration files
   are built and services setup in this section. -->

   <!-- WARNING: Watch out for special XML chars like ampersand,
   greater/less than and quotes. A stray ampersand will cause the
   kickstart file building process to fail, thus, you won't be able
   to reinstall any nodes. It is recommended that after you create an
   XML node file, that you run:

      xmllint -noout file.xml
   -->

   <eval shell="python">

      <!-- This is python code that will be executed on the
      frontend node during kickstart file generation. You may contact
      the database, make network queries, etc.  These sections are
      generally used to help build more complex configuration
      files.  The 'shell' attribute is optional and may point to any
      language interpreter such as "bash", "perl", "ruby", etc.
      By default shell="bash".  -->

   </eval>


<!-- Local Job Working Area -->
mkdir /scratch
chmod 1777 /scratch
<!-- ======================================================================= -->
<file name="/etc/cron.daily/scratch-watch" perms="0755" mode="append">
find /scratch -maxdepth 1 -mindepth 1 -mtime +5 -exec rm -rf {} \;
</file>

<!-- Torque mod for users with home directories on /cluster -->
echo '$usecp *:/cluster /cluster' >> /opt/torque/mom_priv/config



<!-- ======================================================================= -->
<file name="/etc/rc.d/init.d/bmcconfig" perms="0755">
#!/bin/sh
#
# chkconfig: 2345 99 20
# description: BMC Configuration Bootstrap

install_log=/root/bmc-config.log

start(){
echo "===== config BMC - START =====" >> $install_log

MYIPADDR=`/bin/hostname -i`
BMCADDR=`echo $MYIPADDR | awk -F . '{print $1".128."$3"."$4}'`

echo "My IP address is $MYIPADDR" >> $install_log
echo "My BMC address is $BMCADDR" >> $install_log

# Setup root user
/usr/bin/ipmitool user set name 2 root >> install_log
/usr/bin/ipmitool user set password 2 root  >> install_log
/usr/bin/ipmitool user enable 2 >> install_log
# Setup networking
/usr/bin/ipmitool lan set 1 ipsrc static >> install_log
/usr/bin/ipmitool lan set 1 ipaddr $BMCADDR  >> install_log
/usr/bin/ipmitool lan set 1 netmask 255.0.0.0 >> install_log
/usr/bin/ipmitool lan set 1 defgw ipaddr 10.1.1.1 >> install_log
/usr/bin/ipmitool lan set 1 access on >> install_log




# clean up this file
/sbin/chkconfig --del /etc/rc.d/init.d/bmcconfig
mv /etc/rc.d/init.d/bmcconfig /tmp
rm -f /etc/rc.d/init.d/RCS/bmcconfig*

echo "===== BMC Configuration - END =====" &gt;&gt; $install_log
}

case "$1" in
  start)
    start
    ;;
  stop)
    ;;
  *)
    echo $"Usage: $0 {start|stop}"
    exit 1
esac


exit $?


</file>

/sbin/chkconfig --add bmcconfig
/sbin/chkconfig bmcconfig on 

<!-- =======================Installing cvmfs================================ -->

cd /etc/yum.repos.d/
wget http://cvmrepo.web.cern.ch/cvmrepo/yum/cernvm.repo
      
cd  /etc/pki/rpm-gpg/
wget http://cvmrepo.web.cern.ch/cvmrepo/yum/RPM-GPG-KEY-CernVM 

yum install fuse
yum install cvmfs
yum install cvmfs-init-scripts

mkdir -p /var/cache/cvmfs
mkdir -p /etc/cvmfs/local.d

<file name="/etc/cvmfs/local.d/default.conf" perms="0644">
CVMFS_USER=cvmfs
CVMFS_NFILES=32768
CVMFS_CACHE_DIR=/var/cache/cvmfs
CVMFS_QUOTA_LIMIT=-1
CVMFS_SERVER_URL=http://cernvm-webfs.cern.ch/opt/@org@
CVMFS_OPTIONS=allow_other,remount_sleep=10,entry_timeout=10,attr_timeout=10,timeout=10,negative_timeout=10
CVMFS_REPOSITORIES=atlas
CVMFS_HTTP_PROXY="http://app-1-17.local:3128;gk07.atlas-swt2.org:3128;http://cernvm.lbl.gov:3128;DIRECT"
</file>

/sbin/chkconfig cvmfs on
/sbin/service cvmfs start

<file name="/tmp/ctabs" perms="0644">
<![CDATA[@reboot /sbin/chkconfig cvmfs on > /dev/null 2>&1
@reboot /sbin/service cvmfs start >/dev/null 2>&1
]]>
</file>

crontab -u root /tmp/ctabs

<!-- =======================Installing squid================================
-->

wget http://grid-deployment.web.cern.ch/grid-deployment/flavia/frontier-squid-2.7.STABLE9-3.7.sl5.x86_64.rpm
rpm -ivh --prefix=/app/squid frontier-squid-2.7.STABLE9-3.7.sl5.x86_64.rpm

<file name="/tmp/tabs" perms="0644">
<![CDATA[7 7 * * * /app/squid/etc/squid/cron/daily.sh > /dev/null 2>&1
8 * * * * /app/squid/etc/squid/cron/hourly.sh >/dev/null 2>&1
]]>
</file>

crontab -u squid  /tmp/tabs

<file name="/app/squid/etc/squid/customize.sh" perms="0755">
<![CDATA[awk --file `dirname $0`/customhelps.awk --source '{
setoption("acl NET_LOCAL src", "10.0.0.0/255.0.0.0")
setoption("cache_mem", "512 MB")
setoptionparameter("cache_dir", 3, "40000")
print
}'
]]>
</file>

chown -R squid:squid /app/squid/
/etc/init.d/frontier-squid reload

<file name="/etc/exports" perms="0644">
/app 10.0.0.0/255.0.0.0(rw,no_root_squash,async)
</file>
/usr/sbin/exportfs -fav

</post>

</kickstart> 

-- AldenStradling - 01-Oct-2010

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2010-10-01 - AldenStradling
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback