]> gitweb.fluxo.info Git - hydra.git/commitdiff
Implementing other ssh frontends
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 28 Sep 2011 01:07:58 +0000 (22:07 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 28 Sep 2011 01:07:58 +0000 (22:07 -0300)
share/hydra/mass

index d7b466c88a964b71d53edcf865d248aa74a98ffd..401d1af8aae3f853fb2a5b10055aa137ee7e6c2c 100755 (executable)
@@ -6,6 +6,7 @@
 # Issue commands with pssh
 # See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=549117
 function mass_pssh {
+  echo "Issuing $COMMAND on multiple nodes..."
   hydra_set_tmpfile nodes
   hydra $HYDRA nodes > $TMPWORK
   parallel-ssh -h $TMPWORK -p 4 $COMMAND
@@ -21,6 +22,24 @@ function mass_loop {
   done
 }
 
+# Issue commands with dish
+function mass_dish {
+  echo "Issuing $COMMAND on multiple nodes..."
+  hydra_set_tmpfile nodes
+  hydra $HYDRA nodes > $TMPWORK
+  dish -f -p /dev/null -e "$COMMAND" -g $TMPWORK
+  hydra_unset_tmpfile $TMPWORK
+}
+
+# Issue commands with mussh
+function mass_mussh {
+  echo "Issuing $COMMAND on multiple nodes..."
+  hydra_set_tmpfile nodes
+  hydra $HYDRA nodes > $TMPWORK
+  mussh -b -H $TMPWORK -c "$COMMAND"
+  hydra_unset_tmpfile $TMPWORK
+}
+
 # Load
 source $APP_BASE/lib/hydra/functions || exit 1
 hydra_config_load
@@ -42,4 +61,5 @@ elif [ "$BASENAME" == "mass-web" ]; then
 fi
 
 # Execute commands in hosts
-mass_loop $COMMAND
+BASEDIR="/tmp"
+mass_mussh $COMMAND