LUNCH(1) | User Commands | LUNCH(1) |
NAME¶
lunch - Distributed process launcherSYNOPSIS¶
lunch [ config file] [options]DESCRIPTION¶
Lunch is a distributed process launcher for GNU/Linux. The Lunch master launches lunch-slave processes through an encrypted SSH session if on a remote host. Those slave processes can in turn launch the desired commands on-demand.OPTIONS¶
- --version
- show program's version number and exit
- -h, --help
- show this help message and exit
- -f CONFIG_FILE, --config-file=CONFIG_FILE
- Specifies the python config file. You can also simply specify the config file as the first argument.
- -l LOGGING_DIRECTORY, --logging-directory=LOGGING_DIRECTORY
- Specifies the logging and pidfile directory for the master. Default is /var/tmp/lunch
- -q, --log-to-file
- Enables logging master infos to file and disables logging to standard output.
- -g, --graphical
- Enables the graphical user interface.
- -v, --verbose
- Makes the logging output verbose.
- -d, --debug
- Makes the logging output very verbose.
- -k, --kill
- Kills another lunch master that uses the same config file and logging directory. Exits once it's done.
EXAMPLES¶
See the examples directory for examples. On a Debian or Ubuntu system, they should located in the /usr/share/doc/lunch/examples/ directory.add_command("xeyes")
add_command("xeyes", identifier="xeyes")
add_command("xlogo", depends=["xeyes"])
add_command("xclock", depends=["xeyes", "xlogo"])
add_command("xeyes")
add_command("xeyes", user="johndoe", host="example.org")
|____ssh____lunch-slave____xeyes
add_command("ls -l", identifier="listing...", respawn=False)
add_local_address("192.168.1.2")
# We will not use SSH for this one,
# since we just added its host using the
# "add_local_address" function.
add_command("xeyes",
identifier="local_xeyes",
user="johndoe", host="192.168.0.2")
# We will use SSH for the next one,
# since its host is not set as being the local host.
add_command("xeyes -geometry 300x400",
identifier="remote_xeyes",
user="johndoe", host="example.org")
OPERATION¶
The lunch executable is called the lunch master. The lunch-slave executable is called the lunch slave. If run as a master, it launches slaves. The slaves are responsible for launching child processes. The master launches slaves (via SSH or not) which, in turn, launch child processes.for f in /var/tmp/lunch/master-*.pid; do kill -15 $(cat $f); done
GRAPHICAL USER INTERFACE¶
When invoked with the --graphical option, (-g) the lunch master shows a graphical user interface displaying the state of every managed process. When this window is closed, the lunch master exits and kills all its children processes.SSH KEYS MANAGEMENT¶
If using for more than one host, lunch needs a SSH server installed on each remote computer. It is also needed that the public SSH key of your user on the master computer must be installed on every slave computer. Here is a summary of the steps to do to create a SSH key on your master computer, and send your public key on each slave computer.$ mkdir -p ~/.ssh
$ chmod 700 ~/.ssh
$ ssh-keygen -f ~/.ssh/id_rsa -t rsa
$ ssh-copy-id <username>@<host>
$ ssh username@host 'echo Hello'
$ ssh-agent bash
$ ssh-add
HISTORY¶
2010 - Ported from multiprocessing to TwistedREPORTING BUGS¶
See http://svn.sat.qc.ca/trac/lunch for help and documentation.SEE ALSO¶
lunch-slave (1)January 2011 | lunch 0.4.0 |