Skip to content

Commit 28e64fe

Browse files
committed
Merge pull request #44 from bstopp/feature/pre-install-configs
OSGi Configuration Support
2 parents ae287be + 32f529a commit 28e64fe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2617
-636
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ language: ruby
22
rvm:
33
- "1.9.3"
44
- "2.0.0"
5-
- "2.1.5"
6-
- "2.2.1"
5+
- "2.1.7"
6+
- "2.2.3"
77

88
env:
99
- CODECLIMATE_REPO_TOKEN="c51cdd016a53f48b9e48d81fc67fed1fd4310fcbdd35daf0f3694ff5d54637f7"

Gemfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
22

33
group :development, :tests do
4-
gem 'rspec', '~> 3.3', :require => false
4+
gem 'rspec', '~> 3.4', :require => false
55
gem 'rake', :require => false
66
gem 'metadata-json-lint', :require => false
77
gem 'rspec-puppet', :require => false
8+
gem 'webmock', :require => false
89
gem 'puppetlabs_spec_helper', :require => false
910
gem 'codeclimate-test-reporter', :require => false
1011
end
@@ -15,7 +16,7 @@ group :linting do
1516
end
1617

1718
group :system_tests do
18-
gem 'beaker', '~>2.18', :require => false
19+
gem 'beaker', '~>2.31', :require => false
1920
gem 'beaker-rspec', :require => false
2021
gem 'serverspec', :require => false
2122
gem 'beaker-puppet_install_helper', '>= 0.2.1', :require => false

Gemfile.lock

+12-3
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ GEM
5757
builder (3.2.2)
5858
codeclimate-test-reporter (0.4.8)
5959
simplecov (>= 0.7.1, < 1.0.0)
60+
crack (0.4.3)
61+
safe_yaml (~> 1.0.0)
6062
diff-lcs (1.2.5)
6163
docile (1.1.5)
6264
docker-api (1.24.1)
@@ -142,7 +144,7 @@ GEM
142144
fog-core
143145
fog-json
144146
fog-xml
145-
fog-sakuracloud (1.7.3)
147+
fog-sakuracloud (1.7.5)
146148
fog-core
147149
fog-json
148150
fog-serverlove (0.1.2)
@@ -185,6 +187,7 @@ GEM
185187
memoist (~> 0.12)
186188
multi_json (~> 1.11)
187189
signet (~> 0.7)
190+
hashdiff (0.2.3)
188191
hiera (3.0.5)
189192
json_pure
190193
hocon (0.9.3)
@@ -271,6 +274,7 @@ GEM
271274
ruby-progressbar (~> 1.7)
272275
tins (<= 1.6.0)
273276
ruby-progressbar (1.7.5)
277+
safe_yaml (1.0.4)
274278
serverspec (2.25.0)
275279
multi_json
276280
rspec (~> 3.0)
@@ -303,12 +307,16 @@ GEM
303307
unf (0.1.4)
304308
unf_ext
305309
unf_ext (0.0.7.1)
310+
webmock (1.22.3)
311+
addressable (>= 2.3.6)
312+
crack (>= 0.3.2)
313+
hashdiff
306314

307315
PLATFORMS
308316
ruby
309317

310318
DEPENDENCIES
311-
beaker (~> 2.18)
319+
beaker (~> 2.31)
312320
beaker-puppet_install_helper (>= 0.2.1)
313321
beaker-rspec
314322
codeclimate-test-reporter
@@ -318,10 +326,11 @@ DEPENDENCIES
318326
puppet-lint
319327
puppetlabs_spec_helper
320328
rake
321-
rspec (~> 3.3)
329+
rspec (~> 3.4)
322330
rspec-puppet
323331
rubocop
324332
serverspec
333+
webmock
325334

326335
BUNDLED WITH
327336
1.11.2

README.md

+72-18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
[Overview]: #overview
21

32
[Module Description]: #module-description
43

@@ -22,6 +21,7 @@
2221
[Adobe]: http://www.adobe.com
2322
[Adobe Experience Manager]: http://www.adobe.com/marketing-cloud/enterprise-content-management.html
2423

24+
[Felix Configuration]: http://felix.apache.org/documentation/subprojects/apache-felix-config-admin.html
2525

2626
[Sling launchpad]: https://sling.apache.org/documentation/the-sling-engine/the-sling-launchpad.html
2727
[Sling command-line-options]: https://sling.apache.org/documentation/the-sling-engine/the-sling-launchpad.html#command-line-options
@@ -31,23 +31,25 @@
3131
[AEM Installation Runmodes]: https://docs.adobe.com/docs/en/aem/6-1/deploy/configuring/configure-runmodes.html#Installation%20Run%20Modes
3232
[AEM Java Requirements]: https://docs.adobe.com/docs/en/aem/6-1/deploy/technical-requirements.html#Java%20Virtual%20Machines
3333

34+
# aem - Adobe Experience Manager
35+
[![Puppet Forge Version](https://img.shields.io/puppetforge/v/bstopp/aem.svg)](https://forge.puppetlabs.com/bstopp/aem)
36+
[![Puppet Forge Downloads](https://img.shields.io/puppetforge/dt/bstopp/aem.svg)](https://forge.puppetlabs.com/bstopp/aem)
3437
[![Build Status](https://travis-ci.org/bstopp/puppet-aem.svg?branch=master)](https://travis-ci.org/bstopp/puppet-aem)
3538
[![Dependency Status](https://gemnasium.com/bstopp/puppet-aem.svg)](https://gemnasium.com/bstopp/puppet-aem)
3639
[![Code Climate](https://codeclimate.com/github/bstopp/puppet-aem/badges/gpa.svg)](https://codeclimate.com/github/bstopp/puppet-aem)
3740
[![Test Coverage](https://codeclimate.com/github/bstopp/puppet-aem/badges/coverage.svg)](https://codeclimate.com/github/bstopp/puppet-aem/coverage)
38-
39-
# aem - Adobe Experience Manager
41+
[![Join the chat at https://gitter.im/bstopp/puppet-aem](https://badges.gitter.im/bstopp/puppet-aem.svg)](https://gitter.im/bstopp/puppet-aem?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4042

4143
#### Table of Contents
4244

4345
1. [Module Description - What does the module do?][Module Description]
4446
1. [Setup - The basics of getting started with AEM module][Setup]
45-
* [Setup Requirements][]
46-
* [Beginning with AEM][]
47+
* [Setup Requirements][]
48+
* [Beginning with AEM][]
4749
1. [Reference - AEM Module type and providers][Reference]
48-
* [Public Defines][]
49-
* [Private Defines][]
50-
* [Private Types][]
50+
* [Public Defines][]
51+
* [Private Defines][]
52+
* [Private Types][]
5153
1. [Limitations - OS compatibility, etc.][Limitations]
5254
1. [Development - Contributing to the module][Development]
5355

@@ -92,7 +94,8 @@ For more options and detailed explanations, please see the [Puppet AEM Wiki][wik
9294
- [Define: aem::package](#define-aempackage)
9395
- [Define: aem::config](#define-aemconfig)
9496
- **[Private Types][]**
95-
- [Type: aem::Aem_Installer](#type-aemaem_installer)
97+
- [Type: Aem_Installer](#type-aem_installer)
98+
- [Type: Aem_Osgi_Config](#type-aem_osgi_config)
9699

97100
### Public Defines
98101

@@ -116,10 +119,10 @@ See [Beginning with AEM][] for the minimum configuration required to create an A
116119
Namevar. Required. Specifies the name of the AEM instance.
117120

118121
##### `ensure`
119-
Optional. Changes the state of the AEM instance. Valid values are `present` or `absent`. Default: `present`.
122+
Optional. Changes the state of the AEM instance. Valid options: `present` or `absent`. Default: `present`.
120123

121124
##### `context_root`
122-
Optional. Specifies the URL context root for the AEM application. [Sling documentation][Sling launchpad]. Defaults to `/`.
125+
Optional. Specifies the URL context root for the AEM application. [Sling documentation][Sling launchpad]. Valid options: any valid URI path. Defaults to `/`.
123126

124127
##### `debug_port`
125128
Optional. Specifies the port on which to listen for remote debugging connections. Setting this will add the following JVM options: `-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=<<port>>` Valid options: any port number.
@@ -145,6 +148,9 @@ Optional. Sets whether or not this instance will manage the defined home directo
145148
##### `manage_user`
146149
Optional. Sets whether or not this instance will manage the defined user. Valid options: `true` or `false`. Default: `true`.
147150

151+
##### `osgi_configs`
152+
Optional. Creates *file* type definitions of `aem::osgi::config` which will be applied prior to inital AEM start. Valid options: Hash or Array of Hash configurations.
153+
148154
##### `port`
149155
Optional. Specifies the port on which AEM will listen. Valid options: any valid port. Default: 4502. [Sling documentation][Sling command-line-options]
150156

@@ -177,7 +183,7 @@ Optional. Specifies the AEM installation type. Valid options: `author` or `publi
177183
Optional. Sets the user for installation. Valid options: any valid user. Default: `aem`.
178184

179185
##### `version`
180-
Optional. Sets the version of AEM. Informational only, does not affect installation or resource management. Valid options: any semantic version.
186+
Optional. Sets the version of AEM. Informational only, does not affect installation or resource management. Valid options: any semantic version.
181187

182188
#### Define: `aem::license`
183189

@@ -189,16 +195,16 @@ Manages an AEM License file. Provides a convenient tool for managing the license
189195
Namevar. Required. Specifies the name of the AEM license.
190196

191197
##### `ensure`
192-
Optional. Changes the state of the AEM license. Valid values are `present` or `absent`. Default: `present`.
198+
Optional. Changes the state of the AEM license. Valid options: `present` or `absent`. Default: `present`.
193199

194200
##### `customer`
195-
Optional. Specifies the customer name for the license file.
201+
Optional. Specifies the customer name for the license file. Valid options: any string
196202

197203
##### `group`
198204
Optional. Sets the group for file ownership. Valid options: any valid group. Default: `aem`.
199205

200206
##### `home`
201-
Required. Sets the directory in which the license will be placed. Valid options: Any absolute path.
207+
Required. Sets the directory in which the license will be placed. Valid options: any absolute path.
202208

203209
##### `license_key`
204210
Required. Sets the license key for AEM. Valid options: any string.
@@ -228,7 +234,7 @@ Optional. Sets the group for file ownership. Valid options: any valid group. Def
228234
Required. Sets the directory in which the AEM instance exists, necessary for service configuration definition. Valid options: Any absolute system path.
229235

230236
##### `status`
231-
Optional. Changes the state of the service on the system, defining whether or not the service starts at system boot and/or is currently running. Valid values are:
237+
Optional. Changes the state of the service on the system, defining whether or not the service starts at system boot and/or is currently running. Valid options:
232238
* `enabled`: Start at boot & currently running (**Default**)
233239
* `disabled`: Not started at boot & not currently running.
234240
* `running`: Not started at boot but is currently running.
@@ -237,6 +243,42 @@ Optional. Changes the state of the service on the system, defining whether or no
237243
##### `user`
238244
Optional. Sets the user for for file ownership. Valid options: any valid user. Default: `aem`.
239245

246+
#### Define: `aem::osgi::config`
247+
248+
Manages an AEM OSGi Configuration; allows for saving Service/Component configurations via a file or posted to the Felix Web Console.
249+
250+
** Parameters within `aem::osgi::config`:**
251+
252+
##### `name`
253+
Namevar. Required. Specifies the name of the AEM OSGi Configuration. This should be the Service PID. [Apache Felix Documentation][Felix Configuration]
254+
255+
##### `ensure`
256+
Optional. Changes the state of the AEM OSGi configuration. A value of `absent` will delete the configuration. Valid options: `present` or `absent`. Default: `present`.
257+
258+
##### `group`
259+
Optional. Sets the group for file ownership. Valid options: any valid group. Default: `aem`.
260+
261+
##### `handle_missing`
262+
Required if **type** == `console`. Determine how to handle properties which are configured in the console, but not provided. See [wiki][wiki] for examples. Valid options: `merge` or `remove`.
263+
264+
##### `home`
265+
Required. Sets the directory in which AEM exists. Valid options: Any absolute path.
266+
267+
##### `password`
268+
Required if **type** == `console`. Sets the password of the OSGI console user. Valid options: any valid password.
269+
270+
##### `properties`
271+
Required. Sets the configuration properties to persist. Valid options: a hash of values.
272+
273+
##### `type`
274+
Required. Sets the means by which to persist the configuration. Valid options: `console` or `file`. `console` will use API calls to the OSGi Web Console. `file` will persist to a properties file in the *crx-quickstart/install* folder.
275+
276+
##### `user`
277+
Optional. Sets the user for for file ownership. Valid options: any valid user. Default: `aem`.
278+
279+
##### `username`
280+
Required if **type** == `console`. Sets the user for accessing the OSGI console. Valid options: any valid user.
281+
240282
### Private Defines
241283

242284
#### Define: `aem::package`
@@ -245,19 +287,25 @@ This define unpacks the AEM Quickstart jar for prepartion to configure.
245287
#### Define: `aem::config`
246288
This define sets up the start templates to ensure the AEM instance executes with the correct state.
247289

290+
#### Define: `aem::osgi::config::file`
291+
This define is used to manage OSGi Configurations which are of type `file`.
292+
248293
### Private Types
249294

250-
#### Type: `aem::aem_installer`
295+
#### Type: `aem_installer`
251296
This custom type starts the AEM instance to create the base repository, monitors for it's initalization, then shuts the system down.
252297

298+
#### Type: `aem_osgi_config`
299+
This custom type manages OSGi Configurations which are of type `console`.
300+
253301
## Limitations
254302

255303
### OS Compatibility
256304

257305
This module has been tested on:
258306

259307
- CentOS 7, 7.2
260-
- Ubuntu 12.04, 14.04
308+
- Ubuntu 12.04*, 14.04
261309
- Debian 7.8*, 8.2
262310

263311
*See [Known Issues][]*
@@ -269,6 +317,10 @@ This module has been tested with the following AEM versions:
269317
- 6.0
270318
- 6.1
271319

320+
### Minimum Ruby Requirement
321+
322+
Using the OSGi Configuration options require a Minimum ruby version of 1.9.x.
323+
272324
### Warnings
273325

274326
It is up to the consumer to ensure that the correct version of Java is installed based on the AEM version. See [AEM Documentation][AEM Java Requirements] for compatibility.
@@ -277,6 +329,8 @@ Defining an AEM resource as absent will remove the instance from the system, reg
277329

278330
### Known Issues
279331

332+
Ubuntu 12.04 ships with Ruby 1.8.x; therefore the OSGi configurations acceptance tests fail.
333+
280334
There is an oddity with the `aem::service` support on Debian: even though specifying a valid status sends the correct parameters to the underlying service resource, the service is not enabled, nor do state changes occur correctly. Acceptance tests on those Virtual Machines fail for issues with service management. See [issue #36](https://github.com/bstopp/puppet-aem/issues/36).
281335

282336
## Development

Rakefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ task :default => [:spec, :lint, :rubocop]
1111
PuppetLint.configuration.fail_on_warnings = true
1212
PuppetLint.configuration.send('relative')
1313
PuppetLint.configuration.send('disable_80chars')
14-
PuppetLint.configuration.send('disable_documentation')
15-
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
14+
#PuppetLint.configuration.send('disable_documentation')
15+
PuppetLint.configuration.send('disable_variable_scope')
16+
#PuppetLint.configuration.send('disable_single_quote_string_with_variables')
1617

1718
PuppetLint.configuration.ignore_paths = exclude_paths
1819
PuppetSyntax.exclude_paths = exclude_paths

0 commit comments

Comments
 (0)