Implementation Plan - Supplementary

1 Infrastructure components

1.1 Database

Database scripts can be found in SVN under https://svn.ecdf.ed.ac.uk/repo/is/apps/software/JournalAutoUpload/DB/tags/1.1.0r5631.

  1. Log into FINLIVE as the EFIN user. Run the script efin_delete.sql
  2. Log into FINLIVE as the JAMS user. Run the script jams_variations.sql

2. Application components

There are three different applications to be deployed:

jams (web application)

jamsProcess

jamsCleanup

 

2.1 jams (web application)

Redeploy the jams web application on Fenton and Hailes in /u01/app/jams/jams.
 
 
Delete the file /u01/app/jams/jams/healtcheck.jsp
 
Copy the new healthcheck folder from the tag https://svn.ecdf.ed.ac.uk/repo/is/apps/software/JournalAutoUpload/jams/tags/healthcheck1.1.0r6122 to /u01/app/jams/apache-tomcat-6.0.35/webapps
 
Edit the file /u01/app/jams/jams/war/WEB-INF/classes/jdbc.properties:
  • Set the URL for the database
  • Set the username and password for the jamsadmin user.
 
Go to /u01/app/jams/apache-tomcat-6.0.35/webapps
Delete the jams.war file.

> rm jams.war

 
Go to /u01/app/jams/apache-tomcat-6.0.35/bin

> ./shutdown.sh

Go to /u01/app/jams/jams

> ant clean > ant build > ant deploywar

If successful go to /u01/app/jams/apache-tomcat-6.0.35/bin

> ./startup.sh

2.1.1 Test

Check that the jams application has been deployed correctly by asking someone who is authorised to use it to log in.

 

2.2 jamsProcess

jamsProcess is installed on fin-app-kb1 under /home/efin/efin/jams/jamsProcess. A failover copy exists on fin-app-at1.

Log into the server as efin.

2.2.1 Disable the cron

If the cron that runs the run_hourly.sh script has been set, disable it while this application is being redeployed.

2.2.2 Replace the code

Replace the jamsProcess code with that from SVN https://svn.ecdf.ed.ac.uk/repo/is/apps/software/JournalAutoUpload/jamsProcess/tags/1.1.0r5591.

2.2.3 Set local properties

Edit the file jamsProcess/resources/local.properties:

Set the env property to live

Set the database properties - host, port and SID (do not change the values for password or passwordkey)

2.2.4 Compile the code

Set the PATH to include ant:

> export PATH=$PATH:/home/efin/efin/jams/apache-ant-1.8.4/bin

cd to /home/efin/efin/jams/jamsProcess

Run the following

> ant clean

> ant compile

2.2.5 Set the database password

Go to /home/efin/efin/jams/jamsProcess and run the following command

> ant dbpassword -Dpassword=[type password]

Check that the files dbpwd.dat and dbpwdkey.dat have been created in jamsProcess/resources.

Set permissions on all password files in the resources directory:

> chmod 600 *.dat

2.2.6 Test

First check there are no files in /home/efin/efin/jams/jamsfiles/pickuparea.

Go to /home/efin/efin/jams/scripts.

Run the script run_hourly.sh.

Check the log in /home/efin/efin/jams/logs/jamsProcess.log to see if it ran all right.

2.2.7 Reset the cron

If a cron was disabled at step 2.2.1 above, reset it.

 

2.3 jamsCleanup

jamsCleanup is installed on fin-app-kb1 under /home/efin/efin/jams/jamsCleanup. A failover copy exists on fin-app-at1.

Log into the server as efin.

This application is normally scheduled by a cron to run once a week. Check that it is not about to start.

2.3.1 Replace the code

Replace the jamsCleanup code with that from SVN: https://svn.ecdf.ed.ac.uk/repo/is/apps/software/JournalAutoUpload/jamsCleanup/tags/1.1.0r5593

2.3.2 Edit local.properties

Edit the file jamsCleanup/resources/local.properties.

Set the env variable to live.

Set the database properties host, port and SID.

Set the recipients variable to fisload@ed.ac.uk

(Do NOT change the values for user, password and passwordkey).

2.3.3 Compile the code

Ensure the PATH includes /home/efin/efin/jams/apache-ant-1.8.4/bin. From /home/efin/efin/jamsCleanup run the following:

> ant clean

> ant compile

2.3.4 Set the password

From /home/efin/efin/jams/jamsCleanup run the following:

> ant dbpassword -Dpassword=[type password]

2.3.5 Set permissions on password files

chmod both *.dat files to 600.

2.3.6 Check that the process will run

From /home/efin/efin/jams/jamsCleanup run the following:

> ant run

Check the log file jams/logs/jamsCleanup.log.

If the cron has been disabled, reset it.

 

3 Rollout steps

RUN DATABASE SCRIPTS (1)

As the EFIN user run efin_delete.sql against FINTEST.

As the JAMS user run jams_variations.sql against FINTEST.

REDEPLOY THE JAMS WEB APPLICATION (2.1)

Stop tomcat.

Get files from SVN.

Edit jdbc.properties.

Deploy the application.

Put the healthcheck folder into tomcat.

Start tomcat.

REDEPLOY THE jamsProcess APPLICATION (2.2)

Disable the cron (2.2.1).

Get files from SVN (2.2.2).

Edit local.properties (2.2.3)

Compile the jamsProcess code (2.2.4).

Set the database password (2.2.5)

Set permissions on password files (2.2.5).

Check the process will still run (2.2.6).

Reset the cron (2.2.7).

REDEPLOY THE jamsCleanup APPLICATION (2.3)

Get files from SVN (2.3.1).

Edit local.properties (2.3.2).

Compile the code (2.3.3).

Set the password (2.3.4).

Set file permissions on password files (2.3.5).

Check the process will run (2.3.6).