<commit_before>[![Build Status](https://travis-ci.org/bstopp/puppet-aem.svg?branch=master)](https://travis-ci.org/bstopp/puppet-aem)
[![Dependency Status](https://gemnasium.com/bstopp/puppet-aem.svg)](https://gemnasium.com/bstopp/puppet-aem)
[![Code Climate](https://codeclimate.com/github/bstopp/puppet-aem/badges/gpa.svg)](https://codeclimate.com/github/bstopp/puppet-aem)
[![Test Coverage](https://codeclimate.com/github/bstopp/puppet-aem/badges/coverage.svg)](https://codeclimate.com/github/bstopp/puppet-aem/coverage)

# aem - Adobe Experience Manager

#### Table of Contents

1. [Overview - What is the AEM module?](#overview)
2. [Module Description - What does the module do?](#module-description)
3. [Setup - The basics of getting started with AEM module](#setup)
    * [What AEM affects](#what-aem-affects)
    * [Setup requirements](#setup-requirements)
    * [Beginning with AEM](#beginning-with-aem)
4. [Usage - How to use the module](#usage)
5. [Reference - AEM Module type and providers](#reference)
    * [Public defines](#public-defines)
    * [Private defines](#private-defines)
    * [Private types](#private-types)
5. [Limitations - OS compatibility, etc.](#limitations)
6. [Development - Contributing to the module](#development)

## Overview

The AEM module installs, configures and manages an AEM installation, license, and service.

## Module Description

The AEM module introduces the `aem::instance` resource which is used to manage and configure an installation of AEM utilizing the Puppet DSL. This module also introduces the `aem::license` and `aem::service` types; see usage for details.

## Setup

### What AEM affects

AEM Installations may be modified by using this module. See [warnings](#warnings), for how existing instances are affected by enabling a this module.

### Setup Requirements 

AEM uses Ruby-based providers, so you must enable pluginsync. Java is also required to be installed on the system. Finally, due to the AEM platform being proprietary, this module does not provide the installation jar file; it must be provided by the consumer.

### Beginning with AEM

A minimal AEM configuration is specified as:

~~~
aem::instance { 'aem' :
  source => '/path/to/aem-quickstart.jar',
}
~~~

See [Useage](#usage) and [Reference](#reference) for options and detailed explanations.

## Usage

### Aem::Instance

The `aem::instance` resource definition is used to install and manage an AEM instance. An AEM installation is considered complete when the following steps have occurred:

  * Unpacking the source file (See [documentation](https://docs.adobe.com/docs/en/aem/6-1/deploy/custom-standalone-install.html#Further options available from the Quickstart file).)
  * Configuring the start script (See [documentation](https://docs.adobe.com/docs/en/aem/6-1/deploy/command-line-start-and-stop.html).)
  * Starting & Stopping the server, creating base repository. _This does not create a service._

_Configuring an AEM installation where an unmanaged one exists is undefined (Theoretically it should work)._

### Aem::License

The `aem::license` resource definition is used to install and manage an AEM license file. As of v2.1.0 of this module, all `aem::license` catalog entries are applied as part of the module resource lifecycle. All `aem::license` entries are guaranteed to be applied before an associated `aem::service` resource (if *status* is not **unmanaged**).

**Upgrading to 2.1.0 may require edits to catalogs if explicit dependency was specified.**

### Aem::Service

The `aem::service` resource definition is used to install and manage an AEM Instance as a service. If the `aem::instance` property is not **unmanaged**, an `aem::service` resource will be created with the name *aem-<name>* where **<name>** is the `aem::instance` *name*. 

Therefore you can manage `aem::service` resources via *puppet resource* commands:

~~~
# Assume Catalog definition:
aem::instance { 'author' :
...
status => 'enabled',
...
}

# Puppet resource service command:
> puppet resource service aem-author
service { 'aem-author' :
  ensure => 'running',
  enable => true,
}
~~~

#### Minimal Definition

This is the minimal required `aem::instance` resource definition to install AEM. The default property values will be used, and the installation user:group will be `aem:aem`. This user and group will be created. The AEM instance will be installed to `/opt/aem`, which will also be created. A service definition wil be created (named *'aem-aem'*), enabled andrunning. 

~~~<commit_msg>Fix Service Documentation<commit_after>[![Build Status](https://travis-ci.org/bstopp/puppet-aem.svg?branch=master)](https://travis-ci.org/bstopp/puppet-aem)
[![Dependency Status](https://gemnasium.com/bstopp/puppet-aem.svg)](https://gemnasium.com/bstopp/puppet-aem)
[![Code Climate](https://codeclimate.com/github/bstopp/puppet-aem/badges/gpa.svg)](https://codeclimate.com/github/bstopp/puppet-aem)
[![Test Coverage](https://codeclimate.com/github/bstopp/puppet-aem/badges/coverage.svg)](https://codeclimate.com/github/bstopp/puppet-aem/coverage)

# aem - Adobe Experience Manager

#### Table of Contents

1. [Overview - What is the AEM module?](#overview)
2. [Module Description - What does the module do?](#module-description)
3. [Setup - The basics of getting started with AEM module](#setup)
    * [What AEM affects](#what-aem-affects)
    * [Setup requirements](#setup-requirements)
    * [Beginning with AEM](#beginning-with-aem)
4. [Usage - How to use the module](#usage)
5. [Reference - AEM Module type and providers](#reference)
    * [Public defines](#public-defines)
    * [Private defines](#private-defines)
    * [Private types](#private-types)
5. [Limitations - OS compatibility, etc.](#limitations)
6. [Development - Contributing to the module](#development)

## Overview

The AEM module installs, configures and manages an AEM installation, license, and service.

## Module Description

The AEM module introduces the `aem::instance` resource which is used to manage and configure an installation of AEM utilizing the Puppet DSL. This module also introduces the `aem::license` and `aem::service` types; see usage for details.

## Setup

### What AEM affects

AEM Installations may be modified by using this module. See [warnings](#warnings), for how existing instances are affected by enabling a this module.

### Setup Requirements 

AEM uses Ruby-based providers, so you must enable pluginsync. Java is also required to be installed on the system. Finally, due to the AEM platform being proprietary, this module does not provide the installation jar file; it must be provided by the consumer.

### Beginning with AEM

A minimal AEM configuration is specified as:

~~~
aem::instance { 'aem' :
  source => '/path/to/aem-quickstart.jar',
}
~~~

See [Useage](#usage) and [Reference](#reference) for options and detailed explanations.

## Usage

### Aem::Instance

The `aem::instance` resource definition is used to install and manage an AEM instance. An AEM installation is considered complete when the following steps have occurred:

  * Unpacking the source file (See [documentation](https://docs.adobe.com/docs/en/aem/6-1/deploy/custom-standalone-install.html#Further options available from the Quickstart file).)
  * Configuring the start script (See [documentation](https://docs.adobe.com/docs/en/aem/6-1/deploy/command-line-start-and-stop.html).)
  * Starting & Stopping the server, creating base repository. _This does not create a service._

_Configuring an AEM installation where an unmanaged one exists is undefined (Theoretically it should work)._

### Aem::License

The `aem::license` resource definition is used to install and manage an AEM license file. As of v2.1.0 of this module, all `aem::license` catalog entries are applied as part of the module resource lifecycle. All `aem::license` entries are guaranteed to be applied before an associated `aem::service` resource (if *status* is not **unmanaged**).

**Upgrading to 2.1.0 may require edits to catalogs if explicit dependency was specified.**

### Aem::Service

The `aem::service` resource definition is used to install and manage an AEM Instance as a service. Setting the `aem::instance` parameter to any value other than **unmanaged** will create a service defintion with the specified state. The name of the service will be *aem-&lt;name&gt;*, where *&lt;name&gt;* is the namevar of the `aem::instance`.

#### Minimal Definition

This is the minimal required `aem::instance` resource definition to install AEM. The default property values will be used, and the installation user:group will be `aem:aem`. This user and group will be created. The AEM instance will be installed to `/opt/aem`, which will also be created. A service definition wil be created (named *'aem-aem'*), enabled andrunning. 

~~~
{'fraction_non_alphanumeric': 0.11619198910700101, 'fraction_numerical': 0.0038579371383183933, 'mean_word_length': 4.8255122273628555, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 11, 'https://': 20, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1903361', 'n_tokens_mistral': 2658, 'n_tokens_neox': 2531, 'n_words': 963}