Upgrading to AEM6 on MongoMK
The major change that AEM6 has over the earlier CQx versions, is at its repository level. Till CQ 5.6 version TarPM was used as a persistence manager but with AEM 6 TarPM is not supported any more by CQ. AEM 6 now comes with the MicroKernels which act as persistence managers in AEM 6.
For now AEM 6 support TarMK and MongoMK Microkernal.
Hence, when upgrading to AEM 6 from CQ5.6 one has three repository options:
- Tar MK
- Mongo MK
- CRX 2 and hence not upgrading to new Oak based repository.(Since AEM 6.1 removes support for CRX2 as well)
Now the question comes Migrating to which MK suits your business the best.
The basic thumb rule is that when your requirement is performance then go for TarMK as TarMk is designed for performance and if requirement is such that you need to accommodate a growing amount of work in a capable manner then go for MongoMK as it is mainly designed for scalability.
In this article we will see how to migrate from Cq5.6 to AEM 6 on Mongo MK.
- Java 1.7 latest version
- MongoDB installed
- Download crx2oak.jar file from : http://docs.adobe.com/content/docs/en/aem/6-0/deploy/upgrade/_jcr_content/par/download/file.res/crx2oak-1.0.42.jar
Migration to AEM 6 consists of two steps:
- Inplace Upgrade in which we will put the aem6 jar file in place of the CQ 5.6 jar in AEM directory and then run the jar. This will upgrade the CQ to AEM 6, but repository will remain to be in CRX 2.
- Then migrating the repository from CRX 2 to OAK.
Before starting with the inplace upgrade please follow the below maintenance tasks:
- Make a backup of the instance that we wanted to migrate.
- Disable replication.
- Stop all running workflow instances.
- Stop all workflow launchers.
- Stop CQ
- Disable any custom authentication mechanisms such as LDAP.
- Start CQ.
- Run a consistency check.
- Run a datastore garbage collect.
- Stop instance.
Once done with the above steps, start with the inplace upgrade and you will have a CQ 5.6 upgraded to AEM6 but with the CRX2 as the repository.
Once done with the above step now we have to migrate the AEM 6 repository from CRX2 to OAK.
Below are the steps to migrate the CRX2 to OAK on MongoMK:
- Remove com.day.crx.sling.server bundle from CQ5.6 and shut down the instance.
- Have the AEM 6 jar into a new folder.(AEM6Upgrade)
- Under the AEM6Upgrade Folder create a new folder crx-quickstart
- Under crx-quickstart create a new folder install
- Create two CFG file under install folder as:
Edit the above file as below:
Edit the above file as below:
#Mongo server details
#Name of Mongo database to use
#Store binaries in custom BlobStore e.g. FileDataStore
- Start the AEM6 with Mongo MK using the command as :
java -jar cq6-author-p4502.jar -r crx3,crx3mongo
- Once the instance is started, shut it down
- Delete the contents of the AEM6 repository, Go to crx-quickstart/repository and delete all the contents
Drop the already created aem-author database, Either use MongoVUE for the same OR use MongoShell using the command “use aem-author” and then “db.dropDatabase()”.
- Move the crx-quickstart/repository/repository/datastore content from AEM 5.6 to the AEM 6 datastore folder.
- Run the crx2oak.jar file using the command “ java -jar crx2oak-1.0.42.jar <5.6 location>\crx-quickstart\repository mongodb://localhost:27017/aem-author”
- Restart AEM6
- You can see the enteries in MongoVUE like below