Syndication
Overview
We use syndication to replicate WCM data from a web content library in a source portal environment to a web content library on a target portal environment. Syndicators define the connection to subscribers, and indicate which libraries to replicate.Web portal syndication flow...
System Test --> Pre-Production
Pre-Production --> Production
Set up syndication between Syst and PreProd
- On target host, prepare portal to handle large file imports.
- Start PreProd and UAT portal servers.
Open firewall port 10039 for traffic...
172.30.4.20 (UAT) <-----> 172.30.3.72 (PreProd)
- In the WAS console for both, navigate to the Java virtual machine settings.
- Stand-alone server:
- Servers > Server Types > WebSphere application servers > WebSphere_Portal > Java and Process Management > Process definition > Java Virtual Machine
- Clustered server:
- System administration > Deployment manager > Java and Process Management > Process Definition > Java Virtual Machine
...and set Maximum Heap Size to 2048 MB.
- On UAT subscriber system, create a vault slot...
- Go to...
Administration | Access | Credential Vault | Add a vault slot
- Enter a name for the vault slot...
preprod-slot
- Click New, and enter a vault resource to associate with the slot...
preprod-resource
- Click...
Vault slot is shared
- Enter the user ID and password to access the slot from the syndicator server. This user ID and password must be defined on the syndicator server.
- Click OK.
- Set up a member fixer on the subscriber.
This is required between Syst and UAT because they use different DNs. We set up member fixer to fix references. UAT and Prod use the same DN structure, so member fixer is not required.
Syst UAT Prod uid=wpsadmin,o=defaultWIMFileBasedRealm
cn=wpsadmins,o=defaultWIMFileBasedRealmCN=portaladmin,OU=InternalUsers,DC=IA,DC=FOO
CN=wpsadmins,OU=Roles,DC=IA,DC=FOOCN=portaladmin,OU=InternalUsers,DC=IA,DC=FOO
CN=wpsadmins,OU=Roles,DC=IA,DC=FOOThe member fixer is run on the subscriber during syndication. It is run against items that have just been syndicated.
- Enable the member fixer tool.
On the subscriber host, add the following parameters to the WCM WCMConfigService service...
- connect.businesslogic.module.memberfixer.class=com.aptrix.pluto.security.MemberFixerModule
- connect.businesslogic.module.memberfixer.remoteaccess=true
- connect.businesslogic.module.memberfixer.autoload=false
- On the subscriber host, enable member fixer to run automatically during syndication.
On the subscriber host, in WCM WCMConfigService service, set...
- deployment.fixMembers=true
- syndication.memberfixer.altDn=update
- syndication.memberfixer.invalidDn=update
- syndication.memberfixer.realm=
Member fixer, when run automatically via syndication, preserves the dates of updated items.
- Edit...
C:/IBM/WebSphere/wp_profile/PortalServer/wcm/shared/app/config/wcmservices/MemberFixerModule.properties
...and set...
cn=wpsadmins,o=defaultWIMFileBasedRealm -> CN=wpsadmins,OU=Roles,DC=IA,DC=FOO
uid=wpsadmin,o=defaultWIMFileBasedRealm -> portaladmin,OU=InternalUsers,DC=IA,DC=FOO- Make backup of UAT libraries. For example...
mkdir c:\scratch\wcm_orig
cd c:\IBM\WebSphere\wp_profile\ConfigEngine
ConfigEngine.bat export-wcm-data -DWasPassword=mypassword -DPortalAdminPwd=mypassword -Dexport.allLibraries=true -Dexport.singledirectory=true -Dexport.directory=c:\scratch\wcm_orig- Because first-time syndication to an existing library is not supported, we need to delete existing RPTP libraries from UAT...
cd c:\IBM\WebSphere\wp_profile\ConfigEngine
ConfigEngine.bat run-wcm-admin-task-delete-libraries -Dlibraries=MyApp_design,MyApp_content_en,MyApp_content_fr -DPortalAdminId=portaladmin -DPortalAdminPwd=mypassword
- Go to...
Administration | Portal Content | Subscribers
- Click Subscribe Now.
- Enter the syndicator URL, in this case, PreProd...
http://172.30.3.31:10039/itsc/wcm
- Enter name for the syndicator item: PreProdSynd
- Enter name for the subscriber item: ProdSub
- Select the credential vault slot created previously.
- Click Next
- Select "Add Libraries", then select...
- MyApp_design
- MyApp_content_en
- MyApp_content_fr
- For syndication type, select either...
Live items Published and Expired Live and projects Published, Expired, Projects, and Draft items in a project.
- Click Finish, then test connection.
- Click Rebuild to kick off first syndication.
- We can monitor status by clicking Refresh...
- Set access to libraries.
Go to...
Portal Administration | Web Content Libraries
...and for each library, for User, set roles...
- All Authenticated Portal Users
- Anonymous Portal User
- Verify content renders, both as anonymous user and authenticated user.
- Enable only manual syndication by disabling automatic syndication on both the syndicator and the subsriber.
- Optional: If in authoring portlet, WCM items are showing invalid LDAP DNs for owners, run member fixer in report mode, then fix any issues...
cd C:/IBM/WebSphere/wp_profile/ConfigEngine
ConfigEngine run-wcm-admin-task-member-fixer -DPortalAdminId=portaladmin -DPortalAdminPwd=mypassword -DWasUserId=portaladmin -DWasPassword=mypassword -Dlibrary="MyApp_Content_en"
Report is written to...
- If necessary, troubleshoot.
Set up syndication between PreProd and Prod
Repeat above steps to set up syndication between preprod and prod.
Steps unique to Prod include...
- Enable only manual syndication by disabling automatic syndication.
Alternatively, configure syndication to occur only during off-peak hours by setting publish and expire dates, and set up syndication interval on System Test.
- Configure prod as a subscriber-only server. In WCM WCMConfigService
deployment.subscriberOnly = true
- On prod, disable automatic syndication.
- Disable workflow actions.
Hard-coded link
There are hard-coded links in...
- Libraries | MyApp_Content_en>Content | Email Templates | CSR User Password Reset Email Template
<!-- <li><a href="%s" target="" title="">Sign In</a></li> -->
<li><a href="https://orgportalsupport.iowa.gov:10443/itsc/portal/csr-login" target="" title="">Sign In</a></li>
- Libraries | MyApp_Content_en>Content | Email Templates | CSR User Reset Profile Email Template
<!-- <li><a href="%s" target="" title="">Sign In</a></li> -->
<li><a href="https://orgportalsupport.iowa.gov:10443/itsc/portal/csr-login" target="" title="">Sign In</a></li>
- Libraries | MyApp_Content_en | Content | Email Templates | Manage CSR New User Profile Email Template
<!-- <li><a href="%s" target="" title="">Web Portal</a></li> -->
<li><a href="https://orgportalsupport.iowa.gov:10443/itsc/portal/csr-login" target="" title="">Web Portal</a></li>
Old code commented out Hard coded link for CSR login inserted.
This may be overwritten during syndication from PreProd.
Member Fixer
SUMMARY INFORMATION
Library processed: MyApp_Content_en
Items Processed: 819
Non-existent Members that have no alternate Distinguished Names available: 247.
Members with Mismatched User Repository Unique IDs: 819.
Members that were skipped because they were not valid for the specified realm: 3,583.
Creators cannot be removed: 171NOTE: Some non-existent members have no alternate DNs defined in the member fixer properties file. Please re-run this tool with alternate DNs defined in the properties file, or use the invalidDn option to specify how to handle these members. Available options include:
- UPDATE: To replace the references to non-existent members with the Portal Administrator user
- REMOVE: To remove the references to non-existent members entirely
Update references for invalid DNs with the portal administrator user DN...
cd C:/IBM/WebSphere/wp_profile/ConfigEngine
ConfigEngine run-wcm-admin-task-member-fixer -DPortalAdminId=wpsadmin -DPortalAdminPwd=foo123 -DWasUserId=wpsadmin -DWasPassword=foo123 -Dlibrary="MyApp_Content_en" -Dfix=true -DinvalidDn=updateNOTE: Some members with mismatched User Repository Unique Ids have been detected. Please re-run this tool with the mismatchedId option to specify how to handle these members. Available options include:
- UPDATE: To update the references to User Repository Unique Ids of the members with mismatched User Repository Unique Ids
- REMOVE: To remove the references to members that have mismatched User Repository Unique Ids
Remove mismatched unique IDs...
cd C:/IBM/WebSphere/wp_profile/ConfigEngine
ConfigEngine run-wcm-admin-task-member-fixer -DPortalAdminId=wpsadmin -DPortalAdminPwd=foo123 -DWasUserId=wpsadmin -DWasPassword=foo123 -Dlibrary="MyApp_Content_en" -Dfix=true -DmismatchedId=removeNOTE: Some members that are not valid in the default realm have been detected. Re-run this tool with the noRealmDn option set to true to specify that these members should be processed.
cd C:/IBM/WebSphere/wp_profile/ConfigEngine
ConfigEngine run-wcm-admin-task-member-fixer -DPortalAdminId=wpsadmin -DPortalAdminPwd=foo123 -DWasUserId=wpsadmin -DWasPassword=foo123 -Dlibrary="MyApp_Content_en" -Dfix=true -DnoRealmDn=trueWe are using default realm: defaultWIMFileBasedRealm
NOTE: Creators cannot be removed. Please re-run this tool with the -altDn option to specify how to handle these creators.
cd C:/IBM/WebSphere/wp_profile/ConfigEngine
ConfigEngine run-wcm-admin-task-member-fixer -DPortalAdminId=wpsadmin -DPortalAdminPwd=foo123 -DWasUserId=wpsadmin -DWasPassword=foo123 -Dlibrary="MyApp_Content_en" -Dfix=true -DaltDn=remove
Cfg P2 and Cfg P3
[8/2/16 13:30:51:659 PDT] 00001969 DataStoreCont E com.ibm.wps.datastore.impl.DataStoreContext handleException EJPDB0099E: Error occurred during database access. Last SQL statement is [INSERT INTO JCR.PROT_RES_DEP (OID, CREATED, MODIFIED, RES_TYPE, EXTERNAL_OID, EXTERNAL_UID, DEP_PARENT_OID, DEL_PARENT_OID) VALUES (?, ?, ?, ?, ?, ?, ?, ?)]. Transaction has status [STATUS_ACTIVE], global ID [000001564cf3a6eb000000011ef16ab49a8bc78e134f8e1c44f08e53bb9f95d78d69eb06000001564cf3a6eb000000011ef16ab49a8bc78e134f8e1c44f08e53bb9f95d78d69eb0600000001] and local ID [519137972].^M com.ibm.wps.datastore.impl.DataBackendException: EJPDB0098E: Error occurred during database access. Transaction has status [STATUS_ACTIVE], global ID [000001564cf3a6eb000000011ef16ab49a8bc78e134f8e1c44f08e53bb9f95d78d69eb06000001564cf3a6eb000000011ef16ab49a8bc78e134f8e1c44f08e53bb9f95d78d69eb0600000001] and local ID [519137972].^M
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The INSERT statement conflicted with the FOREIGN KEY constraint "FK2111A". The conflict occurred in database "MyAppJ_P3", table "JCR.PROT_RES", column 'OID'.^M
To fix...
- On Cfg P2, export WCM
cd c:\IBM\WebSphere\wp_profile\ConfigEngine
ConfigEngine.bat export-wcm-data -DWasPassword=foo123 -DPortalAdminPwd=foo123 -Dexport.allLibraries=true -Dexport.singledirectory=true -Dexport.directory=c:\scratch\wcmCfgP2- On Cfg P3, delete existing libs
cd c:\IBM\WebSphere\wp_profile\ConfigEngine
ConfigEngine.bat run-wcm-admin-task-delete-libraries -Dlibraries=MyApp_design,MyApp_content_en,MyApp_content_fr -DPortalAdminId=wpsadmin -DPortalAdminPwd=foo123- Import wcmCfgP2 into Cfg P3
ConfigEngine.bat import-wcm-data -DWasPassword=foo123 -DPortalAdminPwd=foo123 -Dimport.directory=c:\scratch\wcmCfgP2