Continuous Integration tools for AEM

Three commonly used tools that are central to the continuous integration process:
Jenkins: 
§  Used for continuous integration,
§  Version control,
§  Compiling,
§  Testing, and
§  Deployment of your code.
SonarQube:
§   Used for code analysis and
§   To track and measure code quality

Nexus OSS:
§   A free repository manager that allows for the mirroring and storage of Maven dependencies.


§  Refer the below guide for the continuous integration:





How to install AEM author or Publisher server with or without Sample content through command line

Statement - Install AEM author or publisher without sample content

Pre-requisite - 
                     -  JRE 1.8 setup is done
                     -  AEM 5.6.1 Quickstart jar file is downloaded
                     -  Windows 
                   
Solution - 
  1. Make sure JRE 1.8 is installed and verified through command prompt - Java -version
  2. Create a folder author or publisher & copy the downloaded AEM quickstart jar file to this folder
  3. Rename the AEM Jar file aem-author-p4502.jar or aem-publish-p5403.jar
  4. Use the below command for the Author/publish server installation with No sample content
  5. Author instance installation command:
             java -server -XX:MaxPermSize=256m -Xmx1024M -jar aem-author-p4502.jar -r author,                             nosamplecontent
     6. Publish instance installation command:
            java -server -XX:MaxPermSize=256m -Xmx1024M -jar aem-publish-p4503.jar -r publish,                            nosamplecontent

Where 
          -  Author and Publish is out of the box run modes provided by AEM
          -  Cannot use both run modes at the same time for the installation.
          -  Combine author with Samplecontent or Nosamplecontent but not both

          -  Combine publish with Samplecontent or Nosamplecontent but not both
       

How to Reclaim Wasted CRX3 Storage Using Off-line Tar File Compaction


Statement: Offline compaction in AEM 6.1

Environment:
§  JRE 1.7
§  AEM 6.1

Solution:

Due to continuing issues with MVCC revision cleanup, the recommended method to completely and reliably perform revision GC and re-claim storage space is via off-line tar file compaction.  Unfortunately, this requires downtime.  

Offline Compaction solution:

1) Determine disk usage BEFORE with:
du -sh /mnt/aem/author/crx-quickstart/repository/segmentstore
2) Determine the Oak version (/system/console)
3) Make sure you have the compatible version of the oak-run tool, see here(instructions here to build your own from source)
4) Backup AEM
5) Stop AEM
6) Find old checkpoints (assumes your server instance has at least 12 GB of memory - if not, reduce -Xms and -Xmx accordingly)
java -Dtar.memoryMapped=true -Xms8g -Xmx8g -jar oak-run-1.0.12.jar checkpoints /mnt/aem/author/crx-quickstart/repository/segmentstore
7) Find unreferenced checkpoints and delete them
java -Dtar.memoryMapped=true -Xms8g -Xmx8g -jar oak-run-1.0.12.jar checkpoints /mnt/aem/author/crx-quickstart/repository/segmentstore rm-unreferenced
8) Compact the segmentstore
java -Dtar.memoryMapped=true -Xms8g -Xmx8g -jar oak-run-1.0.12.jar compact /mnt/aem/author/crx-quickstart/repository/segmentstore
9) Start AEM
10) Determine disk usage AFTER with:
du -sh /mnt/aem/author/crx-quickstart/repository/segmentstore