Pages

Friday, May 29, 2009

The Migration Story : Migrating from Websphere Portal 5.1 to 6.1 Part 2

For Part 1, click here

The first task to be done is to migrate the Production 5.1.0.1 into another server (5.1.0.1). This is an optional task, however, in my case it's required as my client does not want to touch the production server.

Prior to my task, Operations helped us export the Production 5.1.0.1 by doing the following :

  1. Run the following command :  ./xmlaccess.sh –in ExportRelease.xml –user [username] -password [password] -url http://[server]:9081/wps/config -out /tmp/release20090429/config.xml. 

    You can get the ExportRelease.xml HERE

  2. Backup the following files : PortalServer/installableApps, PortalServer/installedApps, AppServer/installedApps/[server]/wps.ear ,PortalServer/shared, PortalServer/deployed.

  3. Once done, the Operations have passed to me the config.xml file. And I'm good to go to import the settings and files to the new 5.1.0.1 server.

The below contains some tips and tricks as you will find out. 

For our import to work, the following is required :

  1. The Portal 5.1 must be setup as an empty portal. Portal Server 5.1 does not contain an "action-empty-portal" reference on WPConfig.sh (bat).  So you have to install it as empty. However, there's a workaround on this as shown later.

  2. You need to install all the fixes on the following link (otherwise you will hit issues such as Import takes very slow, etc.). Download the files HERE. You need an IBM Login to download the files. Don't install as yet.

  3. For my case,  since Portal 5.1 was not  an empty portal when it was handed over to me, (as I forgot to let them know that I need an empty portal) I have to use Portal 6.0 scripts and modify them. These scripts are compatible. Let me explain.

    action-empty-portal actually runs 3 XML Scripts via xmlaccess which are :

    1. CleanPortal.xml
    2. AddBasePortalResources.xml
    3. SchedulerCleanupTask.xml

    When you run wpsconfig.sh, it actually looks at the file called : wps_cfg.xml. This file maps the commands to the xml actions that needs to be run. For example, when you call action-empty-portal, the above scripts are run.

    For my case, I copied these scripts from Portal 6.0 to my Portal 5.1 and modified CleanPortal (as shown HERE) in order for it to work with Portal 5.1. I don't need to use AddBasePortalResources.xml as I don't need to add the language resources. However, I need the SchedulerCleanupTask.xml (as shown HERE)

    Now, I have to run these jobs individually. I ran it at this sequence :

  4. First, I ran this command : ./xmlaccess.sh -in /config/work/CleanPortal.xml -user [username]  -pwd [password] -out /tmp/xmlcleanportal.xml -url http://[server]:9081/wps/config

  5. And then, I ran this command : ./xmlaccess.sh -in  /config/work/SchedulerCleanupTask.xml -user [username] -pwd [password] -out /tmp/xmlcleanportal.xml -url http://[server]:9081/wps/config

  6. Before importing, I want to make sure that my credential-segment is added. So you need to run this command : WPSconfig.sh action-create-deployment-credentials

  7. After you run this commands, check that your portal is empty by restarting it and browsing it. You shoudl see an error something like VP Failed. This is normal for Portal 5.1.

  8. My portal 5.1 and the Production Portal 5.1 are of the same version so I copied everything fron the backedup installableApps and Deployed to the new Portal Server's installabeApps. After that, I copied the latest WAR files of our custom applications. If the Portal version is different, I would have just copied only the new WAR files from our custom applications

  9. Once done, Install the Fixes as specified in number 2.

  10. Copy your custom shared JAR files into the new PortalServer/shared folder.

  11. Copy your custom theme and skins to the new PortalServer

  12. Install any custom configurations and files that you may have. On my side, I configured my JDBC to the databases used by the applications. You can do whatever custom configuration and installation here (only on the WAS Side).

  13. Once done,  I edited my config.xml (XML file backedup from the production server) to point to the correct WAR files. For information, check out THIS LINK.

  14. I imported my configuration by running the following : ./xmlaccess.sh -in /xmlaccessfiles/config.xml -out /tmp/import.xml -user [username] -pwd [password] -url http://[server]:9081/wps/config. If you find that the import is running too slow (like one line per one minute), then you didn't install the fixes. Go back and check #2.

After doing so, I tested the portal server. You have to test the portal to make sure it works. For Portal 5.1, you need to take a look at your SystemOut.log and wps*.log under the PortalServer/log while testing to see if there's any portlet issues. Mine was the theme and skins due to a missing shared library I forgot to put in.

As I have tested it, my next task now is to dump this Portal using WPMigrate pre-upgrade task and import it ont he new Websphere Portal Server 6.1

No comments:

Post a Comment