TakTuk

From Grid5000
Jump to: navigation, search

TakTuk is a tool for execute one command on a few nodes at the same time. It can be use by admin, to simultaneously run an update on all nodes, or it can be use by users to simultaneously start a script on each node they have reserved.

Contents

Pre-requisites

Before starting using TakTuk, you should configure the SSH public key authentication for your account.

Installing TakTuk

Use the following command (under debian) or install it from sources : aptitude install taktuk

TakTuk has not necessary to be installed on each node. It can propagate itself during his utilization. But in g5k, it will be nearly installed.

Using TakTuk

The first thing is that TakTuk use ssh by default to connect to all nodes. So they should be able to connect to each other without typing anything. After this requirement is ok, you can use TakTuk.

I suppose that you have an ssh-key without passphrase

TakTuk and OAR2 on Grid'5000

  • Start to make a reservation on the frontal of site like this:
Terminal.png users@frontale.site.grid5000.fr:
oarsub -I -l nodes=10
  • At this time you are connected on the head node of your reservation. For example, the head node is the node-15. Your prompt seems to be like that:
Terminal.png users@node-15.site.grid5000.fr:
  • The last step is to execute your command with TakTuk (date is an example of command):
Terminal.png users@node-15.site.grid5000.fr:
taktuk --connector /usr/bin/oarsh -f $OAR_FILE_NODES broadcast exec [ date ]

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

Examples

  • To execute a simple command like date on 1 node:
taktuk -m node-5.site.grid5000.fr broadcast exec [ date ]
  • Same execution but on more than 1 node:
taktuk -m node-5.site.grid5000.fr -m node-10.site.grid5000.fr broadcast exec [ date ]
  • Execute command on nodes given by OAR after reservation
taktuk -f $OAR_FILE_NODES broadcast exec [ date ]
  • Self propagation of TakTuk if it is not available everywhere (works only if you can login from nodes to nodes without typing your password):
taktuk -s -f $OAR_FILE_NODES broadcast exec [ date ]
  • Connect to nodes with a different login, root for instance:
taktuk -l root -f $OAR_FILE_NODES broadcast exec [ date ]
  • In order to test latencies between nodes using taktuk:

As a user from the frontend, run:

taktuk -c "ssh -p 6667" -s -o 'state=(($line == 4)?($init_date - $start_date)." s de connection de $host a $peer (dont ".($init_date-$reply_date)." du a TakTuk)\n":"")' -f allnodes.txt b e [ true ] | tee taktuk.log

where taktuk version is at least 3.3 and allnodes.txt contains the list of the nodes.

Then doing a grep connection taktuk.log | sort -n gives:

0.220579862594604 s de connection de azur-25.sophia.grid5000.fr a sol-12.sophia.grid5000.fr (dont 0.047921895980835 du a TakTuk)
0.220623016357422 s de connection de azur-17.sophia.grid5000.fr a sol-36.sophia.grid5000.fr (dont 0.0476739406585693 du a TakTuk)
0.222663879394531 s de connection de azur-1.sophia.grid5000.fr a sol-24.sophia.grid5000.fr (dont 0.0479059219360352 du a TakTuk)
0.225576162338257 s de connection de azur-30.sophia.grid5000.fr a sol-27.sophia.grid5000.fr (dont 0.0478250980377197 du a TakTuk)
0.226027965545654 s de connection de azur-16.sophia.grid5000.fr a sol-31.sophia.grid5000.fr (dont 0.0470089912414551 du a TakTuk)
...

Links

Personal tools
Namespaces

Variants
Actions
Public Portal
Users Portal
Admin portal
Wiki special pages
Toolbox