How to Upgrade AEM 6.2 to 6.4 based on MongoMK

Upgrading Author MongoMK based cluster instance , Step-wise Solutions πŸ‘‹

1. Create Checkpoint πŸ‘‡

  • We need to have a checkpoint in production instance with fairly long lifetime. This should be done before taking clone.
  • Via OSGi felix console JMX, Go to CheckpointMBean and create a checkpoint with a long enough lifetime like 200 days. For this, invoke CheckpointMBean#createCheckpoint with 17280000000 as argument for lifetime 
  • Lifetime: 200 days = 17280000000 mill-seconds.

2. System Cleanup πŸ‘‡

  1. Remove unnecessary nodes , like under /etc/packages
  2. Version purge
  3. Purge Audit logs 
  4. Index Consistency check(Validate for health of OAK lucene index)
  5. Datastore garbage collection

3. Extract text From Binaries (Only , if your Repository size is large) πŸ‘‡

πŸ‘‰Idea is for extract text from binaries offline before upgrade is speeding up the fulltext-async  reindexing process .
  1. Traverse repo & generate file carrying binary details 
  2. Generate text file from existing index data
  3. Extract text for the binaries 
     πŸ‘‰Feeding the extracted text for indexing into Instance :-
         Supply configuration (.config) file for PID  
          "org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreTextProviderService" before 
          the upgarde (starting 6.4 AEM) with the path to the extracted text.
          If configuration is successful, below message appears in log:

*INFO* [CM Event Dispatcher (Fire
ConfigurationEvent: pid=org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreT extProviderService)] org.apache.jackrabbit.oak.plugins.index.datastore.DataStoreText

Writer Using extracted store from path/AEM-6.4/text-extraction/store
*INFO* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.jackrabbit.oak.plugins.blob.datastore.DataStoreT extProviderService)] org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProvi derService
org.apache.jackrabbit.oak.plugins.index.datastore.DataStoreText Writer Extraction result for [41a7391088185788fb07359223f2eaa995ce7ac1aebbc6c3dc9438b5b0a908 80] at path [/content/dam/AEM Upgrade Assesment Report1.pdf/jcr:content/renditions/original/jcr:content@jcr:dat a/jcr:data] is [SUCCESS] 

4. Create Offline Index (Only , if your Repository size is large) πŸ‘‡

  1. Create 6.4 index definitions 
  2. Create Index 

5.  Pre-Upgrade Activities πŸ‘‡

  1. Ensure disk space is triple the size of repository 
  2. correct upgrade start command (
    RunModes=author,mongo,prod,nosamplecontent,crx3,crx3mongo)
  3. Validate FileDataStore Configuration 
  4. Validate DocumentNodeStore Configuration
  5. Persistence Cache Path in 
    "org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreSer vice.cfg
    org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreSer vice.cfg" is absolute path 
  6. Start the instance using AEM 6.2 jar so that OSGI config points the new FDS path & generate the quickstart.properties file .Make Sure tempdir path exists (Start Command - nohup java -server -Xms4G -Xmx8G -XX:MaxPermSize=4g - Djava.awt.headless=true -Djava.io.tmpdir=/opt/dam/author-pro- clone-64/aemTemp - Dsling.run.modes=author,mongo,prod,nosamplecontent,crx3,crx3mon go -jar cq-quickstart-6.2.0.jar -p 4504 - Dsling.properties=conf/sling.properties & )
  7. Validate the user with admin access 
  8. Validate all the consoles in the interface after start-up
  9. Disable All launchers (OOTB & Custom workflows launchers)
  10. Disable the schedular Jobs 
  11. Disable Replication Agents
  12. Skip re-indexing for nodetype during upgrade (Set declaringNodeTypes": ["nam:oak:QueryIndexDefinition", "nam:cq:ClientLibraryFolder", "nam:cq:Component", "nam:rep:User", "nam:rep:Authorizable"],
    Set version to 3 as per the AEM 6.4 Vanilla instance)
  13. Stop Server
  14. Archive Current logs before start Upgrade

6. Upgrade Activities πŸ‘‡

  1. Stop the server , if running
  2. Remove all the hotfixes and jars from the install folder
  3. Download new AEM 6.4 jar 
  4. Unpack new 6.4 jar (Run the command java -Xmx4096m -jar cq-quickstart-6.4.0.jar - unpack )
  5. Replace the crx2oak with latest
  6. Validate DocumentNodeStore
  7. Validate FileDataStore
  8. Copy the created indexes to repository folder (only for large repo , if u generated)
  9. Start AEM Instance with below command πŸ‘‡
nohup java -server -Xms4G -Xmx24G -XX:MaxPermSize=4g - Djava.awt.headless=true -Djava.io.tmpdir=/opt/dam/preprod-author-test/aemTemp - Dsling.run.modes=author,mongo,prod,nosamplecontent,crx3,crx3mon go -jar cq-quickstart-6.4.0.jar -p 4504 -
Dsling.properties=conf/sling.properties &
    10.  Monitor error and upgrade logs
    11.  Check all bundles are active
    12.  Verify if the indexing are Completed
    13.  Restart the server

Thanks -  Hope Above Steps help for Safely Upgrade Upgrading MongoMK instance is tricky so do carefully πŸ‘†

Comments

Popular Posts