Changeset 9c166cf for fedkit


Ignore:
Timestamp:
Nov 5, 2008 1:38:10 AM (16 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
Children:
2dafa0c
Parents:
2c6128f
Message:

Support for this as a real fedkit. Loads using fedd and establishes connectivity

Location:
fedkit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • fedkit/Makefile

    r2c6128f r9c166cf  
    1 BINARIES=fed_bootstrap federate.sh smbmount.FreeBSD.pl smbmount.Linux.pl \
     1BINARIES=federate.sh smbmount.FreeBSD.pl smbmount.Linux.pl \
    22         make_hosts fed-tun.pl fed-tun.ucb.pl fed_evrepeater
    33PATCHES=rc.accounts.patch
    44
    5 fedkit.tgz:
     5fedkit.tgz:     ${BINARIES} ${PATCHES}
    66        mkdir -p /tmp/fedkit/local/federation/bin
    77        mkdir -p /tmp/fedkit/local/federation/etc
     
    99        cp ${PATCHES} /tmp/fedkit/local/federation/etc
    1010        tar czf fedkit.tgz -C /tmp/fedkit local
    11         rm -rf /tmp/fedkit$$
     11        rm -rf /tmp/fedkit
     12
     13clean:
     14        rm -f fedkit.tgz
  • fedkit/federate.sh

    r2c6128f r9c166cf  
    5858PROJECT=`$EMUDIR/tmcc -b status | $PERL -ne '/ALLOCATED=([^\/]+)\/([^\s]+)/ && print "$1\n";'`
    5959EXP=`$EMUDIR/tmcc -b status | $PERL -ne '/ALLOCATED=([^\/]+)\/([^\s]+)/ && print "$2\n";'`
    60 SCRIPTDIR="/proj/$PROJECT/exp/$EXP/tmp"
     60CONFIGDIR="/proj/$PROJECT/exp/$EXP/tmp"
     61SCRIPTDIR="/usr/local/federation/bin"
    6162
    6263# Die if Scripts are not where they should be.  NB, this is checked by the
    6364# bootstrapper, too, so a failure here is unlikely.
    64 if [ -z "$SCRIPTDIR" ] ; then
    65     echo "Can't find federation scripts.  Tmcc status says:"
     65if [ -z "$CONFIGDIR" ] ; then
     66    echo "Can't find federation configs.  Tmcc status says:"
    6667    $EMUDIR/tmcc -b status
    6768    exit 1;
     
    7071# Get our gateway, share, and mount user from the configuration file.
    7172# There's probably a way to get all three at once, but this works.
    72 GATEWAY=`$PERL -ne '/ControlGateway:\s+(.*)/i && print "$1\n";' $SCRIPTDIR/client.conf`
    73 SHARE=`$PERL -ne '/SMBShare:\s+(.*)/i && print "$1\n";' $SCRIPTDIR/client.conf`
    74 SMBUSER=`$PERL -ne '/ProjectUser:\s+(.*)/i && print "$1\n";' $SCRIPTDIR/client.conf`
    75 SMBPROJECT=`$PERL -ne '/ProjectName:\s+(.*)/i && print "$1\n";' $SCRIPTDIR/client.conf`
     73GATEWAY=`$PERL -ne '/ControlGateway:\s+(.*)/i && print "$1\n";' $CONFIGDIR/client.conf`
     74SHARE=`$PERL -ne '/SMBShare:\s+(.*)/i && print "$1\n";' $CONFIGDIR/client.conf`
     75SMBUSER=`$PERL -ne '/ProjectUser:\s+(.*)/i && print "$1\n";' $CONFIGDIR/client.conf`
     76SMBPROJECT=`$PERL -ne '/ProjectName:\s+(.*)/i && print "$1\n";' $CONFIGDIR/client.conf`
    7677
    7778# XXX: modified seer daemon to read a config file.  Not in the tarfile yet.  If
     
    8889# Copy the seer.conf to the local /tmp if there is one
    8990
    90 if [ -e $SCRIPTDIR/seer.conf ]; then
    91         /bin/cp $SCRIPTDIR/seer.conf /tmp
     91if [ -e $CONFIGDIR/seer.conf ]; then
     92        /bin/cp $CONFIGDIR/seer.conf /tmp
    9293fi
    9394
     
    9798# localhost entry that's aliased to this host's name.
    9899grep 127\\.0\\.0\\.1 /etc/hosts > /tmp/hosts
    99 cat "$SCRIPTDIR/hosts" >> /tmp/hosts
     100cat "$CONFIGDIR/hosts" >> /tmp/hosts
    100101# If there's no node in this experiment called control, fake one so
    101102# that SEER events get through (if SEER's in use)
    102 if ! grep -q control $SCRIPTDIR/hosts; then
     103if ! grep -q control $CONFIGDIR/hosts; then
    103104        echo "$GWIP     control.$EXP.$PROJECT" >> /tmp/hosts
    104105fi
     
    110111# fragile and needs to change.  To make matters worse, our FBSD62-SMB images
    111112# contain the patched rc.accounts, so this patching step will fail there.
    112 cd "$EMUDIR/rc"
    113 patch -f < /tmp/rc.accounts.patch
    114 cd /tmp
     113
     114if [ -e /usr/local/federation/etc/rc.accounts.patch ]; then
     115        cd "$EMUDIR/rc"
     116        patch -f < /usr/local/federation/etc/rc.accounts.patch
     117        cd /tmp
     118fi
    115119
    116120#
     
    167171#
    168172echo "Mounting via SMB."
    169 $PERL "/tmp/$SMBMOUNT" $SHARE $GATEWAY $SMBUSER $SMBPROJECT
     173$PERL "/usr/local/federation/bin/$SMBMOUNT" $SHARE $GATEWAY $SMBUSER $SMBPROJECT
    170174
    171175echo "Restoring old bossnode"
  • fedkit/make_hosts

    r2c6128f r9c166cf  
    1717PROJECT=`$EMUDIR/tmcc -b status | $PERL -ne '/ALLOCATED=([^\/]+)\/([^\s]+)/ && print "$1\n";'`
    1818EXP=`$EMUDIR/tmcc -b status | $PERL -ne '/ALLOCATED=([^\/]+)\/([^\s]+)/ && print "$2\n";'`
    19 SCRIPTDIR="/proj/$PROJECT/exp/$EXP/tmp"
     19CONFIGDIR="/proj/$PROJECT/exp/$EXP/tmp"
     20SCRIPTDIR="/usr/local/federation/bin"
    2021
    2122# Very simple script to copy the global hosts file over the local one
     
    5051# Copy the seer.conf to the local /tmp if there is one
    5152
    52 if [ -e $SCRIPTDIR/seer.conf ]; then
    53         /bin/cp $SCRIPTDIR/seer.conf /tmp
     53if [ -e $CONFIGDIR/seer.conf ]; then
     54        /bin/cp $CONFIGDIR/seer.conf /tmp
    5455fi
    5556
Note: See TracChangeset for help on using the changeset viewer.