System Admin Book - ranjanui/AEM GitHub Wiki

Chapter 1: Introduction, Install & Start Author An Instance

OSGI And Apche Sling

  • AEM is built within an OSGI Application framework.
  • OSGi is a dynamic module system for Java that provides a framework within which small, reusable, standardized components can be composed into an application and deployed.
  • The Apache Sling framework is designed to expose a JCR content repository through an HTTP-based REST API.
  • Both AEM’s native functionality and the functionality of any web site built with AEM are delivered through this framework.

Clustering

  • In computing, a cluster is a group of computers linked together to work in some respects as a single computer.
  • Every CRX instance comes pre-configured to run within a cluster, even when running a singular instance. This design feature allows the configuration of multi-node clusters with little effort.
  • AEM consists of sets of OSGi bundles that are deployed on the CRX(content repository extreme).

AEM Functional Building Block

  • The AEM application modules use the JCR API to manipulate content in CRX.
  • The AEM application modules sit on top of the AEM shared framework, which contains all application layer functionality that is shared among all the application modules; for example, mobile functionality, multi-site manager, taxonomy management, and workflow.
  • In addition to the shared application framework, the AEM applications (Sites, Assets, and so on) share the same infrastructure and same UI framework. With the installation of AEM, you get all applications, as they are tightly integrated. Application functionality that is not used or not licensed can be disabled after the initial install.
  • Third party repositories can be integrated with JCR connectors that expose their content into CRX and are available to AEM. Notice that the connectors are plugged in at the content repository level, which allows the content in the external repositories to appear to authors as if the content existed in the local content repository—a true virtual repository.

The AEM application modules sit on top of the AEM shared framework [granite], which contains functionality that is shared among all the application modules; for example, mobile functionality, multi- site manager, taxonomy management, and workflow.

  • In addition to the shared application framework, the AEM applications (WCM, DAM, Mobile, etc.) share the same infrastructure and same UI framework.
  • Since “Everything is Content” and all the content is in the content repository, you will note that clustering and backup is done at the repository level.

The Application Runtime is OSGi, specifically Apache Felix. At this layer, you can hot deploy any code that you wrap up as an OSGi bundle. The OSGi runtime hosts Java applications that can access the repository via the JCR API. * As part of the Application Runtime, you get Apache Sling, a RESTful web application framework that exposes the full repository content via HTTP and other protocols. * OSGi is a platform in the Java-stack that allows large development teams to be more efficient, and provides the ability to replace code pieces (bundles) during normal operations of the application—in other words, without taking the server down.

  • OSGi bundles can contain compiled Java code, scripts, and content that is to be loaded into the repository, in addition to configuration and/or other files, as needed.
  • Bundles can be loaded and installed during normal operations.
  • For AEM, bundles are dropped into specially named folders (.../install) in the repository.

Installation

  • In AEM terminology, an “instance” is a copy of AEM running on a server. AEM installations usually involve at least two instances, typically running on separate machines:
  • Author: used to create, upload, and edit content, and to administer the website
  • Publish: published content
  • Dispatcher: A static web server (Apache httpd, Microsoft IIS, etc.) augmented with the AEM dispatcher module. It caches web pages produced by the publish instance to improve performance.

  • Requires: jar file, properties file, jdk 1.7, 4gb ram per instance

  • graphical way: double click on jar file.

  • command line view: java -jar cq-author-4502.jar -h

  • options:

-Xms --> assigns the initial heap size eg -Xms512m -Xmx --> assigns the maximum size the heap can grow eg -Xmx1024m -XX:MaxPermSize --> assigns the heap to hold reflective data of the VM (e.g. Java objects) eg: -XX:MaxPermSize=128m