< 

Table of Contents


NU Deployment Notes

Table of Contents


Introduction

This section is for NU developers only. It should be used together with the generic deployment documention in the section titled Deployment.

At NU we deploy two instances of WordHoard:

  • The public version on Welles (wordhoard.northwestern.edu = welles.library.northwestern.edu).

    This version of WordHoard is available to anyone who wishes to use it, at Northwestern or anywhere else on the Internet. We create accounts for scholars on this site, for those researchers who need to save word and work sets or create user annotations.

  • The NU class version on Noir (noir.at.northwestern.edu).

    This version of WordHoard is for use by students in NU classes and by other authorized users. Users have accounts, and may save word and work sets and create annotations.


The public version on Welles

Welles hosts all the parts of the public WordHoard version.

Welles is a SunOS host. The system administrator is Steve DiDomenico (steve@northwestern.edu).

To maintain the version of WordHoard on Welles, log on using the whoard account.

Use sftp to transfer files. To transfer an archive file, use zip, not tar. Sun's tar implementation often has problems reading tarballs produced on other systems.

MySQL information:

  • Home directory = /usr/local/mysql
  • Data directory = /app/mysql/whoard
  • Port number = 3307
  • Data file owner = whoard
  • Data file group = whoard
  • Config file = /etc/mywhoard.cnf

The following useful aliases and scripts are available for working with the MySQL databases:

  • mysql-start: Starts MySQL.
  • mysql-stop: Stops MySQL.
  • mysql: Runs the MySQL command line client.
  • save-user-tables.csh: Saves the static database user tables.
  • restore-user-tables.csh: Restores the static database user tables.

The server directory is located at ~whoard/server.

WordHoard server settings:

  • RMI registry port = 1099
  • RMI port = 1098

The web directory for WordHoard is located at /w3/wordhoard.


The NU class version on Noir

Noir hosts all the parts of the NU class WordHoard version.

Noir is a GNU Linux host. The system administrator is Jim Lindsay (j-lindsay@northwestern.edu)

To maintain the version of WordHoard on Noir, log on using the wordhoard account.

Use either sftp or SMB file sharing to transfer files to Noir.

MySQL information:

  • Home directory = /usr/local/mysql5
  • Data directory = /var/lib/mysql5
  • Port number = 3306
  • Data file owner = mysql
  • Data file group = mysql
  • Config file = /usr/local/mysql5/my.cnf

Use the sudo command to maintain the MySQL data files in /var/lib/mysql5:


> sudo su
Password: (enter the wordhoard account password)
# MYSQL_DATA='/var/lib/mysql5' ; export MYSQL_DATA
# ... (manage the MySQL data files)
# <ctrl>d
>

The following useful aliases and scripts are available for working with the MySQL databases:

  • mysql-start: Starts MySQL.
  • mysql-stop: Stops MySQL.
  • mysql: Runs the MySQL command line client.
  • save-user-tables.sh: Saves the static database user tables.
  • restore-user-tables.sh: Restores the static database user tables.

The server directory is located at ~wordhoard/server.

WordHoard server settings:

  • RMI registry port = 1100
  • RMI port = 0 (RMI uses an unused port number)

The web directory for WordHoard is located at /var/www/html/wordhoard.


Deploying a New Release to Both Welles and Noir

Use this checklist when deploying a new NU release. These instructions are for deploying WordHoard from John Norstad's Mac to both Welles and Noir.

Step 1 - Preliminaries

Make certain the version number is set correctly in both the source code and in the user manual. In the source code, edit the properties file at edu/northwestern/at/wordhoard/resources/wh.properties. There are two lines near the top of this file which must be changed. In the user manual, edit the version number and the release date near the top of the file index.html.

Add release notes for the new version to the user manual file version-history.html.

Run the WDG HTML validator to make sure all the user manual files are strict HTML. Use the notes in the file at ~jln/Documents/WordHoard/validate-userman-html.txt.

Rebuild the source code and the javadoc:


% b full
% b doc

Archive the source code for this release. Copy the src directory to ~jln/Documents/WordHoard/Archived release source coce.

If necessary, rebuild the static database:


% full-build

Step 2 - Prepare the deployment files

Zip the static database:


> mysql-stop
> su
Password:
# cd /usr/local/mysql/data
# zip -r wordhoard wordhoard
# mv wordhoard.zip ~jln/Documents/WordHoard/dev/
# cd ~jln/Documents/WordHoard/dev/
# chown jln wordhoard.zip 
# chgrp staff wordhoard.zip 
# <ctrl>d
% mysql-start

Zip the "secret source":


% zip -r secret-src src

Create the server jar file:


% scripts/create-server-jar.csh

Create the client jar files:


% source scripts/welles-vars 
% scripts/create-client-jar.csh 
Enter store password for keystore:
Enter key password for alias nujarsigner:
% source scripts/noir-vars 
% scripts/create-client-jar.csh 
Enter store password for keystore:
Enter key password for alias nujarsigner:

Zip the user manual:


% zip -r userman userman

Zip the javadoc:


% zip -r javadoc javadoc

Make the "other files" for the user manual:


% scripts/make-other-files.csh
% zip -r other-files other-files
% rm -rf other-files

Zip the raw data files:


% zip -r data data

The following files are now ready for deployment:

  • wordhoard.zip = zipped static database
  • secret-src.zip = zipped secret source
  • wordhoardserver.jar = server jar file
  • userman.zip = zipped user manual html files and images
  • javadoc.zip = zipped javadoc
  • other-files.zip = zipped other files
  • data.zip = zipped raw data files
  • client-noir/wordhoard.jar = Noir client jar file
  • client-welles/wordhoard.jar = Welles client jar file

Step 3 - Deploy to Noir

Upload files:


% sftp wordhoard@noir.at.northwestern.edu
wordhoard@noir.at.northwestern.edu's password: 
sftp> put *.zip
sftp> put wordhoardserver.jar
sftp> lcd client-noir
sftp> put wordhoard.jar
sftp> quit

Deploy the static database:


> ssh wordhoard@noir.at.northwestern.edu
wordhoard@noir.at.northwestern.edu's password: 
> unzip wordhoard.zip
> mysql-stop
>sudo su
Password:
# export MYSQL_DATA='/var/lib/mysql5'
# ./save-user-tables.sh 
# rm -rf $MYSQL_DATA/wordhoard
# mv wordhoard $MYSQL_DATA/wordhoard
# chown -R mysql $MYSQL_DATA/wordhoard
# chgrp -R mysql $MYSQL_DATA/wordhoard
# ./restore-user-tables.sh 
# <ctrl>d
% mysql-start

Deploy the server jar file:


> server/bin/stop
> mv wordhoardserver.jar server/lib
> server/bin/start

Deploy the client jar file:


> mv wordhoard.jar public_html/client

Deploy the user manual:


> mv *.zip public_html
> cd public_html
> unzip userman.zip
> rm userman.zip
> mv javadoc.zip userman
> mv other-files.zip userman
> mv wordhoard.zip userman/data-files
> mv data.zip userman/data-files
> cd userman
> unzip javadoc.zip
> unzip other-files.zip
> rm *.zip

Logout:


# <ctrl>d

Test the new client and the new user manual to make certain everything works.

Step 4 - Deploy to Welles

Upload files:


% sftp whoard@welles.library.northwestern.edu
whoard@welles.library.northwestern.edu's password: 
sftp> put *.zip
sftp> put wordhoardserver.jar
sftp> lcd client-welles
sftp> put wordhoard.jar
sftp> quit

Deploy the static database:


% ssh whoard@welles.library.northwestern.edu
whoard@welles.library.northwestern.edu's password: 
> unzip wordhoard.zip
> mysql-stop
> ./save-user-tables.csh 
> cd /app/mysql/whoard
> rm -rf wordhoard
> mv ~/wordhoard .
> cd
> ./restore-user-tables.csh 
> mysql-start

Deploy the server jar file:


> server/bin/stop
> mv wordhoardserver.jar server/lib
> server/bin/start

Deploy the client jar file:


> mv wordhoard.jar /w3/wordhoard/client

Deploy the user manual:


> mv *.zip /w3/wordhoard
> cd /w3/wordhoard
> unzip userman.zip
> rm userman.zip
> mv javadoc.zip userman
> mv other-files.zip userman
> mv wordhoard.zip userman/data-files
> mv data.zip userman/data-files
> cd userman
> unzip javadoc.zip
> unzip other-files.zip
> rm *.zip

Logout:


> <ctrl>d

Test the new client and the new user manual to make certain everything works.

Step 5 - Clean up

Delete the deployment files:


% rm *.zip
% rm wordhoardserver.jar

< 

Table of Contents