+

Search Tips   |   Advanced Search

Example: Staging to production

  1. Overview
  2. From source portal system
  3. On target portal environment
  4. import-wcm-data error
  5. WCM export/import rut
  6. CleanUpUsers.xml


Overview

The following procedure is an example of a full staging from a source portal to a target portal. Staging includes pages, wars, jars, WCM content, etc.... Not every step will be applicable to the system.


From source portal system

  1. Create folders for output...

      mkdir c:\scratch\Relyyyymmdd
      mkdir c:\scratch\Relyyyymmdd\wcm
      mkdir c:\scratch\Relyyyymmdd\work


  2. Export release...

      cd c:\IBM\WebSphere\wp_profile\PortalServer\bin
      xmlaccess.bat -in c:\IBM\WebSphere\PortalServer\doc\xml-samples\ExportRelease.xml -out c:\scratch\Relyyyymmdd\stagev1.xml -url "http://localhost:10039/wps/config" -user wpsadmin -password my123


  3. Export personalizations

      cd c:\IBM\WebSphere\PortalServer\pzn\prereq.pzn\publish
      c:\IBM\WebSphere\wp_profile\bin\setupCmdLine.bat
      pznload.bat --serverurl "http://localhost:10039/wps/pznpublish/pznpublishtarget" --targetpath / --username wpsadmin --password my123 --export --out c:\scratch\Relyyyymmdd\rules.node


  4. Export WCM libraries

      cd c:\IBM\WebSphere\wp_profile\ConfigEngine
      ConfigEngine.bat export-wcm-data -DWasPassword=my123 -DPortalAdminPwd=my123 -Dexport.allLibraries=true -Dexport.singledirectory=true -Dexport.directory=c:\scratch\Relyyyymmdd\wcm


  5. Copy folders in c:\work, including....

    • formrules
    • Properties
    • workDependencies
    • workResourceBundles
    • PDFStore

    ...to...

      c:\scratch\Relyyyymmdd\work


  6. Copy...

      c:\IBM\WebSphere\wp_profile\PortalServer\deployed\archive

    ...to...

      c:\scratch\Relyyyymmdd\archive

    Note that loading archive files into target portal only works if both source and target portal are at the same portal version level. To verify...

      c:\IBM\WebSphere\wp_profile\PortalServer\bin\WPVersionInfo.bat


  7. Extract latest version of the following ear files...

      cd c:\IBM\WebSphere\wp_profile\bin
      wsadmin.bat -user wpsadmin -password my123 -c "$AdminApp export ITSCThemeEAR.ear c:/scratch/Relyyyymmdd/ITSCThemeEAR.ear"
      wsadmin.bat -user wpsadmin -password my123 -c "$AdminApp export ITSCWCMJsp_war c:/scratch/Relyyyymmdd/ITSCWCMJspEAR.ear"
      wsadmin.bat -user wpsadmin -password my123 -c "$AdminApp export workPlugins c:/scratch/Relyyyymmdd/workPlugins.ear"
      wsadmin.bat -user wpsadmin -password my123 -c "$AdminApp export workWebServicesEAR c:/scratch/Relyyyymmdd/workWebServicesEAR.ear"


  8. Zip up c:\scratch\Relyyyymmdd, then copy to target environment...

    We zip file to help prevent packet loss during file transfer to remote system.


On target portal environment

  1. Ensure enough heap size is assigned to the Deployment Manager (recommending at least 2 GB) and nodeAgents (recommending at least 512 MB)

  2. Tune portal for large file imports.

  3. Unzip c:\scratch\Relyyyymmdd.zip

  4. Right-click Start button and select...

      Command Prompt (Admin)

  5. Import WCM data

    1. From WAS console, go to WCM WCMConfigService, and append...

        ,deletemultiplelibraries

      ...to the end of the value for property connect.business.logic.module.


    2. Optional: Add properties...

        connect.businesslogic.module.deletemultiplelibraries.class = com.aptrix.pluto.util.DeleteMultitpleLibrariesModule
        connect.businesslogic.module.deletemultitplelibraries.remoteaccess = true
        connect.businesslogic.module.deletemultitplelibraries.autoload = ralse


    3. Restart portal


    4. Make backup of existing WCM libraries

        cd c:\IBM\WebSphere\wp_profile\ConfigEngine
        ConfigEngine.bat export-wcm-data -DWasPassword=my123 -DPortalAdminPwd=my123 -Dexport.allLibraries=true -Dexport.singledirectory=true -Dexport.directory=c:\scratch\Relyyyymmdd\wcm_orig


    5. Delete existing WCM libraries

        cd c:\IBM\WebSphere\wp_profile\ConfigEngine
        ConfigEngine.bat run-wcm-admin-task-delete-libraries -Dlibraries=ITSC_design,ITSC_content_en,ITSC_content_fr -DPortalAdminId=wpsadmin -DPortalAdminPwd=my123


    6. Import WCM libraries...

        cd c:\IBM\WebSphere\wp_profile\ConfigEngine
        ConfigEngine.bat import-wcm-data -DWasPassword=my123 -DPortalAdminPwd=my123 -Dimport.directory=C:\Scratch\Relyyyymmdd\wcm

    7. Reset event logs


  6. Verify owner uid is correct in stagev1.xml export file, and change if not. For example, if importing from Syst into Preprod or Prod, change...

      uid=wpsadmin,o=defaultwimfilebasedrealm
      cn=wpsadmin,o=defaultwimfilebasedrealm

    ...to...

      CN=wpsadmin,OU=InternalUsers,DC=IA,DC=work
      cn=wpsadmin,ou=roles,dc=ia,dc=my

    To confirm your values are correct, review the values set in wkplc.properties on the target portal system.


  7. On all nodes, make a backup of existing archive directory...

      mkdir c:\scratch\Relyyyymmdd\archive_orig
      cd c:\scratch\Relyyyymmdd\archive_orig
      copy c:\IBM\WebSphere\wp_profile\PortalServer\deployed\archive\* c:\scratch\Relyyyymmdd\archive_orig


  8. Back up configuration.

      cd c:\scratch\Relyyyymmdd
      c:\IBM\WebSphere\wp_profile\bin\backupConfig backupConfig.zip
      startServer.bat


  9. Use xmlaccess to make a backup of target portal release

      cd c:\IBM\WebSphere\wp_profile\PortalServer\bin
      xmlaccess.bat -in c:\IBM\WebSphere\PortalServer\doc\xml-samples\ExportRelease.xml -out c:\scratch\Relyyyymmdd\stagev1_orig.xml -url "http://localhost:10039/wps/config" -user wpsadmin -password my123


  10. Empty portal

    From primary node, run...

      cd c:\IBM\WebSphere\wp_profile\ConfigEngine
      ConfigEngine.bat empty-portal -DWasPassword=my123 -DPortalAdminPwd=my123

    Ran into error running empty-portal. Executed work around.

    If you get error like:

      [xmlaccess] <request build="wp8001CF16_001_19" type="update" version="8.0.0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PortalConfig_8.0.0.xsd">
      [xmlaccess] <status element="[cross-page-wire Z10_380CGH02JGNCD0A2SRB43K20K6]" result="failed">
      [xmlaccess] <message >EJPXA0244E: The referenced resource Z5_380CGH02JOC520ACH314PV3002 could not be found in the system.</message>

    To fix, try running again.


  11. Run cleanup task on the target portal...

      cd c:\IBM\WebSphere\wp_profile\PortalServer\bin\
      xmlaccess.bat -user wpsadmin -password my123 -in c:\IBM\WebSphere\PortalServer\doc\xml-samples\Task.xml -out c:\temp\task_result.xml -url http://localhost:10039/wps/config


  12. Deploy ear files.

      c:/scratch/Relyyyymmdd/ITSCThemeEAR.ear
      scratch/Relyyyymmdd/ITSCWCMJspEAR.ear
      scratch/Relyyyymmdd/workPlugins.ear
      scratch/Relyyyymmdd/workWebServicesEAR.ear

  13. Copy archive files into place...

      copy c:\scratch\Relyyyymmdd\archive\* c:\IBM\WebSphere\wp_profile\PortalServer\deployed\archive

    We do this because empty-portal removes the deploy/archive files.


  14. Verify misc jar files are in place...

    1. On source system, make copies...

        mkdir c:\scratch\misc
        copy C:\IBM\WebSphere\PortalServer\shared\app\workFilters.jar c:\scratch\misc
        copy C:\IBM\WebSphere\PortalServer\shared\app\commons-lang-2.5.jar c:\scratch\misc
        copy C:\IBM\WebSphere\PortalServer\shared\app\log4j-1.2.16.jar c:\scratch\misc
        copy C:\IBM\WebSphere\PortalServer\shared\app\nls\config_en.properties c:\scratch\misc
        copy C:\IBM\WebSphere\PortalServer\shared\app\nls\wpsRegularExpression_en.properties c:\scratch\misc
        copy C:\IBM\WebSphere\PortalServer\pzn\prereq.pzn\collections\workPznServices.jar c:\scratch\misc
        copy C:\IBM\WebSphere\AppServer\lib\ext\workJAAS.jar c:\scratch\misc
        copy C:\IBM\WebSphere\AppServer\lib\ext\workSecurity.jar c:\scratch\misc

    2. Compress c:\scratch\misc

    3. Copy c:\scratch\misc.zip to target system and uncompress in c:\scratch

    4. On target system, copy files into place...

        cd c:\scratch\misc
        copy workFilters.jar C:\IBM\WebSphere\PortalServer\shared\app\
        copy commons-lang-2.5.jar C:\IBM\WebSphere\PortalServer\shared\app\
        copy log4j-1.2.16.jar C:\IBM\WebSphere\PortalServer\shared\app\
        copy config_en.properties C:\IBM\WebSphere\PortalServer\shared\app\nls\
        copy wpsRegularExpression_en.properties C:\IBM\WebSphere\PortalServer\shared\app\nls\
        copy workPznServices.jar C:\IBM\WebSphere\PortalServer\pzn\prereq.pzn\collections\
        copy workJAAS.jar C:\IBM\WebSphere\AppServer\lib\ext\
        copy workSecurity.jar C:\IBM\WebSphere\AppServer\lib\ext\


  15. Set shared library references

    You can either set shared library references manually, or you can try running the following wsadmin script.

      cd c:\IBM\WebSphere\wp_profile\bin
      wsadmin.bat -lang jython -user wpsadmin -password my123 -f updateLibraryReferences.py


  16. Import release

      cd c:\IBM\WebSphere\wp_profile\PortalServer\bin
      xmlaccess.bat -in c:\scratch\Relyyyymmdd\stagev1.xml -url "http://localhost:10039/wps/config" -user wpsadmin -password my123


  17. Optional: If in a cluster run the ConfigEngine task activate-portlets.

      c:\IBM\WebSphere\wp_profile\ConfigEngine\ConfigEngine.bat activate-portlets


  18. Import personalizations

      cd c:\IBM\WebSphere\PortalServer\pzn\prereq.pzn\publish
      c:\IBM\WebSphere\wp_profile\bin\setupCmdLine.bat
      pznload.bat --serverurl "http://localhost:10039/wps/pznpublish/pznpublishtarget" --targetpath / --username wpsadmin --password my123 c:\scratch\Relyyyymmdd\rules.node


  19. Use BeyondCompare to merge old and new version of...

    • c:work\Properties\my.properties
    • c:work\Properties\webservices.properties


  20. Copy the following new version of following directories into C:\work folders

    • formrules
    • workDependencies
    • workResourceBundles
    • PDFStore


  21. Verify all cache instances are created.


  22. If setting values from dmgr, synchronize nodes...

      System administration | Nodes

    ...and do a Full Resynchronize.


  23. Restart portal


  24. Optional: Before accessing in browser...

    1. Clear your internet browser cache
    2. Close your internet browser


  25. Log on to portal and perform technical smoke test.


  26. If you get SSL errors after logging in, try retrieving the Web Services producer signer cert.

    Web Services producer host name can be found in C:\work\Properties\webservices.properties.


import-wcm-data error

Fix: Files were downloaded/uploaded unzipped. To prevent packet loss during file transfer, archive WCM wcm.zip, then transfer the zip file.


WCM export/import rut

As long as no virtual portals are defined on the source or target systems, we can leave Managed Pages enabled when cloning a WCM database.


CleanupUsers.xml

However, in certain scenarios in which an LDAP server is changed, the data in the Portal database may no longer be current with the data in the LDAP. Such scenarios cause duplicate users/groups to be created in the Portal database. These duplicates are then used for access control calculations on the Portal server when users log in, while the original user and access control information is considered orphaned.

  1. Run CleanupUsers.xml

      cd c:\IBM\WebSphere\wp_profile\PortalServer\bin
      xmlaccess.bat -in c:\IBM\WebSphere\PortalServer\doc\xml-samples\CleanupUsers.xml -out c:\scratch\invalidusersgroups.xml -url "http://localhost:10039/wps/config" -user wpsadmin -password my123

    This step generates a set of invalid users and groups in file invalidusersgroups.xml.

  2. The decision must be made whether to delete the invalid users and groups using this step or a later step. IBM recommends you leave them in the Portal database temporarily.

    Make the following changes to the file invalidusersgroups.xml in the "request" tag:

    • Set "cleanup-users" to false.
    • Add "migrate-users" and set it to true.

    NOTE: If you see references to users or groups based on the original out-of-the-box user registry (uid=wpsadmin,o=defaultWIMFileBasedRealm), remove the entries from the XML file, or they could potentially cause the next step to fail.

  3. Run XMLaccess with invalidusersgroups.xml as the input file:

      xmlaccess.bat -in c:\scratch\invalidusersgroups.xml -out c:\scratch\staging.xml -url "http://localhost:10039/wps/config" -user wpsadmin -password my123

    At this point, the access control mappings have been migrated to the current external identifiers used by the users and groups in the LDAP. However, there are still orphaned user and group entries in the tables of the Portal databases that should be removed, which is addressed in next step.

  4. (Optional but recommended) Run XMLaccess with <wp_root>/doc/xml-samples/ CleanupUsers.xml as input a second time:

      cd c:\IBM\WebSphere\wp_profile\PortalServer\bin
      xmlaccess.bat -in c:\IBM\WebSphere\PortalServer\doc\xml-samples\CleanupUsers.xml -out c:\scratch\removeusersgroups.xml -url "http://localhost:10039/wps/config" -user wpsadmin -password my123

    where removeusersgroups.xml is essentially the same as invalidusersgroups.xml which contains the set of orphaned user and group references in the Portal database.

  5. (Optional but recommended) Run XMLaccess with removeusersgroups.xml as input to delete the orphaned users and groups:

      xmlaccess.bat -in c:\scratch\removeusersgroups.xml -user wpsadmin -pwd my123 -url localhost:10039/wps/config -out c:\scratch\cleanedDB_out.xml

    Ensure that "cleanup-users" is set to invalid in removeusersgroups.xml for this step.

    Check cleanedDB_out.xml for any error messages.

  6. Verify the Portal access control settings by logging into the Portal server and confirming that users can view the resources to which they have permission.

Technical Notes:

If you have WCM content, you should run the WCM MemberFixer tool. Before running MemberFixer, complete Steps 4 and 5. Reference the appropriate Portal version Information Center links below depending on the version of your Portal for further details on the MemberFixer tool.

If the system has been configured for VMM property extension or VMM federated database application groups that contain LDAP users, the procedure described above will not clean up the database tables which contain such objects. Contact HCL support for details on how to perform proper cleanup.

If the LDAP user or group DNs are different after the LDAP change, the above procedure will not work. Contact HCL Support for further details if the user and/or group distinguished names are different before and after the LDAP change.