Skip to content

Commit

Permalink
updated the docs some
Browse files Browse the repository at this point in the history
  • Loading branch information
agentzh committed Apr 22, 2009
1 parent b9ab67d commit b3ffc5f
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 5 deletions.
2 changes: 1 addition & 1 deletion META.yml
Expand Up @@ -26,4 +26,4 @@ requires:
Set::Scalar: 1.23
Term::ReadKey: 2.30
perl: 5.6.1
version: 0.003
version: 0.004
3 changes: 3 additions & 0 deletions README
Expand Up @@ -55,6 +55,9 @@ DESCRIPTION

Parallel SSH communication is used to ensure minimal latency.

TODO
* Add a "-c" option to the scripts to limit ssh concurrency level.

INSTALLATION
perl Makefile.PL
make
Expand Down
2 changes: 1 addition & 1 deletion bin/atnodes
Expand Up @@ -250,7 +250,7 @@ atnodes - Run command on clusters
=head1 SEE ALSO
L<fornodes>, L<tonodes>, L<SSH::Batch>, L<Net::OpenSSH>.
L<fornodes>, L<tonodes>, L<key2nodes>, L<SSH::Batch>, L<Net::OpenSSH>.
=head1 COPYRIGHT AND LICENSE
Expand Down
7 changes: 7 additions & 0 deletions bin/fornodes
Expand Up @@ -28,12 +28,19 @@ fornodes - Expand patterns to machine host list.
$ cat > ~/.fornodesrc
ps=blah.ps.com bloo.ps.com boo[2-25,32,41-70].ps.com
as=ws[1101-1105].as.com
# use set operations to define new sets:
foo={ps} + {ps} * {as} - {ps} / {as}
^D
$ fornodes 'api[02-10].foo.bar.com' 'boo*.ps.com'
$ fornodes 'tq[ab-ac].[1101-1105].foo.com'
$ fornodes '{ps} + {as} - ws1104.as.com' # set union and subtraction
$ fornodes '{ps} * {as}' # set intersect
=head1 SEE ALSO
L<key2nodes>, L<atnodes>, L<tonodes>, L<SSH::Batch>, L<Net::OpenSSH>.
=head1 COPYRIGHT AND LICENSE
This module as well as its programs are licensed under the BSD License.
Expand Down
6 changes: 5 additions & 1 deletion bin/tonodes
Expand Up @@ -241,6 +241,10 @@ tonodes - Upload local files/directories to remote clusters
$ tonodes /tmp/*.inst -- '{as}:/tmp/'
$ tonodes foo.txt 'ws1105*' :/tmp/bar.txt
# use rsync instead of scp:
$ tonodes foo.txt 'ws1105*' :/tmp/bar.txt -rsync
$ tonodes -r /opt /bin/* -- 'ws[1101-1102].foo.com' 'bar.com' :/foo/bar/
=head1 USAGE
Expand All @@ -263,7 +267,7 @@ tonodes - Upload local files/directories to remote clusters
=head1 SEE ALSO
L<fornodes>, L<atnodes>, L<SSH::Batch>, L<Net::OpenSSH>.
L<fornodes>, L<atnodes>, L<SSH::Batch>, L<key2nodes>, L<Net::OpenSSH>.
=head1 COPYRIGHT AND LICENSE
Expand Down
18 changes: 16 additions & 2 deletions lib/SSH/Batch.pm
Expand Up @@ -25,7 +25,10 @@ Expand patterns to machine host list.
$ cat > ~/.fornodesrc
ps=blah.ps.com bloo.ps.com boo[2-25,32,41-70].ps.com
as=ws[1101-1105].as.com
# use set operations to define new sets:
foo={ps} + {ps} * {as} - {ps} / {as}
^D
$ fornodes 'api[02-10].foo.bar.com' 'boo*.ps.com'
$ fornodes 'tq[ab-ac].[1101-1105].foo.com'
$ fornodes '{ps} + {as} - ws1104.as.com' # set union and subtraction
Expand Down Expand Up @@ -62,13 +65,23 @@ Upload local files/directories to remote clusters
$ tonodes /tmp/*.inst -- '{as}:/tmp/'
$ tonodes foo.txt 'ws1105*' :/tmp/bar.txt
# use rsync instead of scp:
$ tonodes foo.txt 'ws1105*' :/tmp/bar.txt -rsync
$ tonodes -r /opt /bin/* -- 'ws[1101-1102].foo.com' 'bar.com' :/foo/bar/
=item key2nodes
Push the SSH public key (or generate one if not any) to the remote clusters.
$ key2nodes 'ws[1101-1105].as.com'
=back
=head1 DESCRIPTION
This is a high-level abstraction over the powerful L<Net::OpenSSH> module. A bunch of handy scripts are provided to simplify big cluster operations: L<fornodes>, L<atnodes>, and L<tonodes>.
This is a high-level abstraction over the powerful L<Net::OpenSSH> module. A bunch of handy scripts are provided to simplify big cluster operations: L<fornodes>, L<atnodes>, L<tonodes>, and L<key2nodes>.
Parallel SSH communication is used to ensure minimal latency.
Expand Down Expand Up @@ -102,7 +115,8 @@ If you have a branch for me to pull, please let me know ;)
=head1 SEE ALSO
L<fornodes>, L<atnodes>, L<tonodes>, L<SSH::Batch::ForNodes>, L<Net::OpenSSH>.
L<fornodes>, L<atnodes>, L<tonodes>, L<key2nodes>,
L<SSH::Batch::ForNodes>, L<Net::OpenSSH>.
=head1 COPYRIGHT AND LICENSE
Expand Down

0 comments on commit b3ffc5f

Please sign in to comment.