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
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
.
make -eGet the apache MySQL Password
export MYSQL_PASSWORD="<apache_mysql_password>" make -e installCheck 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.propertiesIf 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 installMake 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.
Tag the release:
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.
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:
Time to bring it down and install the changes.
Stop apache and tomcat:
Do any database updates required.
Move the build into place:
Start up tomcat & apache:
Test it. Works perfectly.