NAME: ruby queue - rq SYNOPSIS: rq is a tool for building simple linux clusters using coordinated shared access to an nfs mounted priority job queue EXAMPLE INSTALL: the packages/ directory contains ALL packages required to install rq. the file install.sh will install ALL required packages for ruby queue into an nfs mounted directory. it is a simple script - feel free to read/edit. installed packages will include: - ruby-1.8.1 - sqlite-2.8.15 - sqlite-ruby-1.3.1 - arrayfields-3.4.0 - posixlock-0.0.1 - lockfile-1.1.0 - rq-0.1.7 the install.sh procedure is reccomended since - a common nfs filesystem is required on which to store the queue anyhow - installing all packages into this common nfs filesystem means no software will be installed locally on any node which simplifies maintainance and the addition of new nodes to the cluster. - this technique implies only two requirements for any node to join the cluster: - mount the nfs filesystem - add a single crontab entry install.sh should/will not run as root so the user running it must have write permission (or sudo write permission) to the /nfs mounted directory: following are the steps for an install into the nfs mounted directory '/nfs'. absolutely NO packages or files will be installed outside this hierachy so simply use 'rm -rf' to un-install. - tar xvfz rq-all.tgz - cd rq-all/ - ./install.sh /nfs or - ./install.sh /nfs sudo if you require sudo to write to /nfs/ EXAMPLE SETUP: the following instructions assume your PATH has been set appropriately on all nodes: - export PATH=/nfs/bin/:$PATH create the queue (one node - one time only) - rq /nfs/queue create add crontab entries similar to below to keep immortal feeders alive on ALL nodes. this will not start feeders every 15 mintues - it will only attempt to start one every 15 minutes, failing silently if one is already running. */15 * * * * /nfs/bin/rq /nfs/queue feed --daemon --log=/home/YOUR_USERNAME/cfq.log --quiet >/dev/null 2>&1 EXAMPLE USAGE: submit a command line job to the nfs mounted queue - rq /nfs/queue submit 'echo 42' submit a list of jobs from 'jobfile'. jobfile is simply a text file with one command per line. blank lines and comments (#) are ignored. - rq /nfs/queue submit < jobfile check the status of your jobs (note that it may take cron a while to start feeders depending on interval used in crontab entry) - rq /nfs/queue status for more info - rq help AUTHOR: ara.t.howard@noaa.gov