You are here
Home > AEM > AEM installation with NODE and DATA STORE configuration

AEM installation with NODE and DATA STORE configuration

AEM installation

AEM installation

In this article we will implement AEM installation with different store configuration.

Major difference between CQ5.x and AEM6.x:
a.AEM6.x implements OAK repository whereas older CQ5 uses CRX2.
b.AEM6.x uses Microkernel , CQ5.x uses Persistence manager.
c.Custom re-index is possible in AEM 6.x depends upon the queries . (Will cover more on this in later article)
d.Slightly plays major role in AEM6.x

Prerequistic:

1.AEM jar .

2.License properties

3.Decide which Node and Data store required for your project.

 

                              DATA STORE TYPES

DATA STORE
DATA STORE

 

                               NODE STORE TYPES

 

NODE STORE
NODE STORE

 

 

 

 

 

 

 

1)Data Store types:

  1. a) Amazon S3 bucket:

This type of storage requires account with Amazon. We need this type to store more datas in an external S3 bucket.

Config file name :

org.apache.jackrabbit.oak.plugins.blob.datastore.S3DataStore.config

Basic config:

accessKey=<provided by Amazon>

secretKey=<provided by Amazon>

s3Bucket=<provided by Amazon>

s3Region=<provided by Amazon>

s3EndPoint=<provided by Amazon>

connectionTimeout=120000

socketTimeout=120000

maxConnections=40

maxErrorRetry=10

writeThreads=20

cacheSize=<size in bytes>

concurrentUploadsThreads=10

asyncUploadLimit=100

cachePurgeTrigFactor=0.95d

path=~/datastore

b)File Datastore:

This method is required to store all binary data in same local file system .

Config file name :

org.apache.jackrabbit.oak.plugins.blob.datastore.FileDataStore.config

 

Basic config:

path=~/datastore

minRecordLength=<values in bytes>

2)Node Store types:

a)Document Node store:

This type needs to configure MONGODB. Mongo DB setup is configured for HA of instances.

 

Config file name :

org.apache.jackrabbit.oak.plugins.document.DocumentNodeStoreService.config

 

Basic config:

mongouri=mongodb://<hostname>:<port>

db=<db name>

customBlobStore=false

 

Please email me @ pradeepgokulr007@gmail.com if you face any issue while implementing mongoDB .

 

b)Segment node store:

This method uses to store Metadata , properties in TARMK implementation.

Same article contains offline compaction details below.

 

Config file name :

org.apache.jackrabbit.oak.plugins.segment.SegmentNodeStoreService.config

 

Basic config:

customBlobStore=true

 

NOTE: By default , segment store folder creates under /repository folder.If still needs to change the path , we can use repository.home in config file.

 

Steps to install:

 

1.Move Jar and license file to appropriate folder.

2.Rename jar file as  “cq6-p<portnumber>.jar”  # specify port number 4 or 5 digit

3.Just Unzip the jar file

Java –jar cq6-p<portnumber>.jar –unpack

 

Sample output:

[pradeep@host ~]$ java -jar cq6-author-p4507.jar -unpack

Loading quickstart properties: default

Loading quickstart properties: instance

Setting properties from filename ‘/home/pradeep/cq6-author-p4507.jar’

Option ‘-quickstart.server.port’ set to ‘4507’ from filename cq6-author-p4507.jar

Verbose mode – stdout/err not redirected to files, and stdin not closedResourceProvider paths=[/gui, /gui/default]

quickstart.build

quickstart.properties not found, initial install

UpgradeUtil.handleInstallAndUpgrade has mode INSTALL

Saving build number in quickstart.properties

Upgrade: no files to restore from pre-upgrade backup

31 files extracted from jar file

Running chmod +x /home/pradeep/crx-quickstart/bin/start

Running chmod +x /home/pradeep/crx-quickstart/bin/stop

Running chmod +x /home/pradeep/crx-quickstart/bin/status

Running chmod +x /home/pradeep/crx-quickstart/bin/quickstart

Not starting the Quickstart server as the -unpack option is set

Quickstart files unpacked, server startup scripts can be found under /home/pradeep/crx-quickstart

——————————————————————————————————————————————

4.Once extracted properly, check crx-quickstart folder present in the same path

5.Inside Crx-quickstart folder , create a folder named as “install” folder.

6.As per above configuration , create config file and configuration.

7.Once done, start the instance.

8.Check all bundles are in active state and review the error log .
Issues while configuring S3 bucket:

After all config made as per above, we faced issues related to Amazon config  and  local cache path  not created properly.

After lots of verification on config file, we finally identified as the config made under install folder is not override on our OSGI console.

Open  config similar to your setup and verify the configuration override properly.

AEM installation with NODE and DATA STORE configuration

 

Sample S3 config :

AEM installation with NODE and DATA STORE configuration

 

Sample Segment store config:

AEM installation with NODE and DATA STORE configuration

Offline compaction :

Few may face issues with disk space issue on Segment store folder .

To reduce space , AEM has provided with compaction tool. This post explains about offline compaction techniques.

 

Steps to perform offline compaction:

 1.Download and install latest oak-run . Please visit below URL to check the updates

https://repository.apache.org/content/repositories/releases/org/apache/jackrabbit/oak-run/

2.Stop the AEM instance.

3.Backup the instance .

4.Check the size before running command

5.Run the below command

a.java -jar oak-run-x.x.xx.jar checkpoints <segmentstore path>

b.java -jar oak-run-x.x.xx.jar  checkpoints <segmentstore path>  rm-unreferenced

c.java -jar oak-run-x.x.xx.jar  compact <segmentstore path>

6.Start the instance.

7.Check the segment store size.

Explanation:

1.First command will identify the older checkpoints.

2.Second command, checks for unreferenced checkpoints and remove them

3.Compact the segment store.

NOTE: Once you are familiar with these steps , please implement in script .

Feel free to email on mongo DB setup and configuration @pradeepgokulr007@gmail.com

 

2 thoughts on “AEM installation with NODE and DATA STORE configuration

Leave a Reply

Top