Difference between revisions of "Escidoc-core Migration v1.1 to v1.2"
Jump to navigation
Jump to search
Line 110: | Line 110: | ||
===JBoss patch=== | ===JBoss patch=== | ||
*copy everything inside jboss-patch-1.2/server to /usr/share/jboss on coreservice.mpdl.mpg.de | *copy everything inside jboss-patch-1.2/server to /usr/share/jboss on coreservice.mpdl.mpg.de | ||
===Post-Migration steps=== | |||
*shutdown core-service | |||
*shutdown fedora | |||
*Postgresql shall run | |||
*vacuum analyze all tables in escidoc-core, riTriples, Fedora database | |||
**issue following sql to get the script (on each of the mentioned databases): | |||
select 'vacuum analyze '||table_schema||'.'||table_name||'; ' from information_schema.tables where table_schema in ('list', 'aa', 'public') | |||
**copy/paste result in a new PgAdmin SQL Editor | |||
***replace all " with nothing (Edit->Find and Replace->Find what " -> Replace All) | |||
***run all commands together as PgScript (or use F6) | |||
===escidoc-core deployment=== | ===escidoc-core deployment=== |
Revision as of 08:42, 5 August 2010
step-by-step instructioncs to migrate escidoc-core 1.1 to escidoc-core 1.2. (detailed information is related to the MPDL productive environment).
Affected servers[edit]
- srv01.mpdl.mpg.de (PortgreSQL and Fedora)
- coreservice.mpdl.mpg.de (srv02.mpdl.mpg.de) (escidoc-core)
- pubman.mpdl.mpg.de (PubMan)
- faces.mpdl.mpg.de (Faces)
- virr.mpdl.mpg.de (Virr)
- any other instance accessing coreservice.mpdl.mpg.de
Required software packages[edit]
- fcrepo-installer-3.3-fix01.jar: http://www.escidoc.org/software/fedora/fcrepo-installer-3.3-fix01.jar
- escidoc-core-admin-1.2: http://www.escidoc.org/software/builds/stable-releases/1.2/escidoc-core-admin-1.2.zip
- escidoc-core-bin-1.2: http://www.escidoc.org/software/builds/stable-releases/1.2/escidoc-core-bin-1.2.zip
- jboss-patch-1.2: http://www.escidoc.org/software/builds/stable-releases/1.2/jboss-patch-1.2.zip
all available at https://www.escidoc.org/JSPWiki/en/DownloadForRelease1.2
- foxml_migration-jar-with-dependencies.jar
- plus xsl folder containing xslt styesheets:
wget https://zim02.gwdg.de/repos/common/trunk/common_services/foxml_migration/xsl/foxml_context.xsl --no-check-certificate wget https://zim02.gwdg.de/repos/common/trunk/common_services/foxml_migration/xsl/foxml_face.xsl --no-check-certificate wget https://zim02.gwdg.de/repos/common/trunk/common_services/foxml_migration/xsl/foxml_facesAlbum.xsl --no-check-certificate wget https://zim02.gwdg.de/repos/common/trunk/common_services/foxml_migration/xsl/foxml_file.xsl --no-check-certificate wget https://zim02.gwdg.de/repos/common/trunk/common_services/foxml_migration/xsl/foxml_orgUnit.xsl --no-check-certificate wget https://zim02.gwdg.de/repos/common/trunk/common_services/foxml_migration/xsl/foxml_pubItem.xsl --no-check-certificate wget https://zim02.gwdg.de/repos/common/trunk/common_services/foxml_migration/xsl/foxml_virrElement.xsl --no-check-certificate wget https://zim02.gwdg.de/repos/common/trunk/common_services/foxml_migration/xsl/transform_context.xsl --no-check-certificate wget https://zim02.gwdg.de/repos/common/trunk/common_services/foxml_migration/xsl/transform_face.xsl --no-check-certificate wget https://zim02.gwdg.de/repos/common/trunk/common_services/foxml_migration/xsl/transform_facesAlbum.xsl --no-check-certificate wget https://zim02.gwdg.de/repos/common/trunk/common_services/foxml_migration/xsl/transform_file.xsl --no-check-certificate wget https://zim02.gwdg.de/repos/common/trunk/common_services/foxml_migration/xsl/transform_orgUnit.xsl --no-check-certificate wget https://zim02.gwdg.de/repos/common/trunk/common_services/foxml_migration/xsl/transform_pubItem.xsl --no-check-certificate wget https://zim02.gwdg.de/repos/common/trunk/common_services/foxml_migration/xsl/transform_virrElement.xsl --no-check-certificate wget https://zim02.gwdg.de/repos/common/trunk/common_services/foxml_migration/xsl/ves-mapping.xml --no-check-certificate
- plus migration.properties file
available at https://zim02.gwdg.de/repos/common/trunk/common_services/foxml_migration
Pre-Migration requirements[edit]
- shutdown all solutions accessing coreservice.mpdl.mpg.de
- stop JBoss application server on
- pubamn.mpdl.mpg.de
- faces.mpdl.mpg.de
- virr.mpdl.mpg.de
- stop JBoss application server on any other instance, which is accessing coreservice.mpdl.mpg.de
- stop JBoss application server on
- shutdown the escidoc-core instance
- stop JBoss application server on coreservice.mpdl.mpg.de
- shutdown Fedora instance
- /X/fedora/tomcat/bin/shutdown.sh on srv01.mpdl.mpg.de
Main migration steps[edit]
Installation of Fedora 3.3.1[edit]
- on srv01.mpdl.mpg.de change to directory /X
- delete the symbolic link fedora
- DO NOT DELETE THE EXISTING FEDORA INSTANCE INSIDE /X/fedora3.2.1 !!!
- create a new directory fedora3.3
- create a new symbolic link fedora pointing to the new directory fedora3.3
- drop old fedora databases "fedora32" and "riTriples"
- CREATE DATABASE "fedora3" WITH ENCODING='UTF8' OWNER="fedoraAdmin";
- CREATE DATABASE "riTriples" WITH ENCODING='SQL_ASCII' OWNER="fedoraAdmin" TEMPLATE=template0;
- install Fedora 3.3.1
- java -jar fcrepo-installer-3.3-fix01.jar
- instructions can be found here: https://www.escidoc.org/JSPWiki/en/Fedora3.3Installation
- when the installation is finished
- copy the entire data directory located in the old Fedora instance (/X/fedora3.2.1/data) into the newly installed Fedora instance
Migrtation of the FOXML files[edit]
this will backup the Fedora data diectory!
- go to escidoc-core-admin-1.2
- edit the admin-tool.properties file
- check Fedora properties
- especially fedora-src.home=/X/fedora
- ANT_OPTS=-Xmx1024m -Xms512m -XX:MaxPermSize=256m
- call ant foxml-migration-from1.1-to1.2
Migrating old escidoc:TOC content model[edit]
- locate the escidoc_TOC file inside /X/fedora/data/objects and open it for editing
- replace all occurances of "TOC" with "toc"
- check the creation date of the RELS-EXT.0 and the RELS-EXT.1 datastreams
- if both dates "CREATED=<date>" are equal, decrease the one in RELS-EXT.0
- update all references to escidoc:TOC in any resource
- the current migration.properties file has a list of all relevant resources
- java -jar foxml_migration-jar-with-dependencies.jar cmodel
Rebuild Fedora[edit]
- start fedora: <fedora-dir>/tomcat/bin/startup.sh
- rebuild the Fedora database and the Fedora resource index
- Location: <fedora-dir>/server/bin
- Script: fedora-rebuild.sh
- rebuild first the database
- rebuild next the resource index
Migration of the escidoc-core database[edit]
- backup the escidoc-core database on coreservice.mpdl.mpg.de !!!
- The database migration uses certain fingerprints in order to determine the current version of the db. The layout of our database differs from the one assumed by the db-migration tool. Therefore it is necessary to run the following script prior to the db-migration:
- Modify admin-tool.properties.
- Check the following entries:
- datasource.script.prefix=check-which-one
- datasource.url=check-which-one
- datasource.driverClassName=org.postgresql.Driver
- datasource.username=check-which-one
- datasource.password=check-which-one
- creator_id=the user-id of a sysadmin user
- escidoc.database.tablespace.list=tbl_index
- call ant db-migration
- DO NOT USE THE JAR FILE with the db-migration argument!
JBoss patch[edit]
- copy everything inside jboss-patch-1.2/server to /usr/share/jboss on coreservice.mpdl.mpg.de
Post-Migration steps[edit]
- shutdown core-service
- shutdown fedora
- Postgresql shall run
- vacuum analyze all tables in escidoc-core, riTriples, Fedora database
- issue following sql to get the script (on each of the mentioned databases):
select 'vacuum analyze '||table_schema||'.'||table_name||'; ' from information_schema.tables where table_schema in ('list', 'aa', 'public')
- copy/paste result in a new PgAdmin SQL Editor
- replace all " with nothing (Edit->Find and Replace->Find what " -> Replace All)
- run all commands together as PgScript (or use F6)
- copy/paste result in a new PgAdmin SQL Editor
escidoc-core deployment[edit]
- copy the escidoc-core-bin-1.2/ear/escidoc-core.ear file into /usr/share/jboss/server/default/deploy on coreservice.mpdl.mpg.de
Recache and reindex[edit]
- start JBoss on coreservice.mpdl.mpg.de
- start Fedora on srv01.mpdl.mpg.de
- launch the escidoc-core admin toll at http://coreservice.mpdl.mpg.de/adm/admin.jsp
- recache (ensure the "clear cache" checkbox is selected!)
- reindex (ensure the "clear index" checkbox is selected!)
Post-Migration steps[edit]
- shutdown core-service
- shutdown fedora
- Postgresql shall run
- vacuum analyze all tables in escidoc-core, riTriples, Fedora database
- issue following sql to get the script (on each of the mentioned databases):
select 'vacuum analyze '||table_schema||'.'||table_name||'; ' from information_schema.tables where table_schema in ('list', 'aa', 'public')
- copy/paste result in a new PgAdmin SQL Editor
- replace all " with nothing (Edit->Find and Replace->Find what " -> Replace All)
- run all commands together as PgScript (or use F6)
- copy/paste result in a new PgAdmin SQL Editor
deployment of solutions[edit]
- pror to the deployment of Faces and Virr
- the Java version on virr.mpdl.mpg.de and on faces.mpdl.mpg.de has to be upgarded to version 1.6
- deploy the appropriate solution ear files to pubman, faces and virr
- apply necessary updates to the solution specific properties files
- start the Jboss instances for the three solutions