1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
THIS DIRECTORY
This directory contains a library of cluster manipulation scripts.
The main idea is facilitation of parallel operations and minimizaiton
of code duplicaiton.
Executable file is command.sh. It sources the configuration and the rest of
the scripts which implement different functions:
jobs.sh - the main file which defines generic command execution framework.
It implements parallel and per-node command execution routines and
enables unified logging behaviour. Other scripts just have to define
the actual command functions following certain conventions, so far
there is only one: node index is appended to the list of command line
parameters, then everything is passed to the function.
install.sh - implements a cluster-wide 'install' command which takes a name
of the distribution file as the first argument
remove.sh - implements a cluster-wide "remove" command.
action.sh - usual start/stop/restart/check commands, both cluster-wide and
per node.
kill.sh - a per-node kill -9 command
Assumed convention: cluster-wide commands are just commnads, per-node commands
have _node suffix. E.g.
./command.sh start
starts all nodes,
./command.sh stop_node 1
stops only node number 1. Numbering is 0-based.
It is intended that each command should implement its own help.
SPECIAL FILES AND DIRECTORIES:
../conf directory contains configuration files.
Each command creates at least 4 files named <command>_<node_id>.<ext> where
<ext> is:
out - standard output of the command
err - standard error of the command
pid - pid of the porcess executing command
ret - return code of the command
"out" files are placed into $BASE_OUT directory, other files are placed in
$BASE_RUN. The reason to separate is unclear.
|