Deploy-to-cluster
From PTAGISWiki
How to deploy changes to the PTAGIS web site From walk-through of procedure with Marton 5/20/04
pitblade:/dsk2/installs/ptagis-1.0
This directory contains the bundled update packages that are available for installing. It therefore is a good list of historical updates that have been applied to this instance of the ptagis web application.
For this example, the files that I used are:
ptagis-1.1-usermgmt-20040519.txt # installation document ptagis-1.1-usermgmt-20040519.zip # zipped bundle
The installation document describes the changes contained in the update, the files it contains, how to install them, and how to test them. These files are generally the java source and compiled classes within a directory structure that corresponds to the ptagis-1.0 directory structure. In this case, the directory tree looks like this:
ptagis-1.0/src/ldap/*java ptagis-1.0/classes/ldap/*class
Deploy the update on pitblade
This step is skipped here, since it was previously done by Jim Beale. The following procedure of installing on the production cluster should be similar though.
Deploy on the cluster
reedi:/global/ds1/pitweb/src/ptagis-1.0
This is the corresponding directory for applied updates on the cluster. The first step is to ftp the files from the udpate directory on pitblade to here. I used ftp to do the following:
pitblade:/dsk2/installs/ptagis-1.0/ptagis-1.1-usermgmt-20040519* --> reedi:/global/ds1/pitweb/src/ptagis-1.0
Now the txt and zip files are in place.
The subdirectory called 'work' is the place to unpack the the zip file so that it can be installed.
cd work tar xvf ../ptagis-1.1-usermgmt-20040519.zip
Next copy the files from the src directory to the executable area.
cd work/ptagis-1.0 cp -r * /global/ds1/pitweb/ptagis-1.0/
SIDEBAR: How to compile the java source
The updates are delivered in a package that includes the source and the compiled classes, so it is generally not necessary to compile the classes. But we go through the procedure here for grins since it doesn't have any negative impact and is good to know.
Scripts to aid in compiling are in:
/global/ds1/pitweb/ptagis-1.0/bin
The scripts are: config.sh, make.sh, and run.sh
From the main directory, I call the make.sh script like so:
pwd /global/ds1/pitweb/ptagis-1.0 bin/make.sh src/ldap/*.java
The successful compile generated no messages.
END OF COMPILE SIDEBAR
Now to deploy the classes from source tree to executable tree as described in the install document.
pwd /global/ds1/pitweb/ptagis-1.0 cp classes/ldap/*.class web/ptagis/WEB-INF/classes/ldap cp classes/ldap/*.class web/sree/WEB-INF/classes/ldap
Restart the web app server via the web console
Log in to the url http://reedi:7001/console and navigate to the control to stop and start the reedi web app (servers, appserver reedi, control) Be ready to select "Graceful shutdown of this server", but before selecting it, log in to reedi and have the command ready to restart the app server.
Login to reedi, SU to root and then start tcsh.
cd /usr/local/bea81/user_projects/mydomain2 ./startManagedWebLogic.sh & # but don't press return yet!
With that command ready on reedi, you can go back to the web console and issue the graceful shutdown command. It takes 30 seconds or so. The web page will auto-update and display the current status of the server as it goes from running, to shutdown in progress, to stopped. After the server stops, issue the command at the command line:
./startManagedWebLogic.sh &
After a few screen-fulls of console messages go by, you should see a message like this:
<May 20, 2004 11:05:31 AM PDT> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
If you see a message like this:
The WebLogic Server did not start up properly.
Then you probably were not root or not running a tcsh.
Follow these same instructions to restart the app server on rufus, and then
both machines in the cluster will be using the new code.
