Home
Name Modified Size InfoDownloads / Week
packages 2014-12-08
examples 2012-06-22
sources 2012-06-22
testplan 2011-12-30
download 2011-12-20
latest 2011-12-20
archives 2011-12-07
README 2013-09-02 4.3 kB
LICENSE 2011-08-19 1.5 kB
Totals: 9 Items   5.8 kB 1
## Requirement:
1. python 2.6+
2. python-ssl
3. python-ldap

## Lance Installation ##
1. Create the main /etc/lance.conf file (refer to the example lance.conf)
2. Create the /etc/lance.d directory to store your configuration files
3. Create all your conf files in /etc/lance.d (all *.conf files in this directory will be read)
4. Copy lance.py , lc.py, lance_manager.py and the associated directories (lance, lance_manager, lance_common) somewhere in your path
5. Ensure the lance, lance_manager, lance_common directories are in the same directory as lance.py and lance_manager.py 
## Lance_manager Installation ##
1. Create the main /etc/lance_manager.conf file (refer to the example lance_manager.conf)
2. Create the /etc/lance.d/remote directory to store your remote configuration files (the <hotname>.conf files matching hostname that connect to lance_manager)
3. Copy lance_manager.py somewhere in your path

## Starting Lance ##
run lance.py 		# start lance foreground (will refuse to start if it's already running)
run lance.py -s		# start the daemon (will refuse to start if it's already running)
run lance.py -d		# start the daemon in debug mode (output errors... on foreground)
run lance.py -r		# review your config file and ensure everything is correct (note that if lance is running with the statefull mode you will be able to see the actual states of running processes...
/etc/init.d/lance start	# Start lance if init.d script deployed
/etc/init.d/lance restart	# Stop and Start lance if init.d script deployed

## Starting Lance_manager ##
run lance_manager.py 	# start lance foreground
run lance_manager.py -s	# start lance manager as daemon
run lance_manager.py -d	# start lance manager as daemon in debug mode (output errors... on foreground)
run lance_manager.py -r # review your config file and ensure everything is correct

## LOGS ##
Lance will output log to standard output if 'log=' option is not set in lance.conf
however, lance is able to talk to syslog directly (default on localhost UDP port 514 (usual syslog port) on local2) 
This can be specified in lance.conf

## Management via CLI ##
lc.py --status			# list the current processes and their status
lc.py --stop <processname>	# stop launching the process specified by <processname>
lc.py --start <processname>	# resume launching the process specified by <processname>
lc.py --run <processname>	# immediatly run the process specified by <processname>. This command reenable the process if it was disabled
lc.py --kill <processname>	# immediatly kill the process specified by <processname>.
lc.py --pause			# pause the daemon (will wait for all running processes to finish)
lc.py --unpause			# unpause the daemon (processes that were disabled with the "stop" command still be disabled)

## Stopping LANCE ##
killall lance.py	# shutdown the daemon (will wait for all running processes to finish)
/etc/init.d/lance stop	# Stop lance if init.d script deployed

## Reloading all configuration files ##
killall -HUP lance.py
/etc/init.d/lance reload	# Reload configuration files (without stopping lance) if lance init.d script is installed

## Printing state to log ##
killall -SIGUSR1 lance.py

## Configuring lance.conf ##
See sample configs provided for information and usage

## Lance.d/*.conf files ##
[myname]                        # (MANDATORY)   The name of the process
command=<mycommand>             # (OPTIONAL)    The command to execute
user=<testuser>                 # (OPTIONAL)    The user to run the command as (must be a local user)
sleep=<x seconds>               # (OPTIONAL)    Number of seconds to sleep between each execution of the process
before=<name>                   # (OPTIONAL)    This process will be executed before the command defined as <name> (the other one is locked until this one finish)
time=HH:MM:SS                   # (OPTIONAL)    Command is run only at time HH:MM:SS
precheck=<precheckcommand>      # (OPTIONAL)    Execute <precheckcommand>, only if the return code is 0 (success), the <command> is executed
manual=[0/1]                    # (OPTIONAL)    Make the process manual, it will never be executed unless a user specificaly run it using the "run" command from the gui or from lc.py command line

Source: README, updated 2013-09-02