You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by je...@apache.org on 2003/01/19 10:28:18 UTC

cvs commit: xml-forrest/src/resources/forrestbot/scripts launch-overseer local-vars local-vars-cocoondev.org local-vars-sample overseer refresh

jefft       2003/01/19 01:28:18

  Modified:    src/resources/forrestbot/scripts launch-overseer local-vars
                        local-vars-cocoondev.org local-vars-sample overseer
                        refresh
  Log:
  More documentation, and improve the lauch-overseer script
  
  Revision  Changes    Path
  1.4       +26 -4     xml-forrest/src/resources/forrestbot/scripts/launch-overseer
  
  Index: launch-overseer
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/forrestbot/scripts/launch-overseer,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- launch-overseer	7 Dec 2002 13:11:13 -0000	1.3
  +++ launch-overseer	19 Jan 2003 09:28:18 -0000	1.4
  @@ -10,10 +10,32 @@
   NAMEDPIPE=$WEBAPP/WEB-INF/commands
   
   if [ ! -p "$NAMEDPIPE" -a -e "$NAMEDPIPE" ]; then
  -  echo "$NAMEDPIPE exists and is not a named pipe. Please delete it and try again"
  +  echo "----------------------------------"
  +  echo "ERROR: The file:"
  +  echo "  $NAMEDPIPE"
  +  echo "exists and is not a named pipe. Please delete it and try again"
  +  echo "----------------------------------"
     exit
   fi
   [ ! -e "$NAMEDPIPE" ] && mkfifo $NAMEDPIPE
  -nohup ./overseer < $NAMEDPIPE > overseer.log &
  -echo overseer pid: $!
  -tail -f $WEBAPP/WEB-INF/refresh_log.txt overseer.log
  +
  +OVERSEER_LOG=overseer.log
  +
  +nohup ./overseer < $NAMEDPIPE > $OVERSEER_LOG &
  +
  +# Touch the two log files to stop the tail breaking
  +>> $OVERSEER_LOG
  +>> $REFRESH_LOG
  +
  +PID=$!
  +echo "------------------------------------"
  +echo "Forrestbot 'overseer' server running"
  +echo
  +echo "pid               : $PID"
  +echo "command read from : $NAMEDPIPE"
  +echo "logs written to   : $REFRESH_LOG"
  +echo "------------------------------------"
  +echo
  +echo "Now tailing logs... press ctrl-c to exit"
  +
  +tail -f $REFRESH_LOG $OVERSEER_LOG
  
  
  
  1.2       +4 -0      xml-forrest/src/resources/forrestbot/scripts/local-vars
  
  Index: local-vars
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/forrestbot/scripts/local-vars,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- local-vars	7 Dec 2002 09:21:59 -0000	1.1
  +++ local-vars	19 Jan 2003 09:28:18 -0000	1.2
  @@ -10,6 +10,10 @@
   # Defaults
   [ -z "$BASE" ] && BASE=.
   [ -z "$WEBAPP" ] && WEBAPP=$BASE/../webapp
  +[ -z "$REFRESH_LOG" ] && REFRESH_LOG=$WEBAPP/WEB-INF/refresh_log.txt
   [ -z "$TIMEOUT" ] && TIMEOUT=$[20*60]
  +[ -z "$PIDFILE" ] && PIDFILE=$BASE/overseer.pid
  +
  +
   echo BASE=$BASE
   echo WEBAPP=$WEBAPP
  
  
  
  1.5       +27 -2     xml-forrest/src/resources/forrestbot/scripts/local-vars-cocoondev.org
  
  Index: local-vars-cocoondev.org
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/forrestbot/scripts/local-vars-cocoondev.org,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- local-vars-cocoondev.org	9 Jan 2003 08:49:04 -0000	1.4
  +++ local-vars-cocoondev.org	19 Jan 2003 09:28:18 -0000	1.5
  @@ -1,11 +1,36 @@
   # Env variables specific to cocoondev
   
   export JAVA_HOME=/usr/jdk1.3.1_03
  -# BASE *must* be declared
  +
  +# BASE is a pointer to the 'scripts' directory from Forrest. It defaults to
  +# '.', and should be set to an absolute path if called from cron
   BASE=/usr/serverlocal/forrestbot/scripts
  +
  +# Points to a CVS checkout of the xml-forrest module, which will be
  +# (optionally) 'cvs update'ed and rebuilt on every run.  Defaults to
  +# $BASE/../../../../ ie, assuming the user is in
  +# xml-forrest/src/resources/forrestbot/scripts/
   FORREST=/usr/serverlocal/src/apache/xml-forrest
  +
  +# Assuming the overseer command is being fed instructions from the webapp, this
  +# variable points to the webapp context root.  Defaults to $BASE/../webapp
   WEBAPP=/www/forrestbot.cocoondev.org/webapps/ROOT
  +
  +# If you want the 'publish_livesite' command to work, you must set XML_SITE to
  +# point to a CVS checkout of the xml-site module.
   XML_SITE=/home/j/jeffturner/xml-site
  +
  +# Max number of seconds we expect a full forrestbot run to take, before we
  +# assume something's hung and kill the processes.  Defaults to 20 minutes.
   TIMEOUT=$[10*60]
  -REGEN_FORREST=true
  +
  +# Set this to true if you want to delete any local mods to the $FORREST and
  +# update from CVS.  Not recommended unless scripts/ is moved outside the
  +# xml-forrest CVS hierarchy. Defaults to false
  +REGEN_FORREST=false
  +
  +# In a headless environment like your typical Unix box (not running X), you
  +# should install Xvfb, and set this DISPLAY variable appropriately. No default.
  +# The value ':0' is correct if Xvfb is invoked with:
  +# /usr/X11R6/bin/Xvfb :0 -screen 0 2048x2048x24
   export DISPLAY=:0
  
  
  
  1.2       +5 -0      xml-forrest/src/resources/forrestbot/scripts/local-vars-sample
  
  Index: local-vars-sample
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/forrestbot/scripts/local-vars-sample,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- local-vars-sample	19 Jan 2003 06:45:07 -0000	1.1
  +++ local-vars-sample	19 Jan 2003 09:28:18 -0000	1.2
  @@ -33,6 +33,11 @@
   # xml-forrest CVS hierarchy. Defaults to false
   REGEN_FORREST=false
   
  +# Location of 'refresh' script logfile. If you change this, remember to change
  +# it in the JSP too. 
  +REFRESH_LOG=$WEBAPP/WEB-INF/refresh_log.txt
  +
  +
   # In a headless environment like your typical Unix box (not running X), you
   # should install Xvfb, and set this DISPLAY variable appropriately. No default.
   # The value ':0' is correct if Xvfb is invoked with:
  
  
  
  1.4       +0 -3      xml-forrest/src/resources/forrestbot/scripts/overseer
  
  Index: overseer
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/forrestbot/scripts/overseer,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- overseer	19 Jan 2003 05:22:42 -0000	1.3
  +++ overseer	19 Jan 2003 09:28:18 -0000	1.4
  @@ -9,9 +9,6 @@
   
   . `dirname $0`/local-vars
   
  -# If you change this, remember to change it in the JSP too
  -REFRESH_LOG=$WEBAPP/WEB-INF/refresh_log.txt
  -
   function lookup_script()
   {
   	echo $1-cvs.xml
  
  
  
  1.4       +3 -0      xml-forrest/src/resources/forrestbot/scripts/refresh
  
  Index: refresh
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/forrestbot/scripts/refresh,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- refresh	7 Dec 2002 14:43:12 -0000	1.3
  +++ refresh	19 Jan 2003 09:28:18 -0000	1.4
  @@ -29,7 +29,10 @@
   # out CVS source.  Setting to false is faster, but less safe
   [ -z "$REGEN_WORK" ] && REGEN_WORK=true
   FORRESTBOT_SCRIPTS=$FORREST/src/resources/forrestbot/samples
  +
  +# Directory in which to build a clean version of Forrest
   SHBAT=$BASE/shbat
  +# Work directory for CVS checkouts, forrestbot files etc.
   WORK=$BASE/work