* reformated and retitled the notes to "Special notes about source files"

* restructured Stella's ontology section and Jim's file storage section to provide verification info earlier. 

Questions: 
* Stella and Chris - could you provide feedback if the changes I made address your improvement recommendations? 
* Jim - is it still the "localhost" log where the error for the file system storage shows up in Tomcat? 
* Rebecca - in B.2 of the theme changes, is it 'a' or 'b', then 'c' for regardless? Sorry if I'm being dense.
This commit is contained in:
ejc12 2010-07-23 02:09:08 +00:00
parent b1ef6b1644
commit 5cdd24274c

View file

@ -1,354 +1,360 @@
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Upgrading NIH VIVO Upgrading NIH VIVO
Steps to Upgrade from Release 1 Version 1.0 to Release 1 Version 1.1 Steps to Upgrade from Release 1 Version 1.0 to Release 1 Version 1.1
This file provides a short description of the steps involved in upgrading your This file provides a short description of the steps involved in upgrading your
installation of NIH VIVO from Release 1 Version 1.0 to Release 1 Version 1.1. installation of NIH VIVO from Release 1 Version 1.0 to Release 1 Version 1.1.
This and other documentation can be found at: This and other documentation can be found at:
http://vivoweb.org/support http://vivoweb.org/support
Installation: Installation:
If you need to do a fresh install, please consult the install.txt in this If you need to do a fresh install, please consult the install.txt in this
directory. directory.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
I. Before Performing the Upgrade I. Before Performing the Upgrade
II. The Upgrade Process II. The Upgrade Process
III. Ontology Changes III. Ontology Upgrade
IV. File Storage Changes A. Verify Ontology upgrade process
V. Theme Changes B. Ontology knowledge base manual r
IV. New File Storage System
------------------------------------------------------------------------------- A. Verifying the File Storage upgrade
B. File Storage changes
I. Before Performing the Upgrade V. Theme Changes
Please read the bullet points below BEFORE beginning the upgrade. -------------------------------------------------------------------------------
The upgrade process is similar to the original install process with the following I. Before Performing the Upgrade
exceptions:
Please read the bullet points below BEFORE beginning the upgrade.
* DO NOT reinstall MySQL or recreate the MySQL database. Please ensure that
you back-up the MySQL database. The upgrade process is similar to the original install process with the following
* It is not necessary to add RDF data or reconfigure the Apache HTTP Server. exceptions:
* First-time login of the administrator account will use the password
previously set, NOT the password in deploy.properties. * DO NOT reinstall MySQL or recreate the MySQL database. Please ensure that
* The first time Apache Tomcat starts up after the upgrade, it will you back-up the MySQL database.
initiate a process that modifies the knowledge base to align the data * It is not necessary to add RDF data or reconfigure the Apache HTTP Server.
with the revised ontology. See the section on "Ontology Changes" * First-time login of the administrator account will use the password
below for more information. previously set, NOT the password in deploy.properties.
* The first time Apache Tomcat starts up after the upgrade, it will * The first time Apache Tomcat starts up after the upgrade, it will
initiate a process that modifies the uploads directory (images), to align initiate a process that modifies the knowledge base to align the data
the uploaded files with the revised file storage scheme. See the section with the revised ontology. See the section on "Ontology Changes"
on "File Storage Changes" below for more information. below for more information.
* The first time Apache Tomcat starts up after the upgrade, it will
------------------------------------------------------------------------------- initiate a process that modifies the uploads directory (images), to align
the uploaded files with the revised file storage scheme. See the section
II. The Upgrade Process on "File Storage Changes" below for more information.
-------------------------------------------------------------------------------
1. Ensure that backups are created of the Tomcat webapps directory, the
original source directory, the MySQL database, and the uploaded files II. The Upgrade Process
directory (images).
2. Download the new distribution file and unpack it into a new source 1. Ensure that backups are created of the Tomcat webapps directory, the
directory. original source directory, the MySQL database, and the uploaded files
directory (images).
3. Create deploy.properties, using the same values as in your previous
installation. 2. Download the new distribution file and unpack it into a new source
directory.
4. Apply any changes you have made to the new source directory.
3. Create deploy.properties, using the same values as in your previous
Note: In many cases, simply copying the modified files from your original installation.
source directory will not work since the files on which they are based
have changed. It will be necessary to inspect the new source files and 4. Apply any changes you have made to the new source directory.
add any changes to them at that time.
************* Special notes regarding source files ********************
Note: At a minimum it will be necessary to apply the Google Analytics
Tracking Code to googleAnalytics.ftl in the theme: This process assumes any changes made to the application were made in
[new_source_directory]/themes/[theme_dir]/templates/googleAnalytics.ftl the source directory and deployed, and were not made directly within
Apache Tomcat webapp.
A sample googleAnalytics.ftl is included in the built-in theme. This file
serves only as an example, and you must replace the tracking code shown In many cases, simply copying the modified files from your original
with your institution's own tracking code. source directory will not work since the files on which they are based
have changed. It will be necessary to inspect the new source files and
For additional information and a copy your institution's tracking code, add any changes to them at that time.
see the Google Analytics wiki page.
https://confluence.cornell.edu/display/ennsrd/Google+Analytics+for+UI At a minimum it will be necessary to apply the Google Analytics Tracking
Code (GATC) to googleAnalytics.ftl in the theme:
Note: This process assumes any changes made to the application were made in
the source directory and deployed, and were not made directly within [new_source_directory]/themes/[theme_dir]/templates/googleAnalytics.ftl
Apache Tomcat webapp.
A sample googleAnalytics.ftl is included in the built-in theme. This file
5. If you had modified web.xml to configure the Pellet Reasoner (as described serves only as an example, and you must replace the tracking code shown
in the installation instructions), repeat that modification. with your institution's own tracking code.
6. Stop "Apache Tomcat" and run ant by typing: ant all For additional information about the GATC for the NIH-funded VIVO
implementation sites and a copy your institution's tracking code, see the
7. If you have set up the Apache Tomcat Connector using mod_jk and modified VIVO Google Analytics wiki page:
your tomcat/conf/server.xml file, you will need to add a line to your https://confluence.cornell.edu/display/ennsrd/Google+Analytics+for+UI
context section specifying a "Manager" tag; see examples below.
************************************************************************
Context section before:
5. If you had modified web.xml to configure the Pellet Reasoner (as described
<Context path="" in the installation instructions), repeat that modification.
docBase="/usr/local/tomcat/webapps/vivo"
reloadable="true" 6. Stop "Apache Tomcat" and run ant by typing: ant all
cookies="true" >
<Environment type="java.lang.String" override="false" 7. If you have set up the Apache Tomcat Connector using mod_jk and modified
name="path.configuration" your tomcat/conf/server.xml file, you will need to add a line to your
value="deploy.properties" context section specifying a "Manager" tag; see examples below.
/>
</Context> Context section before:
Context section after: <Context path=""
docBase="/usr/local/tomcat/webapps/vivo"
<Context path="" reloadable="true"
docBase="/usr/local/tomcat/webapps/vivo" cookies="true" >
reloadable="true" <Environment type="java.lang.String" override="false"
cookies="true" > name="path.configuration"
<Manager pathname="" /> value="deploy.properties"
<Environment type="java.lang.String" override="false" />
name="path.configuration" </Context>
value="deploy.properties"
/> Context section after:
</Context>
<Context path=""
8. Start "Apache Tomcat" and log in to VIVO. docBase="/usr/local/tomcat/webapps/vivo"
reloadable="true"
------------------------------------------------------------------------------- cookies="true" >
<Manager pathname="" />
III. Ontology Changes <Environment type="java.lang.String" override="false"
name="path.configuration"
Changes to the VIVO core ontology may require corresponding value="deploy.properties"
modifications of the knowledge base instance data and local ontology />
extensions. </Context>
When Apache Tomcat starts up following the upgrade, it will initiate 8. Start "Apache Tomcat" and log in to VIVO.
a process to examine the knowledge base and apply necessary changes.
Not all of the modifications that may be required can be automated, -------------------------------------------------------------------------------
so manual review of the knowledge base is recommended after the
automated upgrade process. The automated process will make only III. Ontology Changes
the following types of changes:
A. Verify Ontology upgrade process
Class or Property renaming
All references to the class (in the subject or object position) will After Apache Tomcat is started, these files should be reviewed to verify that
be updated to the new name. References to the property will be the automated upgrade process was executed successfully. The ontology alignment
updated to the new name. process will create the following files in the Tomcat webapps/vivo/WEB-INF directory:
Class or Property deletion ontologies/update/logs/knowledgeBaseUpdate.log
All individuals in a deleted class will be changed to a log of a summary of updates that were made to the knowledge base and notes
belong to the nearest available superclass (which may be owl:Thing). about some recommended manual reviews. This file should end with
"Successfully finished processing ontology changes".
All statements using a deleted property will be changed
to use the nearest available superproperty. If there is no available ontologies/update/logs/knowledgeBaseUpdate.error.log
superproperty then the statement will be deleted from the a log of errors that were encountered during the upgrade process. This file
knowledge base. Note that all removed and added data should be empty if the upgrade was successful.
is recorded in the files in the changedData directory.
ontologies/update/changedData/removedData.n3
Class or Property addition an N3 file containing all the statements that were removed from the knowledge base.
If a newly added class has a superclass and there are
individuals in that superclass, then a note will be ontologies/update/changedData/addedData.n3
added to the log file suggesting review of those individuals to an N3 file containing all the statements that were added to the knowledge base.
see if they should be reasserted in the newly added class.
B. Ontology knowledge base manual review
If a newly added property has a superproperty and there are
statements using the superproperty, then a note will be added to Changes to the VIVO core ontology may require corresponding
the log file suggesting review of those statements to see if they modifications of the knowledge base instance data and local ontology
should be reasserted using the newly added property. extensions.
Annotation property default values When Apache Tomcat starts up following the upgrade, it will initiate
It a site has modified the value of a vitro annotation (such as a process to examine the knowledge base and apply necessary changes.
displayRankAnnot or displayLimitAnnot) so that it is Not all of the modifications that may be required can be automated,
no longer using the default, then that setting will be left unchanged. so manual review of the knowledge base is recommended after the
If a site is using the default value of a vitro annotation, and the automated upgrade process. The automated process will make only
default has been changed in the new version of the ontology, then the following types of changes:
the new default value will be propagated to the knowledge base.
Class or Property renaming
The ontology alignment process will create the following files in the All references to the class (in the subject or object position) will
Tomcat webapps/vivo/WEB-INF directory: be updated to the new name. References to the property will be
updated to the new name.
ontologies/update/logs/knowledgeBaseUpdate.log
a log of a summary of updates that were made to the knowledge base and notes Class or Property deletion
about some recommended manual reviews. This file should end with All individuals in a deleted class will be changed to
"Successfully finished processing ontology changes". belong to the nearest available superclass (which may be owl:Thing).
ontologies/update/logs/knowledgeBaseUpdate.error.log All statements using a deleted property will be changed
a log of errors that were encountered during the upgrade process. This file to use the nearest available superproperty. If there is no available
should be empty if the upgrade was successful. superproperty then the statement will be deleted from the
knowledge base. Note that all removed and added data
ontologies/update/changedData/removedData.n3 is recorded in the files in the changedData directory.
an N3 file containing all the statements that were removed from the knowledge base.
Class or Property addition
ontologies/update/changedData/addedData.n3 If a newly added class has a superclass and there are
an N3 file containing all the statements that were added to the knowledge base. individuals in that superclass, then a note will be
added to the log file suggesting review of those individuals to
see if they should be reasserted in the newly added class.
After Apache Tomcat is started, these files should be reviewed to verify that
the automated upgrade process was executed successfully. If a newly added property has a superproperty and there are
statements using the superproperty, then a note will be added to
the log file suggesting review of those statements to see if they
------------------------------------------------------------------------------- should be reasserted using the newly added property.
IV. File Storage Changes Annotation property default values
It a site has modified the value of a vitro annotation (such as
Changes to the File Storage system in VIVO result in new properties to describe displayRankAnnot or displayLimitAnnot) so that it is
the relationships involving files, and a new directory structure in which to no longer using the default, then that setting will be left unchanged.
store the files. If a site is using the default value of a vitro annotation, and the
default has been changed in the new version of the ontology, then
Uploaded files are stored in the VIVO upload directory, as defined in the the new default value will be propagated to the knowledge base.
deploy.properties file. Previously, images were stored in the "images" folder
of the upload directory. Now, all uploaded files will be stored in the -------------------------------------------------------------------------------
"file_storage_root" folder of the upload directory.
IV. New File Storage System
Previously, image files were served from the images directory within the web
application, within Tomcat, and copied to the upload directory for backup A. Verifying the File Storage upgrade
purposes. Now, image files are stored only in the upload directory, and served
directly from there. The image directory within the web application is no If, for any reason, the File Storage upgrade process is not successful,
longer used. VIVO will not start. Attempts to open VIVO in the browser will result in a
404 error. Tomcat's "localhost" log file will contain an exception listing
When Apache Tomcat starts up following the upgrade, it will initiate a process with more information.
which makes the required changes:
The File Storage upgrade process will create these files in the Vivo upload
Initializing the file storage system directory:
Each file will now be assigned a unique ID, in addition to its filename.
Both the ID and filename are used to store the file within the system. upgrade/upgradeLog.2010-00-00T00-00-00.txt
Uploading two images with identical filenames will not cause a conflict. A log of the upgrade process. The actual filename includes a timestamp
that tells when the upgrade executed. This file should be inspected
Pruning dead image references for warnings or errors. The file should end with "File Storage update
Previous versions allowed manual editing of file paths, sometimes resulting is complete."
in erroneous information. Any image properties that refer to non-existent
files will be removed. upgrade/translatedImages
Contains the images that were translated to the new file storage system.
Removing unreferenced images
Any uploaded image which is no longer referred to by an Individual will upgrade/unreferencedImages
be removed. Contains the images which were in the "images" directory, but were no
longer referred to by any Individual.
Generating main images and/or thumbnails
Each image will be represented by both a main image file and a file_storage_root
thumbnail image file. If either of these is missing for a particular A directory where the uploaded images are stored. Within the root, the
individual, it will be created. path to the image is derived from its unique ID and its filename.
Converting image properties on Individuals file_storage_namespaces.properties
Image properties previously were simple data properties, referring to Contains the URL prefix used when serving the image files.
the filename and path. These are replaced by object properties, which
refer to the file by its unique ID. B. File Storage changes
Translating images into the new directory structure Changes to the File Storage system in VIVO result in new properties to describe
Each image file will be copied to its new location in the upload the relationships involving files, and a new directory structure in which to
directory. store the files.
Cleaning the old image directory. Uploaded files are stored in the VIVO upload directory, as defined in the
All image files are removed from their old locations in the upload deploy.properties file. Previously, images were stored in the "images" folder
directory. of the upload directory. Now, all uploaded files will be stored in the
"file_storage_root" folder of the upload directory.
The File Storage upgrade process will create these files in the Vivo upload
directory: Previously, image files were served from the images directory within the web
application, within Tomcat, and copied to the upload directory for backup
upgrade/upgradeLog.2010-00-00T00-00-00.txt purposes. Now, image files are stored only in the upload directory, and served
A log of the upgrade process. The actual filename includes a timestamp directly from there. The image directory within the web application is no
that tells when the upgrade executed. This file should be inspected longer used.
for warnings or errors. The file should end with "File Storage update
is complete." When Apache Tomcat starts up following the upgrade, it will initiate a process
which makes the required changes:
upgrade/translatedImages
Contains the images that were translated to the new file storage system. Initializing the file storage system
Each file will now be assigned a unique ID, in addition to its filename.
upgrade/unreferencedImages Both the ID and filename are used to store the file within the system.
Contains the images which were in the "images" directory, but were no Uploading two images with identical filenames will not cause a conflict.
longer referred to by any Individual.
Pruning dead image references
file_storage_root Previous versions allowed manual editing of file paths, sometimes resulting
A directory where the uploaded images are stored. Within the root, the in erroneous information. Any image properties that refer to non-existent
path to the image is derived from its unique ID and its filename. files will be removed.
file_storage_namespaces.properties Removing unreferenced images
Contains the URL prefix used when serving the image files. Any uploaded image which is no longer referred to by an Individual will
be removed.
If, for any reason, the File Storage upgrade process is not successful,
VIVO will not start. Attempts to open VIVO in the browser will result in a Generating main images and/or thumbnails
404 error. Tomcat's "localhost" log file will contain an exception listing Each image will be represented by both a main image file and a
with more information. thumbnail image file. If either of these is missing for a particular
individual, it will be created.
Once you are satisfied that the File Storage upgrade process is successful,
you may delete the "images" folder and the "upgrade" folder from the upload Converting image properties on Individuals
directory. You may also delete the WEB-INF/images directory from within Image properties previously were simple data properties, referring to
your Tomcat web application. the filename and path. These are replaced by object properties, which
refer to the file by its unique ID.
------------------------------------------------------------------------------- Translating images into the new directory structure
Each image file will be copied to its new location in the upload
V. Theme Changes directory.
VIVO 1.1 introduces the first step in a transition from JavaServer Pages (JSPs) Cleaning the old image directory.
to the FreeMarker template engine for generating web pages. As part of this All image files are removed from their old locations in the upload
process, the JSP files that were used for theme customization in earlier directory.
versions of VIVO have been replaced by a set of FreeMarker templates.
In the 1.1 install package, these files are located in Once you are satisfied that the File Storage upgrade process is successful,
/vivo/themes/vivo-basic/templates and have an ftl (for FreeMarker Template you may delete the "images" folder and the "upgrade" folder from the upload
Language) extension. directory. You may also delete the WEB-INF/images directory from within
your Tomcat web application.
Follow step A or B below, whichever is applicable to your site:
-------------------------------------------------------------------------------
A. If you did not create a customized theme for your site in VIVO 1.0, but used
the 1.0 vivo-basic theme in its original directory, you need not take any action V. Theme Changes
in order to convert your site to the VIVO 1.1 theme.
VIVO 1.1 introduces the first step in a transition from JavaServer Pages (JSPs)
B. If you created your own theme directory in VIVO 1.0, follow the steps below to the FreeMarker template engine for generating web pages. As part of this
to upgrade your theme to VIVO 1.1. process, the JSP files that were used for theme customization in earlier
versions of VIVO have been replaced by a set of FreeMarker templates.
1. Copy the directory /vivo/themes/vivo-basic/templates into your theme In the 1.1 install package, these files are located in
directory /vivo/themes/<your-theme-name>. /vivo/themes/vivo-basic/templates and have an ftl (for FreeMarker Template
Language) extension.
2. Follow step a or b below, whichever is applicable to your theme:
Follow step A or B below, whichever is applicable to your site:
a. If you did not apply any customizations to the JSPs in your VIVO 1.0
theme, then you do not need to apply any additional changes to the A. If you did not create a customized theme for your site in VIVO 1.0, but used
VIVO 1.1 theme templates during the upgrade process. the 1.0 vivo-basic theme in its original directory, you need not take any action
in order to convert your site to the VIVO 1.1 theme.
b. If you did apply customizations to the JSPs in your VIVO 1.0 theme,
you will need to hand-replicate those modifications in the new theme B. If you created your own theme directory in VIVO 1.0, follow the steps below
template files. to upgrade your theme to VIVO 1.1.
The theme template content that was previously contained in three 1. Copy the directory /vivo/themes/vivo-basic/templates into your theme
JSP files is now contained in five FTL files. The correspondence directory /vivo/themes/<your-theme-name>.
between the 1.0 JSPs and the 1.1 FTLs is as follows:
2. Follow step a or b below, whichever is applicable to your theme:
identity.jsp => identity.ftl
menu.jsp => menu.ftl and search.ftl a. If you did not apply any customizations to the JSPs in your VIVO 1.0
footer.jsp => footer.ftl theme, then you do not need to apply any additional changes to the
VIVO 1.1 theme templates during the upgrade process.
googleAnalytics.ftl is a new file included from footer.ftl to
which you will add your site's Google Analytics Tracking Code b. If you did apply customizations to the JSPs in your VIVO 1.0 theme,
(see section II). you will need to hand-replicate those modifications in the new theme
template files.
Because the FreeMarker Template Language uses many syntactic
conventions that will be familiar to template authors from JSP or The theme template content that was previously contained in three
other common templating systems, the translation of your JSP changes JSP files is now contained in five FTL files. The correspondence
into the new FTLs should be relatively straightforward. between the 1.0 JSPs and the 1.1 FTLs is as follows:
Consult the FreeMarker Template Author's Guide at identity.jsp => identity.ftl
http://freemarker.org/docs/dgui.html and the Reference at menu.jsp => menu.ftl and search.ftl
http://freemarker.org/docs/ref.html for complete documentation of footer.jsp => footer.ftl
the syntax and available built-in constructs. Template authors need
not be concerned with the Programmer's Guide or Java API documentation. googleAnalytics.ftl is a new file included from footer.ftl to
which you will add your site's Google Analytics Tracking Code
c. Remove the jsp directory from your themes directory. (see section II).
3. VIVO 1.1 includes changes to vivo-basic stylesheets. If you modified Because the FreeMarker Template Language uses many syntactic
styles in your VIVO 1.0 theme, you will not be able to simply copy the conventions that will be familiar to template authors from JSP or
1.0 stylesheets into your 1.1 theme, because you will then lose 1.1 other common templating systems, the translation of your JSP changes
style upgrades that your theme should pick up. Instead, you should into the new FTLs should be relatively straightforward.
use the vivo-basic 1.1 stylesheets as a starting point, and manually
merge your 1.0 style modifications in as needed. Consult the FreeMarker Template Author's Guide at
http://freemarker.org/docs/dgui.html and the Reference at
http://freemarker.org/docs/ref.html for complete documentation of
the syntax and available built-in constructs. Template authors need
not be concerned with the Programmer's Guide or Java API documentation.
c. Remove the jsp directory from your themes directory.
3. VIVO 1.1 includes changes to vivo-basic stylesheets. If you modified
styles in your VIVO 1.0 theme, you will not be able to simply copy the
1.0 stylesheets into your 1.1 theme, because you will then lose 1.1
style upgrades that your theme should pick up. Instead, you should
use the vivo-basic 1.1 stylesheets as a starting point, and manually
merge your 1.0 style modifications in as needed.