Creating an AEM TarMK Cold Standby setup


Caution:
The PID for the Segment node store and the Standby store service has changed in AEM 6.3 compared to the previous versions as follows:
  • from org.apache.jackrabbit.oak.plugins.segment.standby.store.StandbyStoreService to org.apache.jackrabbit.oak.segment.standby.store.StandbyStoreService 
  • from org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService to org.apache.jackrabbit.oak.segment.SegmentNodeStoreService
Make sure you make the necessary configuration adjustments to reflect this change.

In order to create a TarMK cold standby setup, you first need to create the standby instances by performing a file system copy of the entire installation folder of the primary to a new location. You can then start each instance with a runmode that will specify its role (primary or standby).
Below is the procedure that needs to be followed in order to create a setup with one master and one standby instance:


  1. Install AEM.


  2. Shutdown your instance, and copy its installation folder to the location where the cold standby instance will run from. Even if run from different machines, make sure to give each folder a descriptive name (like aem-primary or aem-standby) to differentiate between the instances.


  3. Go to the installation folder of the primary instance and:
    1. Check and delete any preivous OSGi configurations you might have under aem-primary/crx-quickstart/install
    2. Create a folder called install.primary under aem-primary/crx-quickstart/install
    3. Create the required configurations for the prefered node store and data store under aem-primary/crx-quickstart/install/install.primary
    4. Create a file called org.apache.jackrabbit.oak.segment.standby.store.StandbyStoreService.config in the same location and configure it accordingly. For more information on the configuration options, see Configuration.
    5. If you are using an AEM TarMK instance with an external data store, create a folder named crx3 under aem-primary/crx-quickstart/install named crx3
    6. Place the data store configuration file in the crx3 folder.
    If, for example, you are running an AEM TarMK instance with an external File Data Store, you need these configuration files:
    • aem-primary/crx-quickstart/install/install.primary/org.apache.jackrabbit.oak.segment.SegmentNodeStoreService.config
    • aem-primary/crx-quickstart/install/install.primary/org.apache.jackrabbit.oak.segment.standby.store.StandbyStoreService.config
    • aem-primary/crx-quickstart/install/crx3/org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore.config
    Below you'll find sample configurations for the primary instance:
    Sample of org.apache.jackrabbit.oak.segment.SegmentNodeStoreService.config
    1
    2
    3
    org.apache.sling.installer.configuration.persist=B"false"
    customBlobStore=B"true"
    standby=B"false"

    Sample of org.apache.jackrabbit.oak.segment.standby.store.StandbyStoreService.config
    1
    2
    3
    org.apache.sling.installer.configuration.persist=B"false"
    mode="primary"
    port=I"8023"

    Sample of org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore.config
    1
    2
    3
    org.apache.sling.installer.configuration.persist=B"false"
    path="./crx-quickstart/repository/datastore"
    minRecordLength=I"16384"


  4. Start the primary making sure you specify the primary runmode:
    java -jar quickstart.jar -r primary,crx3,crx3tar


  5. Create a new Apache Sling Logging Logger for the org.apache.jackrabbit.oak.segment package.  Set log level to “Debug” and point its log output to a separate logfile, like /logs/tarmk-coldstandby.log. For more information, see Logging.


  6. Go to the location of the standby instance and start it by running the jar.



  7. Create the same logging configuration as for the primary. Then, stop the instance.


  8. Next, prepare the standby instance. You can do this by performing the same steps as for the primary instance:
    1. Delete any files you might have under aem-standby/crx-quickstart/install.
    2. Create a new folder called install.standby under aem-standby/crx-quickstart/install
    3. Create two configuration files called:
      • org.apache.jackrabbit.oak.segment.SegmentNodeStoreService.config
      • org.apache.jackrabbit.oak.segment.standby.store.StandbyStoreService.config
    4. Create a new folder called crx3 under aem-standby/crx-quickstart/install
    5. Create the data store configuration and place it under aem-standby/crx-quickstart/install/crx3. For this example, the file you need to create is:
      • org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore.config
    6. Edit the files and create the necessary configurations.


    Below are sample configuration files for a typical standby instance:
    Sample of org.apache.jackrabbit.oak.segment.SegmentNodeStoreService.config
    1
    2
    3
    4
    5
    org.apache.sling.installer.configuration.persist=B"false"
    name="Oak-Tar"
    service.ranking=I"100"
    standby=B"true"
    customBlobStore=B"true"

    Sample of org.apache.jackrabbit.oak.segment.standby.store.StandbyStoreService.config
    1
    2
    3
    4
    5
    6
    7
    org.apache.sling.installer.configuration.persist=B"false"
    mode="standby"
    primary.host="127.0.0.1"
    port=I"8023"
    secure=B"false"
    interval=I"5"
    standby.autoclean=B"true"

    Sample of org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore.config
    1
    2
    3
    org.apache.sling.installer.configuration.persist=B"false"
    path="./crx-quickstart/repository/datastore"
    minRecordLength=I"16384"


  9. Start the standby instance by using the standby runmode:
    1
    java -jar quickstart.jar -r standby,crx3,crx3tar

The service can also be configured via the Web Console, by:
  1. Going to the Web Console at: http://serveraddress:serverport/system/console/configMgr
  2. Looking for a service called TarMK Cold Standby service and double click it to edit the settings.
  3. Saving the settings, and restarting the instances so the new settings can take effect.
Note:
You can check the role of an instance at any time by checking the presence of the primary or standby runmodes in the Sling Settings Web Console.
This can be done by going to http://localhost:4502/system/console/status-slingsettings and checking the "Run Modes" line.

Reference URL: https://helpx.adobe.com/experience-manager/6-4/sites/deploying/using/tarmk-cold-standby.html#CreatinganAEMTarMKColdStandbysetup

No comments:

Post a Comment