This article proposes an alternative way of migrating from lower versions of MPA to MPA8.0. The normal process is outlined in the article  mentioned under reference section. The process outlined in the article  requires a portal migration. If you have the portal installation which has only Mobile Portal Accelerator and does not use any other portal applications then the portal migration is not necessary. This article proposes an alternative process by which customer can get away with the migration of portal and install the new version of the portal to which you are planning to migrate directly. In this way the MPA migration becomes lot simpler as customers can simply install the portal on latest hardware and then install the latest MPA. Since the complete migration of portal is not required to be done, the effort required for migration is reduced a lot.
The steps required for this type of migration is as follows.
Run the below steps on the current MPA installation to export the required artifacts which you can later import on the new MPA installation.
1) Export PLN table data:
Export the preload notice database tables on the existing database to generate a pln_export.txt
on the source MPA installation. Before attempting the export ensure to make a backup of the Preload Notice database tables.
a) Download the migration.zip from the link at the end of this page and extract it to a temporary directory, for example /tmp/migration.
b) If WebSphere Portal is not installed in WP_install_path/PortalServer, edit wemp_migration.sh or wemp_migration.bat and update /usr/IBM/WebSphere/PortalServer and /usr/IBM/WebSphere/wp_profile/ConfigEngine accordingly to reflect the directory path WebSphere Portal server is installed.
c) Ensure that PortalAdminPwd and DbPassword are set in wkplc.properties and wkplc_dbdomain.properties.
d) Change your current directory to /tmp/migration.
e) Run the command setupCmdLine.sh from the AppServer/bin directory and set the CLASSPATH to JDBC the driver .jar files. For example, if you are using DB2, set the CLASSPATH to /usr/IBM/db2jars/db2jcc4.jar:/usr/IBM/db2jars/db2jcc_license_cu.jar.
f) Run the command wemp_migration.sh export. The command saves preload notice data in a file called pln_export.txt.
g) Keep a backup of the .xml file and the pln_export.txt. It is used later to restore the data.
2) Pages Export:
Use the Portal Administration export XML tool of the Current MPA installation Server to export all the pages used in the application and create a pageExport
.Customer should log in to WebSphere Portal Admin console and go to Administration > Mobile Portal pages > Content root > Home > Mobile Portal. Use the Export button under the Manage Mobile Pages heading to export the entire page hierarchy. It is saved as an .xml file.
3) Export Custom Aggregator Policies:
If your application uses the custom aggregator policies then export the custom aggregator policies using mcsExport tool. The command would look like the following
Eg : ./mcsExport -vendor db2-type4 -host wpmzpro03.in.ibm.com -port 50001 -source mcsdb -user db2inst2 -password db2inst2 -allcomponents -theme -layout -link -text -replace -enableundo -project "mobile-portal" -destdir /opt/IBM/mcsExportAggregatorPolicies
4) Export Custom Portlet Policies
: Export the custom portlet policies from the location on the current MPA installation Server for all the application portlets that you had developed.
Eg : ./mcsExport -vendor db2-type4 -host wpmzpro03.in.ibm.com -port 50001 -source mcs63db -user db2inst2 -password db2inst2 -allcomponents -theme -layout -link -text -replace -enableundo -project "Mobile JSR 168 sample application.webmod" -destdir /opt/IBM/WebSphere/PortalServer/wp.mobile/wp.mobile.mcs/repository/bin/mcs632Policies
B) Install Portal:
Install WebSphere Portal Server with the right fix pack levels and the WebSphere Portal server as per the portal information center.
Once the new version is installed next step is to install MPA 8.0. MPA installation has 2 steps outlined below.
· Install MCSC) Install MCS:
· Install MWP
1) Install the MPA installer using the following step : Perform the assembly step.
./ConfigEngine.sh -install -assemblyIudd sdd.xml -assemblyRoot /tmp/wp.mobile -installLocation /opt/IBM/WebSphere -offeringName PortalServer
2) Create a new mcsdb (eg : mcs63db )
In case of DB2 do the following.
a) Login with db2admin user
b) db2 create db mcs63db using codeset UTF-8 territory us
c) db2 update db cfg for mcs63db using logfilsiz 10000 logprimary 10 logsecond 10
d) db2 connect to mcs63db user db2inst2 using db2inst2
e) db2 -tf create_vm_tables.sql
f) db2 -tf create_mdpr_tables.sql
In case of Oracle do the following:
Note: Use below Steps to create mcsdb and granting permissions. Also note down oracle SID properly
a)Create a new db with the name "mcs" using dbca command on Oracle machine which will launch the GUI window.
b)While creating the mcs db make sure that Unicode is enabled as shown in the screenshot below.
c) Unzip the GAed version of wp.mobile.zip & you will get install.wp.mobile.mcs.jar & then extract install.wp.mobile.mcs.jar file & then under \wp.mobile\wp.mobile.mcs\repository\oracle directory,
you will find these 2 files
d)Copy these 2 files (create_mdpr_tables.sql & create_vm_tables.sql) to the machine where Oracle db is installed under a directory say /u01/oracle/app/mpasql/ (Note: On your machine this installation path could be different so work accordingly to your path) & then run the cmd chmod 777 * under this directory to give execution permission to these files.
e) On Oracle machine, login as "oracle" user & set your present working directory as /u01/oracle/app/mpasql/ & then run the following scripts.
Note: In the following scripts, please replace your Oracle password at the "password" word occurrence.
1) sqlplus sys/password@mcs as sysdba
2) create user mcsusr identified by password default tablespace users temporary tablespace temp;
3) GRANT create session,alter session,create table,create view,create procedure,create trigger,create library,create tablespace,alter tablespace,drop tablespace,execute any procedure,unlimited tablespace,create public synonym,drop public synonym,create sequence to mcsusr;
4) grant select on dba_pending_transactions to mcsusr;
5) grant connect,resource,dba to mcsusr;
6) grant insert any table to mcsusr;
Next, run these scripts,
1) sqlplus mcsusr/password@mcs
If you are building MPA cluster with more than one node then do the following.
On the primary node run the following steps. (Steps 3, 4 and 5)
3) Run the mcs-deploy-mcs step
Eg : ./ConfigEngine.sh init mcs-deploy-mcs -DMcsRepositoryType=odbc -DMcsDbVendor=db2-type4 -DMcsDbHost=wpmzpro03.in.ibm.com -DMcsDbPort=50001 -DMcsDbSource=mcs63db -DMcsDbUser=db2inst2 -DMcsDbPassword=db2inst2 -DMcsProject=mobile-portal
./ConfigEngine.sh init mcs-deploy-mcs -DMcsRepositoryType=odbc -DMcsDbVendor=oracle -DMcsDbHost= wpmzpro03.in.ibm.com -DMcsDbPort=1524 -DMcsDbSource=mcs -DMcsDbUser=mcsusr -DMcsDbPassword=dbpassword -DMcsProject=mobile-portal
4) Modify the drManager.sh/bat,ImportPolicies.sh/bat,mcsImport.sh/bat,mcsExport.sh/bat to have the db driver in the classpaths (in this case,since we are using DB2 9.7 on JDK 1.6 , use the db2jcc4.jar instead of db2jcc.jar in the classpath)
5) Run the following command to import the devices into the Device Repository :
./ConfigEngine.sh init mcs-import-devices -DMcsProject=mobile-portal
6) In case of Horizontal cluster, run the below command on all secondary nodes.
a) ./ConfigEngine.sh -install -assemblyIudd sdd.xml -assemblyRoot /WebSphere/images/wp.mobile -installLocation /WebSphere -offeringName PortalServer
b) ./ConfigEngine.sh init mcs-config-cluster-secondary-node -DMcsRepositoryType=odbc -DMcsDbVendor=db_vendor -DMcsDbHost=hostname -DMcsDbPort=port_number -DMcsDbSource=db_name -DMcsDbUser=db2instance -DmcsDbPassword=db2instance_password -DMcsProject=mobile-portal
c) ./ConfigEngine.sh init mcs-config-cluster-secondary-node -DMcsRepositoryType=odbc -DMcsDbVendor=oracle -DMcsDbHost=10.5.153.182 -DMcsDbPort=1524 -DMcsDbSource=mcs1 -DMcsDbUser=mcsusr -DMcsDbPassword=sdp#2013 -DMcsProject=mobile-portal
Use the same parameter values which are used as in the above step 3.
7) Edit the ImportPolicies.sh,drManager.sh,mcsImport, file for secondary node like in step 4.Don’t run the mcs-import-device on secondary node as the MCS data is already imported to the database in step 7.
8) Login to Deployment Manager Admin Console and click Full Resynchronize for both cluster members/nodes.After this step is done, make sure that (in the case of clusters), you login to the deployment Manager Admin Console and click Full Resynchronize for all cluster members/nodes. If you don’t do this, your mwp-config-all command may fail saying that the mcs application is not present.
1) Run the following steps to install the Mobile Portal Acceleration extensions. On primary node run the mwp config command as shown.
Eg: ./ConfigEngine.sh mwp-config-cluster-primary-node -DWasPassword=wpadmin -DPortalAdminPwd=wpadmin
2) Run the task command from the Primary node, to import XDIME aggregator policies and generic portlet policies.
Eg : ./ConfigEngine.sh mwp-import-policies
3) Run this task command from the Primary node to import Mobile portlet policies.
Eg : ./ConfigEngine.sh mwp-import-portlet-policies
4) Run the following command from the secondary nodes in case of Horizontal cluster.
5) After MPA is installed on all the cluster members of the WebSphere Portal cluster, login to the Administrative Console of Deployment Manager and click full re-synchronize on all cluster
member/node and restart the portal cluster.
6) Configure the MPA extensions for cluster using the below command on Primary node.
7) To activate the mobile portlets, run the below command on Primary node.
8) Synchronize all the Nodes in the cluster.
9) Restart the Dmgr, node agent and Portal Server
Once you have the new setup with MPA8.0 is installed. You can start migrating your application. Use the artifacts generated in the pre-install step for migrating.
1) Importing the Preload notice data:
Refer to the link publib.boulder.ibm.com/infocenter/mpadoc/v7r0m0/topic/com.ibm.websphere.wemp.doc/migrating/migrating_from_70_c.html
Copy this pln_export.txt to a /tmp directory
on the Portal Server where MPA has been installed and then restart the Portal Server.
The preload notice data will be imported when you restart Portal and access the administrative console. The pln_export.txt will be renamed to pln_export.backup . Login to the Portal Admin console, and edit the mpaplnDS datasource created under Resources > JDBC > Data sources and make sure its pointing to the customization database which portal is using.
2) Pages Import
: Use the Portal Administration Import XML tool of the Portal Server to import the pageExport.xml which was created when we exported the pages from the Source MPA installation. Ensure that the preload notices placed on the pages when the pages were exported during pre-install step.
3) Custom Aggregator Policies:
Copy the aggregator policies from the location on the Source MPA installation where they were exported and then copy it to the new MPA installation server location. Run the mcsMigrate tool to migrate the aggregator policies into the MPA 8.0 schema format (mcs 6.3.2) Eg : The syntax for mcsMigrate is as follows:
The input option defines the directory to migrate, which is the source directory which has old files exported. The output option specifies the output file or directory, which must not exist. The verbose option specifies the output of verbose messages.
Once mcMigrate is done then the policies are migrated and placed under ouput folder option mentioned above. Use the files under this migrated directory to import the policies using mcsImport command to import them into the mcs database.
./mcsImport -vendor db2-type4 -host wpmzpro03.in.ibm.com -port 50001 -source mcs63db -user db2inst2 -password db2inst2 -allcomponents -theme -layout -link -text -updateall -enableundo -project "mobile-portal" -srcdir /opt/IBM/migratedAggregatorPolicies
4) Custom Portlet Policies
: Copy the custom portlet policies from the location on the Source MPA installation where they were exported and then copy it to the new MPA Installation server location. Run the mcsMigrate tool as defined in the above step to migrate the portlet policies into the MPA 8.0 schema format (mcs 6.3.2) and then run the mcsImport command to import them into the mcs 63 database.
Eg : .
/mcsImport -vendor db2-type4 -host wpmzpro03.in.ibm.com -port 50001 -source mcs63db -user db2inst2 -password db2inst2 -allcomponents -theme -layout -link -text -updateall -enableundo -project "Mobile JSR 168 sample application.webmod" -srcdir /opt/IBM/WebSphere/PortalServer/wp.mobile/wp.mobile.mcs/repository/bin/mcs632Policies
You can do the following: The following steps outline the procedure for an XDIME portlet application named MyXDIMEPortlet.war.
Expand the WAR file to a temporary directory, for example /xdimetmp.
1) Run the following command from the wp_root/repository/bin directory:
mcsMigrate -input /xdimetmp/MyXDIMEPortlet/WebContent/mcs-policies -output /xdimetmp/MyXDIMEPortlet/WebContent/new-policies
2) Delete the mcs-policies directory under /xdimetmp/MyXDIMEPortlet/WebContent/.
3) Rename the new-policies directory under /xdimetmp/MyXDIMEPortlet/WebContent/ to mcs-policies.
4) Re-create the WAR file and import this WAR file into the portal through the admin console. This will deploy the migrated application.