TakTuk

From Grid5000
Jump to navigation Jump to search

Short Explanation about how it work

To speed up the execution of a command on a large number of nodes, TakTuk

  • uses a tree to launch programs on all reserved nodes.
  • initiates a few connections in parallel (the deployment window) and distributes the remaining deployment work to already

deployed peers using an adaptive work-stealing algorithm (Extract of A guide of TakTuk use by Guillaume Huard).

Taktuk schema.png

Therefore, for taktuk to operate correctly, peers should be able to connect to each other. [A completer pour dire s'il s'agit de ssh et pour donner une commande qui permet de vérifier que ça va marcher, genre ssh node1 ssh node2]

Using TakTuk with the base environment

Prerequisites

Starting with a reservation:

Terminal.png users@frontale.site.grid5000.fr:
oarsub -I -l nodes=4

Now you should have:

Terminal.png users@node-15.site.grid5000.fr:


Using Taktuk to launch scripts

To launch scripts simultaneously on each node:

Terminal.png users@node-15.site.grid5000.fr:
taktuk -f $OAR_FILE_NODES broadcast exec [/home/site/user/testScript.sh]

Note: do not forget to type the characters [ and ]

By default, Taktuk displays a lot of informations but it might not be necessary. So you can add some options on command line to modify correctly the output [c'est pas trés clair pour l'utilité des options connector et status]:

-o connector -o status -o output='"$host: $line\n"'

Example:

To know if time clock are synchronised on each node (Result formated correctly)

Terminal.png users@node-15.site.grid5000.fr:
taktuk -o connector -o status -o output='"$host: $line\n"' -f $OAR_FILE_NODES broadcast exec [date]

Output

node-101.bordeaux.grid5000.fr: Fri Mar 23 09:38:46 CET 2007
node-23.bordeaux.grid5000.fr: Fri Mar 23 09:38:46 CET 2007
node-24.bordeaux.grid5000.fr: Fri Mar 23 09:38:46 CET 2007
node-67.bordeaux.grid5000.fr: Fri Mar 23 09:38:46 CET 2007
node-97.bordeaux.grid5000.fr: Fri Mar 23 09:38:46 CET 2007

To know cpu's installed on nodes:

plemoine@node-101:$ taktuk -o connector -o status -o output='"$host: $line\n"' -f $OAR_FILE_NODES broadcast exec ["cat /proc/cpuinfo | grep 'model name'"] | uniq

Output

node-101.bordeaux.grid5000.fr: model name       :                   Intel(R) Xeon(TM) CPU 3.00GHz
node-23.bordeaux.grid5000.fr: model name        : AMD Opteron(tm) Processor 248
node-24.bordeaux.grid5000.fr: model name        : AMD Opteron(tm) Processor 248
node-67.bordeaux.grid5000.fr: model name        :                   Intel(R) Xeon(TM) CPU 3.00GHz
node-97.bordeaux.grid5000.fr: model name        :                   Intel(R) Xeon(TM) CPU 3.00GHz

Using TakTuk with your own environment and no taktuk installation on it

Prerequisites

Starting to make a reservation:

Terminal.png users@frontale.site.grid5000.fr:
oarsub -I -l nodes=4 -q deploy

Deploy environment:

Terminal.png users@frontale.site.grid5000.fr:
kadeploy -p part -f $OAR_FILE_NODES -e sid-x64-nfs-1.0

Using Taktuk to launch programs

[Ca ne me dit pas ce qu'il faut faire pour executer sans taktuk, mais seulement comment executer en tant que root : à mon avis, il manque une étape] To execute command as root for update , you have to use the following option: "-l root" as the first one used on the command line:

Terminal.png users@frontale.site.grid5000.fr:
taktuk -l root -s -o connector -o status -o output='"$host: $line\n"' -f $OAR_FILE_NODES broadcast exec ["apt-get update"]