JPS: John Parallel SSH


NEWS
16/12/2005 !! NEW !! Version 1.2 release 3b is out. Download it here.
Added a get function. This can be of a use to retrieve log files or diagnostic scripts output (vm-support, sysreport etc...) on a large amount of nodes.
!! LAST MINUTE !! Bugfix on "set aggregate_output yes" variable (bug on release 3, use 3b)
14/12/2005 Well... got some spare time today so Version 1.2 release 2 is out. Download it here.
See changelog inside jps itself. Started to break down the huge and ugly parse_input function...
14/12/2005 Don't like JPS ? check out clusterssh (graphical interface), pssh(C coded, for huge networks)...
11/12/2005 Version 1.2 release 1 is out. Download it here.
Several bugfix both in spec file and in jps itself.Feedback is welcome.
10/12/2005 Well... Recreated my work environment on my laptop. First Irish build on way...
JPS is a bash tool using most well known Unix commands and ssh in order to simplify treatment on a large number of nodes. Links: The latest JPS source code (1.2-3) ... The default JPS conf file . In case you want to see a simple RPM spec file, you can look at JPS spec file Following this link, you can Download all versions of JPS and see the improvments each version brings. Example: The machine we start jps on is cydrenlin. We want to administrate 6 servers, named wsd1 to swd6. We decide that we want to check their redhat version, see how the update themseves (/etc/sysconfig/rhn/sources) and list the available updates. [jlubatti@cydrenlin ~]$ jps JPS: John's Parrallel SSH ? for help Loading... Done #>sh lists Registered lists: => 192.168.0 => all.dataprep => all.de => all.de.chrootholders => all.de.sun => all.ML => all.qa => all.qa2 => all.test => all.wsd #>load all.wsd #>sh conf ssh user: root ssh_timeout: 10 serialize = off print_nodes = no print_summary = yes aggregate_output = yes color_a = 33 color_b = 34 color_c = 31 color_normal = 39 No tempo defined Output log is directed to file /home/jlubatti/test.log lists dir set to /home/jlubatti/.jps/lists macros dir set to /home/jlubatti/.jps/macros Loaded nodes: => wsd1 => wsd2 => wsd3 => wsd4 => wsd5 => wsd6 #>run all cat /etc/redhat-release All done... =>>> wsd1,wsd2,wsd3,wsd4,wsd5,wsd6 <<<= (0) Red Hat Enterprise Linux WS release 4 (Nahant Update 1) ============================================================ 6 Nodes completed command(s) successfully Distant Current Directory : #>r a cat /etc/sysconfig/rhn/sources All done... =>>> wsd1,wsd2,wsd3,wsd4,wsd5,wsd6 <<<= (0) ### This describes the various package repositories (repos) that up2date will ### query for packages. It currently supports apt-rpm, yum, and "dir" repos. ### Format is one repository (repo) entry per line, # starts comments, the ### first word on each line is the type of repo. ### The default RHN (using "default" as the url means use the one in the ### up2date config file). This is required. up2date default ### Note: when a channel label is required for the non up2date repos, ### the label is solely used as an internal identifier and is not ### based on the url or any other info from the repos. ### An apt style repo (the example is arjan's 2.6 kernel repo). ### The format is: ### type channel-label service:server path repo name #apt arjan-2.6-kernel-i386 http://people.redhat.com ~arjanv/2.5/ kernel ### Note: for apt repos, there can be multiple repo names specified (space ### seperated). ### A yum style repo. The format is: ### type channel-label url #yum fedora-core-development http://download.fedora.redhat.com/pub/fedora/linux/core/development/$ARCH/ ### A local directory full of packages (a "dir" repo). For example: #dir my-favorite-rpms /var/spool/RPMS/ # Multiple versions of all repos except "up2date" can be used. Dependencies # can be resolved "cross-repo" if need be. ============================================================ 6 Nodes completed command(s) successfully Distant Current Directory : #>!vi sources # Webraska update channels yum Mychannel_rhel4_WS http://up2date.fr.mydomain.com/rh_channels/rhel4_WS yum Mychannel_extra_rhel4 http://up2date.fr.mydomain.com/rh_channels/rhel4_extras #>put all sources All done... =>>> wsd1,wsd2,wsd3,wsd4,wsd5,wsd6 <<<= (0) ============================================================ 6 Nodes completed command(s) successfully Distant Current Directory : #>r a cp /etc/sysconfig/rhn/sources /etc/sysconfig/rhn/sources.bak All done... =>>> wsd1,wsd2,wsd3,wsd4,wsd5,wsd6 <<<= (0) ============================================================ 6 Nodes completed command(s) successfully Distant Current Directory : #>r a cp -f /root/sources /etc/sysconfig/rhn/sources All done... =>>> wsd1,wsd2,wsd3,wsd4,wsd5,wsd6 <<<= (0) ============================================================ 6 Nodes completed command(s) successfully Distant Current Directory : #>CD /etc/sysconfig/rhn #>r a ls All done... =>>> wsd1,wsd3,wsd4,wsd6 <<<= (0) allowed-actions clientCaps.d rhncfg-client.conf rhnsd sources sources.bak systemid up2date up2date-keyring.gpg up2date-uuid =>>> wsd2,wsd5 <<<= (0) allowed-actions clientCaps.d rhncfg-client.conf rhnsd sources sources.bak systemid systemid.save up2date up2date-keyring.gpg up2date-uuid ============================================================ 6 Nodes completed command(s) successfully Distant Current Directory : /etc/sysconfig/rhn #>run all up2date -l All done... =>>> wsd1,wsd2,wsd3,wsd4,wsd5,wsd6 <<<= (0) Fetching Obsoletes list for channel: Mychannel_rhel4_WS... Fetching obsoletes list for http://up2date.fr.mydomain.com/rh_channels/rhel4_WS... Fetching Obsoletes list for channel: Mychannel_extra_rhel4... Fetching obsoletes list for http://up2date.fr.mydomain.com/rh_channels/rhel4_extras... Fetching rpm headers... Name Version Rel ---------------------------------------------------------- ============================================================ 6 Nodes completed command(s) successfully Distant Current Directory : /etc/sysconfig/rhn So with this small example, you can see how easy it is to manage your nodes. JPS have numerous features like: - macros (scripts that are uploaded on each node and executed there) - tempo (wait S seconds each N nodes ) - interactive help (?) - exploration of an unknown network using nmap - easy list management ( edition with vi, list merging, node addition/deletion) - man page ;-) - history (press arrow up/down to get previous entered line !) - file name completion - proper wildcards handling - complete log of all actions performed - aggregation of similar outputs - colorized display of standard output and standard error etc....