Last change
on this file since 51d3aa0 was
9b3627e,
checked in by Ted Faber <faber@…>, 15 years ago
|
SEER support
|
-
Property mode set to
100644
|
File size:
1.5 KB
|
Line | |
---|
1 | #!/usr/bin/perl |
---|
2 | |
---|
3 | use strict; |
---|
4 | |
---|
5 | use gateway_lib; |
---|
6 | |
---|
7 | use IO::File; |
---|
8 | |
---|
9 | use Getopt::Long; |
---|
10 | |
---|
11 | my $ssh_pubkey; |
---|
12 | my $ssh_privkey; |
---|
13 | my $active; |
---|
14 | my $tunnelip; |
---|
15 | my $peer; |
---|
16 | my $fedkit_dir= "/usr/local/federation"; |
---|
17 | my $perl = "/usr/bin/perl"; |
---|
18 | my $iface_file = "/var/emulab/boot/ifmap"; |
---|
19 | my $ssh = "/usr/bin/ssh"; |
---|
20 | my $seer; |
---|
21 | my $ssh_port = 22; |
---|
22 | my @ports; |
---|
23 | my $use_file; |
---|
24 | my $ssh_privkey; |
---|
25 | |
---|
26 | my %opts = ( |
---|
27 | 'peer=s' => \$peer, |
---|
28 | 'ssh_privkey=s' => \$ssh_privkey, |
---|
29 | 'fedkit=s' => \$fedkit_dir, |
---|
30 | 'perl=s' => \$perl, |
---|
31 | 'ssh=s' => \$ssh, |
---|
32 | 'use_file' => \$use_file, |
---|
33 | 'seer' => \$seer, |
---|
34 | ); |
---|
35 | |
---|
36 | exit(20) unless GetOptions(%opts); |
---|
37 | |
---|
38 | if ($use_file) { |
---|
39 | gateway_lib::read_config(gateway_lib::config_filename(), \%opts) |
---|
40 | } |
---|
41 | |
---|
42 | my $client = gateway_lib::client_conf_filename(); |
---|
43 | my $f = new IO::File($client); |
---|
44 | my $eid; |
---|
45 | my $pid; |
---|
46 | |
---|
47 | while (<$f>) { |
---|
48 | /^ExperimentID:\s+(\S+)/ && do { |
---|
49 | ($pid, $eid) = split("/", $1); |
---|
50 | }; |
---|
51 | } |
---|
52 | $f->close(); |
---|
53 | while (!-e "/proj/$pid/exp/$eid/tbdata/node.pem") { |
---|
54 | print "Waiting for key\n"; |
---|
55 | sleep(10); |
---|
56 | } |
---|
57 | |
---|
58 | my $cmd = "/usr/bin/scp -o \"StrictHostKeyChecking no\" " . |
---|
59 | "-i $ssh_privkey /proj/$pid/exp/$eid/tbdata/*.pem $peer:$fedkit_dir/etc"; |
---|
60 | print "calling $cmd\n"; |
---|
61 | system($cmd); |
---|
62 | |
---|
63 | my $cmd = "$ssh -o \"StrictHostKeyChecking no\" -o \"ForwardX11 no\" " . |
---|
64 | "-i $ssh_privkey $peer python /usr/local/seer/experiment-setup.py " . |
---|
65 | "-F -c 0 Basic &"; |
---|
66 | print "calling $cmd\n"; |
---|
67 | system($cmd); |
---|
68 | |
---|
69 | $cmd = "python /usr/local/seer/experiment-setup.py -r control.$eid.$pid -r $peer Basic"; |
---|
70 | print "Calling $cmd\n"; |
---|
71 | system($cmd); |
---|
Note: See
TracBrowser
for help on using the repository browser.