Highlighted

Cold-standby setup for an existing AEM instance with file datastore

Avatar

Avatar

ramgopalm545617

Avatar

ramgopalm545617

ramgopalm545617

11-05-2018

Recently in a day care ticket, adobe support team has mentioned that it is suggested to have a separate datastore for standby server.

if we want to implement cold-standby in an existing AEM environment with a file datastore, do we have to copy over the existing datastore to a separate folder and update the configurations accordingly.

Regards,

Ramgopal.

Replies

Highlighted

Avatar

Avatar

Kunwar

Employee

Avatar

Kunwar

Employee

Kunwar
Employee

11-05-2018

Yes you have to take over the datastore to the standby server and remove the sling id. In summary, below steps should give you an idea. These include the datastore configs :

Use the below steps to setup cold standby instance and let me know incase of any issues.

Setting up Primary instance

  1. Setup a directory for Primary instance for Cold standby Setup
  2. In Primary instance directory, Unpack AEM 6.1 using command java -jar quickstart.jar -unpack
  3. Create install folder under /crx-quickstart
  4. I have attached an archive install.zip containing 2 folders (install.primary, install.standby) containing configuration
  5. Place these 2 folders in install directory in Step #2
  6. Start the primary instance with command java -jar quickstart.jar -r primary,crx3,crx3tar
  7. Wait for the instance to be up and running.
  8. Create Debug Logger for class org.apache.jackrabbit.oak.plugins.segment and name the logger as tarmk-coldstandby.log
  9. Do a quick smoke test and check if everything is running fine.
  10. Navigate to http://HOST:PORT/system/console/configMgr and search for Apache Jackrabbit Oak TarMK Cold Standby service to observe the mode and other configuration are correct and in accordance to Primary instance.
  11. Navigate to http://HOST:PORT/system/console/status-slingsettings to see if runmodes are picked up fine.

Setting up the Standby instance

  1. Setup a directory for Standby instance for Cold standby Setup
  2. Copy the /crx-quickstart directory from the primary instance over to Standby directory
  3. This should already contain /install folder plus the other configurations
  4. Search for sling.id file in /crx-quickstart directory and delete the same.
  5. Start the Standby instance with java -jar quickstart.jar -r standby,crx3,crx3tar and wait for the instance to be up and running.
  6. Navigate to http://HOST:PORT/system/console/configMgr and search for Apache Jackrabbit Oak TarMK Cold Standby service to observe the mode and other configuration are correct and in accordance to Standby instance.
  7. If the above configuration still shows the mode as primary, Change this to standby and save the configuration. This would be one-time thing as we copied the complete /crx-quickstart from the Primary instance.
  8. Navigate to http://HOST:PORT/system/console/status-slingsettings to see if runmodes are picked up fine. If needed, Restart once again with the standby runmode, same command as in Step#5
  9. Tail error.log and tarmk-coldstandby.log to see more information around the primary and standby instance

Testing if the cold standby setup works

  1. After the above setup is complete and everything has been correctly setup we would check if this setup works as expected.
  2. Navigate to http://HOST:PORT/assets.html/content/dam in the Primary instance and upload an image
  3. Wait for a few minutes and check the same path under Standby instance.
  4. If the image is synced up, Cold standby Setup works as expected.
  5. Now to make the Running Standby instance converted to Primary instance, You would need to shut down the Standby instance and start the same by running the command java -jar quickstart.jar -r primary,crx3,crx3tar in the Standby Directory terminal

Config files : Shared Files - Acrobat.com

Highlighted

Avatar

Avatar

ramgopalm545617

Avatar

ramgopalm545617

ramgopalm545617

15-05-2018

Hi Kunwar,

Thanks for your reply, but these steps are for setting up a new environment.

But, in our scenario we already have an environment with a file datastore configured to a different file path and we are trying to create cold-stand by on top a running instance. The setup is as below

Crx quick start location : /k01/app/aem/crx-quickstart

File datastore location: /l01/aem/datastore

Day care has suggested to create a separate datastore for stand-by server. So, my question was that If we are configuring a cold stand-by now, do we have to copy the file datastore from /l01/aem/datastore to /l01/aem/datastore-standby and then start the standby server pointing the new datastore location or just create a new location and start the server?

Highlighted

Avatar

Avatar

Kunwar

Employee

Avatar

Kunwar

Employee

Kunwar
Employee

15-05-2018

Id prefer cloning the current primary instance along with datastore to a new location  and start as standby instance as if you start a fresh coldstandby instance, the time to sync over everything from primary would be very high.

if cloning, copy everything along with datastore to a new location, find and delete sling.id file and start as standby instance

if new standby instance, just place correct configs to new aem instance and start as standby and wait for sync to complete

Highlighted

Avatar

Avatar

ramgopalm545617

Avatar

ramgopalm545617

ramgopalm545617

15-05-2018

This really helps

As per my knowledge for every restart the sling ID gets changed, do you think it is mandatory to delete the sling.id file?

Highlighted

Avatar

Avatar

Kunwar

Employee

Avatar

Kunwar

Employee

Kunwar
Employee

15-05-2018

- As per my knowledge for every restart the sling ID gets changed : This is incorrect.

Only if you clone the instance to another location, you need to regenerate the sling.id file. For a new instance, you don't need to do this.

Highlighted

Avatar

Avatar

ramgopalm545617

Avatar

ramgopalm545617

ramgopalm545617

15-05-2018

Thanks again, let me check this setup and get back to you

Highlighted

Avatar

Avatar

msina

Avatar

msina

msina

18-09-2018

Hi,

Did it worked for you.

Thanks

Sina

Highlighted

Avatar

Avatar

ramgopalm545617

Avatar

ramgopalm545617

ramgopalm545617

21-09-2018

we are still working on issues and still not able to complete the setup

Highlighted

Avatar

Avatar

msina

Avatar

msina

msina

21-09-2018

Thanks for the update.