source: fedkit/combo_active.pl @ b73cc45

axis_examplecompt_changesinfo-opsversion-3.01version-3.02
Last change on this file since b73cc45 was 2b35261, checked in by Ted Faber <faber@…>, 15 years ago

Initial docs

  • Property mode set to 100644
File size: 2.5 KB
Line 
1#!/usr/bin/perl
2
3use strict;
4
5use gateway_lib;
6
7use IO::File;
8
9use Getopt::Long;
10
11my $ssh_pubkey;
12my $ssh_privkey;
13my $tunnelip;
14my $peer;
15my $fedkit_dir= "/usr/local/federation";
16my $perl = "/usr/bin/perl";
17my $iface_file;
18my $ssh = "/usr/bin/ssh";
19my @ports;
20
21exit(20) unless GetOptions(
22    'ssh_pubkey=s' => \$ssh_pubkey,
23    'ssh_privkey=s' => \$ssh_privkey,
24    'tunnelip' => \$tunnelip,
25    'peer=s' => \$peer,
26    'fedkit=s' => \$fedkit_dir,
27    'perl=s' => \$perl,
28    'interfaces=s' => \$iface_file,
29    'ssh=s' => \$ssh,
30    'port=s', \@ports,
31);
32
33
34my $tunnelparam = $tunnelip ? '--tunnelip' : '';
35my $portparam = join(" --port=", @ports);
36
37# join doesn't prefix the first one
38$portparam="--port=$portparam" if $portparam;
39
40system("$perl -I$fedkit_dir/lib $fedkit_dir/bin/active_config.pl " .
41    "--peer=$peer --ssh_pubkey=$ssh_pubkey --ssh_privkey=$ssh_privkey " .
42    " $tunnelparam --fedkit=$fedkit_dir --perl=$perl " .
43    "--ssh=$ssh --interfaces=$iface_file");
44exit(20) if $?;
45
46system("$perl -I$fedkit_dir/lib $fedkit_dir/bin/port_forward.pl " .
47    "--peer=$peer --ssh_pubkey=$ssh_pubkey --ssh_privkey=$ssh_privkey " .
48    " $tunnelparam --fedkit=$fedkit_dir --perl=$perl " .
49    "--ssh=$ssh $portparam");
50exit(20) if $?;
51
52=pod
53
54=head1 NAME
55
56B<combo_active.pl> - Do both the active configuration of a connectiveity gateway and service port forwarding.
57
58=head1 OPTIONS
59
60=over 8
61
62=item B<fedkit=>I<install_dir>
63
64Directory in which this software is installed.  Generally not needed.
65
66=item B<interfaces=>I<interface table>
67
68A list of interfaces to forward data on of the form:
69
70=begin text
71
72iface ip_addr
73
74=end text
75
76The interface is the operating system name of the interface and the IP address
77is given in standard dotted decimal notation.  Other characters on a line are
78ignored.
79
80=item B<peer=>I<hostname>
81
82The other gateway providing forwarding.
83
84=item B<perl=>I<perl_binary>
85 
86Location of the perl binary.  Usually unneeded.
87
88=item B<port=>I<port_spec>
89
90Forward the given port.  The port is specified as
91for B<port_forward.pl>
92
93=item B<ssh=>I<ssh_binary>
94
95The pathname of the ssh binary.  Unusally unnecessary.
96
97=item B<ssh_pubkey=>I<keyfile>
98
99A public to install as authorized.
100
101=item B<ssh_privkey=>I<identity_file>
102
103The identity to use for remote access
104
105=item B<tunnelip>
106
107True if the testbed uses the DETER tunnelip extension to provide external
108connectivity information
109
110=back
111
112=head1 SYNOPSIS
113
114Call B<active_config.pl> and B<port_forward.pl> with the relevant parameters.
115
116
117=head1 AUTHORS
118
119Ted Faber <faber@isi.edu>
120
121=cut
Note: See TracBrowser for help on using the repository browser.