Patching Project.net 9.0

Overview

This document guides a user through the process of upgrading a production installation of Project.net from version 9.0 with a patch release (9.0.*). This procedure will update both the application and its related database. The upgrade consists of the following steps:

  1. Update the Oracle database
    1. Turn off the application and backup the database.
    2. Apply any database table updates.
  2. Deploy and start the new version of the application on the application server.
  3. Set any site-specific configuration values.
  4. Restart the application server.

Unpack the Project.net installation package

The upgrade package includes everything you need in zip archive file. The first step to upgrading Project.net is to unpack the software onto an accessible file location.

  1. If it does not exist, create a temporary directory to unpack the upgrade package, suggested /tmp/pnet or /opt/pnet.
  2. Unzip the zip file from installation package into the directory chosen above. Once unpacked, you will have /opt/pnet/v9.0.1-OS, for example. These instructions will refer to this location as INSTALL_PACKAGE throughout these steps.

Upgrade the Project.net Oracle database

Before installing any upgrade to the Project.net system it is important to back up the Project.net database. This requires that you stop the application to prevent changes to the database during backup.

Prerequisites

  • Assumes the database on an Oracle database server.
  • You will need to know the database server’s hostname and the system password for the Project.net database instance.
  • You will need your procedure for backing up the tables in a database.
  • A working copy of sqlplus. Normally, this is installed with the Oracle database, but if not, the Oracle instant client is sufficient.

Instructions

Note, if an upgrade does not require a database update then version_update will respond "Update script not found:".

  1. Stop the Apache Tomcat server using the commands in the bottom section.
  2. Confirm Project.net is no longer running by:
    1. Attempting to open the Project.net login page from a browser will give a “Page not found” error.
  3. On your database server, follow the procedures to back up the Project.net database tables for users pnet and pnet_user.
  4. To update the database you must be the user oracle or root.
    1. su - oracle
    2. cd $INSTALL_PACKAGE/database/create-scripts/
    3. sh version_update.sh pnet/pnet@pnet 9.0.0
    4. Execute the follow sql scripts, using the password for the pnet_user Oracle user and the database SID. For Oracle XE, the later is XE.
      sqlplus pnet_user/<pnet_user password>@<database SID> @INSTALL_PACKAGE/database/create-scripts/versions/9.0.0/new/synonyms/create_private_table_synonyms.sql
      
      sqlplus pnet_user/<pnet_user password>@<database SID> @INSTALL_PACKAGE/database/create-scripts/versions/9.0.0/new/synonyms/create_private_view_synonyms.sql
      
      sqlplus pnet_user/<pnet_user password>@<database SID> @INSTALL_PACKAGE/database/create-scripts/versions/9.0.0/new/synonyms/create_private_package_synonyms.sql
      
  5. (Optional) To verify the upgrade you can execute the following commands using sqlplus
    1. sqlplus pnet_user/<pnet_user password>@<database SID>
    2. Execute the following four sql commands:
      column object_name format a40
      column object_type format a40
      set linesize 120
      select object_name, object_type from user_objects where status='INVALID';
      
    3. If the upgrade was successful you should see "No rows selected".

Update the Project.net application

  1. Select the folder CATALINA_HOME/webapps and delete the files ROOT folder and ROOT.war file.
  2. The file CATALINA_HOME/conf/Catalina/localhost/ROOT.xml contains database and mail server connection information. Updating Project.net will replace this file, so you should save a copy to another directory for reference.
  3. Once you have saved a copy of CATALINA_HOME/conf/Catalina/localhost/ROOT.xml delete the original file.
  4. Now, copy the latest ROOT.war file from INSTALL_PACKAGE/app/ folder to CATALINA_HOME/webapps folder.
  5. Start the Apache Tomcat server using the commands listed below.

Restore Project.net Tomcat settings

The first time Tomcat is started after updating ROOT.war it will install a new ROOT.xml in CATALINA_HOME/conf/Catalina/localhost/. Edit this file and update the settings to match the copy you saved of the original file. The file should look similar to this:

    <Context debug="5" reloadable="true" crossContext="true">

    <Resource name="jdbc/PnetDB" auth="Container"
      type="javax.sql.DataSource" username="pnet_user" password=<pnet_user password>
      driverClassName="oracle.jdbc.OracleDriver" 
      url="jdbc:oracle:thin:@<database hostname>:1521:<database SID>"
      maxActive="8" maxIdle="4"/>

    <Resource name="mail/PnetSession" auth="Container"
       type="javax.mail.Session"
       mail.smtp.host="<SMTP mail server DN" mail.smtp.port="25"/>

    </Context>

You will need to stop and restart Tomcat to have these changes take effect.

Apply site-specific configuration changes

Configure System Settings

When installing a new version of Project.net some of the configuration settings may reset to their default values and you may need to re-configure them. These values are set through the Application Administration interface.

Instructions

  1. Log into Project.net as a user with application administration capabilities.
  2. From the Personal Workspace, click "Admin" next to your user name in the upper right of the screen to enter the Application Administration interface.
  3. Select Manage / Doc Vault.

Verify the three "Path to Repository Root" values are correct for your installation.

  1. Select Manage / Sys Settings

Verify the following variables:

  • Variable: siteHost
    • New Value: The external name of the Project.net website.
    • Description: This variable defines the hostname and port number that Project.net uses when it constructs URLs containing the hostname and port of the web site. Typically used in email notifications, this variable should be set to the fully qualified name of your Project.net server. Example values: www.myserver.com, www.myserver.com:7001
  • Variable: supportEmail
    • Make sure this is set to the email address of support team.
    • Description: Specifies the email address listed in the Help pages for support queries. It is also used if a user submits an automated error report within the application. Example, support@project.net.
  • Variable: postDataTempDir
    • Probably set to C:\temp or /temp
    • Description: This value is used as a temporary storage when uploading files. Make sure that the user tomcat has access to write in the specified directory.

Modify the default configuration

Any values set in a site-specific configuration will not be affected by an application upgrade. The values in the default configuration, however, may be reset to their default values and must be modified.

Instructions

  1. From within the Application Administration interface, chose Manage / Configurations.
  2. Click on Project.net Configuration from the list of configurations.
  3. Choose Tokens from the menu.
  4. Enter defaulthost in the Token Name: search field and click the Filter button.
  5. Change the Project.net Default value of prm.global.brand.defaulthost to the external name of the Project.net website. Usually, this is the same as the siteHost variable above.
  6. [Submit] your changes. They will not take effect until the Tomcat server has been stopped and restarted.

To start and stop Oracle and Tomcat

Use the following two scripts (startup.sh & shutdown.sh) to manually start or stop the database services. Follow the instructions to switch to the user Oracle before executing the scripts. You can find the scripts under (/home/oracle).

To manually start database service

  1. su - oracle
  2. sh startup.sh
  3. exit

Note: Log file is in: /home/oracle/oracle/product/10.2.0/network/log/pnet.log

To manually stop database service

  1. su - oracle
  2. sh shutdown.sh
  3. exit

To manually start Tomcat application server

  1. cd CATALINA_HOME/bin/
  2. sh startup.sh

To manually stop Tomcat application server

  1. cd CATALINA_HOME/bin/
  2. sh shutdown.sh