Based on Allen Hopkins' Preparing a javapages release for the GSRC website Preparing a javapages release for the GSRC website: Make sure all the required ancillary Java software is installed on the server (Java packages, etc.).

If we have a devel machine, then do this on the devel machine. In any case, do this as the www user:
(syntax here assumes bash)

First, make sure all new work is checked in.
export TESTDIR=~/src_testrelease	# (or any convenient location)
mkdir $TESTDIR
cd $TESTDIR

svn co --username vc@terraswarm.org https://repo.eecs.berkeley.edu/svn/projects/gsrc/javapages/trunk/javapages

export DEST_ROOT=/home/www/java_test
mkdir $DEST_ROOT

export GSRC=$TESTDIR/javapages
cd $GSRC

export GSRCJAVA_DIR=/usr/jdk/latest
./configure

Problems

No j2ee.jar

configure fails with:
checking for J2EE jarfile... configure: WARNING: /usr/j2ee/lib/j2ee.jar not found!
Solutions Stack Overflow says to download http://repo1.maven.org/maven2/javax/javaee-api/6.0/javaee-api-6.0.jar.

Continuing ...

make -e
Get the apache MySQL Password
export MYSQL_PASSWORD="<apache_mysql_password>"
make -e install 
Check that $DEST_ROOT/{gigascale,chess,cps-forces,e3s,embedded,icyphy,robotics,terraswarm,trust}/WEB-INF/classes/gsrc/conf/site.properties has the right password. See Java Password Problem for details.
grep password $DEST_ROOT/{gigascale,chess,cps-forces,e3s,embedded,icyphy,robotics,terraswarm,trust}/WEB-INF/classes/gsrc/conf/site.properties
If the password is not present, then do:
export MYSQL_PASSWORD="<apache_mysql_password>"
rm -f $DEST_ROOT/*/WEB-INF/classes/gsrc/conf/site.properties
make -e install
Make sure that the site.properties file are not world readable.
ls -l $DEST_ROOT/{gigascale,chess,e3s,embedded,icyphy,robotics,terraswarm,trust}/WEB-INF/classes/gsrc/conf/site.properties

Important: There is a problem with the $(STRUTS_FORMS_TIMESTAMP) rule in ptcommon.mk that creates struts-forms.xml. Your best bet is to copy the files over from a previous release. To find the diffs, do:

diff -r -x make.out -x config.status -x configure -x .svn -I '<meta name=' -I '<!-- Generated by javadoc' src_testrelease10 src_testrelease11

To copy the files:

(cd java_test10; tar -cvf /tmp/struts-config.tar */WEB-INF/struts-config.xml)
(cd java_test11; tar -xvf /tmp/struts-config.tar)

If you are adding a new website, be sure to update the file.

(cd java_test11; cp chess/WEB-INF/struts-config.xml cps-forces/WEB-INF/struts-config.xml)

Make links

cd /home/www
ln -s java_test java

Do functional testing to your satisfaction. This will likely start with restarting Tomcat.

Once it tests out OK, edit $TESTDIR/javapages/RELEASE_LOG, adding a new section to the top with the new release tag and a description of the features of the new release. Commit the changes to $TESTDIR/javapages/RELEASE_LOG.

markov$ cd $TESTDIR/javapages
Run "cvs update" to verify that nothing has been modified from its checked-in state:
markov$ cvs update

Tag the release:

markov$ cvs tag "<new_tag>"

markov$ ssh -l www markov

www@markov% cd /home/www
www@markov% setenv NEW_TAG "<new_tag>"
www@markov% cvs -d :ext:source.eecs.berkeley.edu:/home/cvs_gsrc co -r $NEW_TAG -d javapages_$NEW_TAG javapages
www@markov% cd javapages_$NEW_TAG
Edit makefile, removing any unwanted host directories from the DIRS definition.
www@markov% setenv GSRC /home/www/javapages_$NEW_TAG
www@markov% setenv DEST_ROOT /home/www/java_$NEW_TAG
www@markov% ./configure
    Make sure there are no errors in the output.
www@markov% make >& make.out &
www@markov% tail -f make.out
^C
www@markov% setenv MYSQL_PASSWORD <apache_mysql_password>
www@markov% make -e install >& install.out &
www@markov% tail -f install.out
^C
Examine install.out for errors. A good way to find them is to search for "Leaving directory". Fatal make errors should appear immediately before these lines (or at the end of the file).

www@markov% cd /home/www
www@markov% ln -s java_$NEW_TAG java
Edit /home/www/java/*/WEB-INF/classes/gsrc/conf/site.properties, and check that everything is set right for the testbed platform.
Test the installation on markov.


Now for gigascale:

If any database modifications are required, and can be made with the existing system running, make them now, in advance of the down time.

Build /home/www/javapages from the new freeze beforehand:

$ ssh gigascale -l www
www@gigascale% cd /home/www
www@gigascale% setenv NEW_TAG "<new_tag>"
www@gigascale% cvs -d :ext:source.eecs.berkeley.edu:/home/cvs_gsrc co -r $NEW_TAG -d javapages_$NEW_TAG javapages
www@gigascale% cd javapages_$NEW_TAG
Edit makefile, removing any unwanted host directories from the DIRS definition.
www@gigascale% setenv GSRC /home/www/javapages_$NEW_TAG
www@gigascale% setenv DEST_ROOT /home/www/java_$NEW_TAG
www@gigascale% ./configure
www@gigascale% make >& make.out &
www@gigascale% tail -f make.out
^C
www@gigascale% setenv MYSQL_PASSWORD <apache_mysql_password>
www@gigascale% make -e install >& install.out &
www@gigascale% tail -f install.out
^C
Review install.out, searching for "Leaving directory", and look for error messages immediately preceding those lines (or at the end of the file).

Time to bring it down and install the changes.
Stop apache and tomcat:

root@gigascale$ cd /etc/init.d
root@gigascale$ ./gsrc stop

Do any database updates required.

Move the build into place:

www@gigascale% cd /home/www
www@gigascale% rm java  # (the symbolic link)
www@gigascale% ln -s java_$NEW_TAG java

Start up tomcat & apache:

root@gigascale$ cd /etc/init.d
root@gigascale$ ./gsrc start

Test it. Works perfectly.