Professional Documents
Culture Documents
Martin Wehner
https://www.pro-vision.de
2
The Challenges
3
Challenges
▪ Make it easy:
▪ For teams to maintain internal & customer systems
▪ To recreate systems quickly and reliably
▪ Just update the CONGA config and have it deployed
automatically
▪ You shouldn’t need to touch the automation at all
▪ Plug the deployment hole in CONGA
5
CONGA
6
What is CONGA?
▪ Configuration generator
▪ Many AEM/OSGi specific features
▪ Separation of configuration & environment
▪ Maven integration
▪ Extensible with plugins
▪ Comes with generic set of AEM roles
7
CONGA Meta Model
8
Simplified CONGA Model
Environment QS Configuration
Apache
Apache
+ =
CONGA Definitions
AEM
QS AEM
Role Tomcat
Tomcat
definitions
Environment PROD
File Configuration
templates
+ PROD = Apache
AEM
Apache
AEM
Tomcat
Apache
Tomcat
AEM
Tomcat
Apache Tomcat
9
CONGA Output Options
10
CONGA Output Options
11
CONGA Role File Definition
- file: wcm-io-samples-aem-cms-config.provisioning
dir: packages
template: wcm-io-samples-aem-cms-config.provisioning.hbs
postProcessors:
- aem-contentpackage-osgiconfig
postProcessorOptions:
contentPackage:
name: wcm-io-samples-aem-cms-config
rootPath: /apps/wcm-io-samples-aem-cms-config/config
filters:
- filter: /apps/wcm-io-samples-aem-cms-config
12
CONGA Environment
nodes:
- node: aem-author
roles:
- role: aem-cms
variants:
- aem-author
config:
jvm.heapspace.max: 2048m
quickstart.rootPath: /opt/adobe/aem
quickstart.port: 4502
13
But..
14
Ansible
15
What is Ansible?
---
- hosts: webservers
roles:
- common
- aem
- tasks:
- copy:
src: start
dest: "{{ aem_home }}/crx-quickstart/bin"
17
So to sum it up..
18
+ Integration
19
The Approach
20
The Approach
21
Best of Both Worlds
22
Implementation
23
CONGA Facts in Ansible
- name: Create cache root directory.
file:
path: "{{ conga_config.dispatcher.cacheRootPath }}"
state: directory
24
CONGA Facts in Ansible
- name: Create cache root directory.
file:
path: "{{ conga_config.dispatcher.cacheRootPath }}"
state: directory
25
Basic Steps
Compile CONGA
Apply Ansible Roles
configuration
26
Hosts Interaction
Nexus Configure
CONGA
Control Host OS, Java & AEM AEM 1
Artifacts
AEM Packages
Install
AEM Packages
GitHub Ansible Roles AEM 2
Config Repo
Configure
Repos OS & Apache
Apache
RPM/APT
27
Basic Integration Playbook
- hosts: localhost
roles:
- { role: conga-maven,
conga_maven_git_repo: "https://github.com/wcm-io/wcm-io-samples.git" }
- hosts: aem
pre_tasks:
- conga_facts:
conga_role_mapping: aem-cms
roles:
- { role: aem-cms, aem_home: "{{ conga_config.quickstart.rootPath }}" }
- conga-aem-cms
28
Basic Integration Playbook
- hosts: localhost
roles:
- { role: conga-maven,
conga_maven_git_repo: "https://github.com/wcm-io/wcm-io-samples.git" }
- hosts: aem
pre_tasks:
- conga_facts:
conga_role_mapping: aem-cms
roles:
- { role: aem-cms, aem_home: "{{ conga_config.quickstart.rootPath }}" }
- conga-aem-cms
- conga-your-project
29
Main Ansible Roles
30
conga-facts
32
conga-files
33
conga-aem-package
34
aem-cms
35
aem-dispatcher
36
Other roles
Role Purpose
aem-service Controls AEM startup and shutdown
conga-aem-cms Deploys CONGA role aem-cms
conga-aem-dispatcher-(common) Deploys CONGA roles aem-dispatcher-*
37
Implementation Challenges
38
Integration Challenges
39
AEM Challenges
40
Current State
41
Status
▪ Published on GitHub
▪ Controls deployment of adaptTo() and
pro!vision corporate websites
▪ Integrated in CI
▪ Used in multiple customer projects
42
Distribution Support
▪ Works on:
▪ CentOS/RHEL
▪ Ubuntu
▪ Debian
▪ Doesn’t do Windows
▪ Additional distributions added as required
43
Next Steps
44
Improvements
45
Resources
https://www.ansible.com/
http://devops.wcm.io/conga/
https://github.com/wcm-io-devops
https://github.com/adaptto/2017-automate-
aem-deployment-ansible-conga
46
Thank You
47
Advantages
48
Basic Flow
Generate Clone/update
Run CONGA
CONGA configuration
Maven plugin
repository
configuration
49
Demo
50