Changeset 3c7da22 for fedkit


Ignore:
Timestamp:
Sep 17, 2007 11:35:32 AM (17 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:
f70f9c8
Parents:
a098fab
Message:

Parameterize federate.sh and smbmount.pl (several parameters were hard wired)

make_hosts runs on deter nodes when DETER is the master testbed. It puts
all the federated hosts into /etc/hosts

Location:
fedkit
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • fedkit/federate.sh

    ra098fab r3c7da22  
    3737cp /tmp/hosts /etc/hosts && rm /tmp/hosts
    3838
    39 GATEWAY=`$EMUDIR/tmcc -b syncserver | awk ' { match($0, /SERVER=[^[:space:]]+/); print substr($0,RSTART+8,RLENGTH-9);}'`
     39# Get our gateway, share, and mount user from the configuration file.
     40# There's probably a way to get all three at once, but this works.
     41GATEWAY=`perl -ne '/ControlGateway:\s+(.*)/i && print "$1\n";' $SCRIPTDIR/client.conf`
     42SHARE=`perl -ne '/SMBShare:\s+(.*)/i && print "$1\n";' $SCRIPTDIR/client.conf`
     43SMBUSER=`perl -ne '/ProjectUser:\s+(.*)/i && print "$1\n";' $SCRIPTDIR/client.conf`
    4044
    4145#
     
    8185echo "Mounting via SMB."
    8286
    83 exec "/tmp/$SMBMOUNT"
     87exec "/tmp/$SMBMOUNT" $SHARE $SMBUSER $GATEWAY
  • fedkit/smbmount.pl

    ra098fab r3c7da22  
    33
    44$TMCC="/usr/local/etc/emulab/tmcc";
    5 $SHARE="USERS";
    6 $PUSER="jhickey";
    7 $ADDR=`cat /usr/local/etc/emulab/bossnode`;
     5$SHARE=shift || "USERS";
     6$PUSER=shift || "jhickey";
     7$ADDR=shift || `cat /usr/local/etc/emulab/bossnode`;
    88
    99chomp $ADDR;
  • fedkit/splitter.pl

    ra098fab r3c7da22  
    77use File::Copy;
    88
    9 @scripts = ("federate.sh", "smbmount.pl");
     9@scripts = ("federate.sh", "smbmount.pl", "make_hosts");
    1010$local_script_dir = ".";
    1111
     
    233233$tb_config = $opts{'testbeds'} || "./testbeds"; # testbed configurations
    234234$local_script_dir = $opts{'scriptdir'}; # Local scripts
     235
     236$smb_share = $opts{'smbshare'} ||       # Share to mount from the master
     237    die "Must give an SMB share\n";
     238$project_user = $opts{'smbuser'} ||     # User to mount project dirs as
     239    die "Must give an SMB user\n";
     240
    235241# For now specify these.  We may want to generate them later.
    236242$gw_pubkey = $opts{'gatewaypubkey'};
     
    349355        next;
    350356    };
     357    # End of the gateways section.  Output the client config for this testbed
    351358    /^#\s+End\s+gateways\s+\((\w+)\)/ && do {
    352359        die "Mismatched gateway markers ($1, $gateways)\n"
    353360            unless !$gateways || $gateways == $1;
     361
     362        die "No control gateway for $gateways?" unless $control_gateway;
     363        # Client config
     364        $cc = new IO::File(">$tmpdir/$gateways/client.conf");
     365        die "Can't open $tmpdir/$gateways/client.conf: $!\n" unless $cc;
     366        print $cc "ControlGateway: $control_gateway\n";
     367        print $cc "SMBShare: $smb_share\n";
     368        print $cc "ProjectUser: $project_user\n";
     369        $cc->close();
     370       
    354371        $gateways = 0;
    355372        next;
     
    389406        else { $active_end{"$gateways-$dtb"}++; $active = "true"; }
    390407
     408        # This is used to create the client configuration.
     409        $control_gateway = "$myname$sdomain"
     410            if $type =~ /(control|both)/;
     411
    391412        # Write out the file
    392413        open(GWCONFIG, ">$tmpdir/$gateways/$myname$sdomain.gw.conf") ||
     
    585606F</tmp> is used.
    586607
     608=item SMBShare
     609
     610The SMB share on the master testbed that will be exported to remote clients.
     611
     612=item SMBUser
     613
     614The experiment user to mount project directories as.  This user needs to be a
     615member of the exported experiment - that is one of the users in the project
     616containing this experiment on the master testbed.
     617
    587618=item Tclparse
    588619
Note: See TracChangeset for help on using the changeset viewer.