SlideShare a Scribd company logo
CIRCUIT – An Adobe Developer Event
Presented by ICF Interactive
AEM DevOps –
AEM Infrastructure
Automation with Chef
Cookbooks
Drew Glass
Hero Digital
AEM Practice Lead
•  Director, Engineering and AEM
Practice Lead at Hero Digital
http://herodigital.com/
•  San Francisco AEM
Community Leader
http://www.meetup.com/Adobe-
Experience-Manager-Adobe-
Marketing-Cloud/
•  MS in Computer Science from
University of Illinois Urbana-
Champaign
drew@herodigital.com
@drewglass
https://
www.linkedin.com/in/
drewglass1
Agenda
•  What is DevOps
•  DevOps with Chef
•  AEM Cookbook
•  Deployment Scenarios with Chef
What Is DevOps
•  Use code and automation to increase
collaboration between development and
operations
•  Consistent, testable, repeatable
infrastructure
The Value in DevOps
•  Reduce cost and risk
•  Increase throughput and delivery speed
DevOps with Chef
•  Tool to automate infrastructure
provisioning through code 
•  Thin Domain Specific Language built on
top of Ruby 
•  Provides abstraction for infrastructure 
•  https://www.chef.io/chef/
Chef Basics
•  Develop cookbooks on Chef workstation
using ChefDK
•  Knife Cookbooks and Policies to Chef
Server
•  Chef client provisions nodes using
cookbooks and policies and records that
information on Chef Server
Chef Basics Illustrated
Chef	
  Server	
  
Nodes,	
  cookbooks,	
  
policies	
  
Worksta/on	
  	
  
ChefDK,	
  Knife,	
  
cookbooks	
  
Node	
  
Chef-­‐client	
  
Node	
  
Chef-­‐client	
  
Node	
  
Chef-­‐client	
  
Chef Workstation
Chef	
  Server	
  
Nodes,	
  cookbooks,	
  
policies	
  
Worksta/on	
  	
  
ChefDK,	
  Knife,	
  
cookbooks	
  
Node	
  
Chef-­‐client	
  
Node	
  
Chef-­‐client	
  
Node	
  
Chef-­‐client	
  
Chef Workstation
•  Develop cookbooks and policies
•  Store cookbooks in chef-repo which is synced
with version control
•  ChefDK - development kit which includes Kitchen,
ChefSpec, Berkshelf
https://downloads.chef.io/chef-dk/ 
•  Knife – used to upload items such as cookbooks
to Chef server and interact with nodes
•  Kitchen - test cookbooks across different
platforms
•  ChefSpec - simulate convergence of resources on
a node
•  Berkshelf - manage cookbook dependencies
Cookbooks
•  Fundamental unit of configuration
•  Contains attributes, recipes, templates,
files, providers, and resources
•  Kinds of cookbooks: base and wrapper
AEM Community Base Cookbook
h6ps://github.com/tacitknowledge/aem-­‐cookbook	
  	
  
AEM Community Base Cookbook
AEM Wrapper Cookbook
•  Depends on base cookbook
•  Overrides base attributes and may include
new recipes, files, providers and templates
Example	
  metadata.rb	
  
Attributes in a Cookbook
•  Configuration data
•  Defined in a cookbook and can override
attributes on a node
•  When chef-client is run, attributes in
cookbook are compared against attributes
on node
•  Attributes in default.rb are loaded first
Attributes in the AEM Cookbook
default[:aem][:version] = nil
default[:aem][:jvm_opts] = {}
default[:aem][:jar_opts] = []
default[:aem][:enable_webdav] = false
default[:aem][:jar_name] = nil
default[:aem][:use_yum] = false
default[:aem][:download_url] = nil
default[:aem][:license_url] = nil
default[:aem][:base_dir] = "/opt/aem"
default[:aem][:cluster_name] = nil
default[:aem][:author] = {
:default_context => "/opt/aem/
author",
:port => "4502",
:runnable_jar => "aem-author-
p4502.jar",
:base_dir => "/opt/aem/author/crx-
quickstart",
:jvm_opts => {},
:ldap => {
:enabled => false,
:options => {}
},
:validation_urls => [
"http://localhost:4502/libs/cq/
core/content/login.html",
"http://localhost:4502/
damadmin",
"http://localhost:4502/
miscadmin",
"http://localhost:4502/system/
console/bundles"
],
:deploy_pkgs => [],
#You changed these, right?
:admin_user => "admin",
:admin_password => "admin",
:new_admin_password => nil,
:replication_hosts => [],
:find_replication_hosts_dynamical
ly => false
}
default[:aem][:author][:startup]
[:max_attempts] = 20
default[:aem][:author][:startup]
[:wait_between_attempts] = 30
Attributes in the AEM Cookbook
Recipes in a Cookbook
•  Fundamental configuration element 
•  Authored with Ruby and used to define
everything to configure part of system
•  Executed in order specified in run list
•  In AEM, we have recipes for author,
publish and dispatcher
Author Recipe in the AEM Cookbook
Author Recipe in an AEM Cookbook
Files and Templates in Cookbooks
•  Templates - file written in markup
language to solve a more complex
configuration scenario
•  Files - can be transferred from cookbooks
to nodes
Dispatcher Attributes
Dispatcher Template in the AEM Cookbook
Dispatcher Template in the AEM Cookbook
Resources and Providers
•  Resources - package, service, etc. that
tells chef-client which provider to use
during a during a chef client run for
various tasks
•  Provider  - defines steps to bring part of
system into desired state
Author Recipe Calls Init Provider
Init Script Provider in the AEM Cookbook
Author Recipe Calls Replication Agent Provider
Replication Agent Provider in the AEM Cookbook
Chef Server
Chef	
  Server	
  
Nodes,	
  cookbooks,	
  
policies	
  
Worksta/on	
  	
  
ChefDK,	
  Knife,	
  
cookbooks	
  
Node	
  
Chef-­‐client	
  
Node	
  
Chef-­‐client	
  
Node	
  
Chef-­‐client	
  
Chef Server
•  Hub of configuration data
•  Stores cookbooks, node information and
policies
•  Chef-client running on nodes queries Chef
server for configuration information like
recipes 
•  Chef-client does the actual configuration
on the node
•  Allows for distribution of work
•  Also includes search
Chef-client
Chef	
  Server	
  
Nodes,	
  cookbooks,	
  
policies	
  
Worksta/on	
  	
  
ChefDK,	
  Knife,	
  
cookbooks	
  
Node	
  
Chef-­‐client	
  
Node	
  
Chef-­‐client	
  
Node	
  
Chef-­‐client	
  
Chef-client
•  Agent that runs on a node managed by Chef
•  Chef-client is run to bring a node into a
desired state
•  Typical chef-client run:
–  register and authenticate node with Chef server
(RSA public key-pairs)
–  builds the node object
–  synchronizes cookbooks
–  compiles resource collection by loading required
cookbooks (recipes, attributes, and all other
dependencies)
–  provisions node
Chef-client Run for Author Node in Dev Environment
Node
•  Physical, virtual or cloud machine that is
configured and maintained by chef-client
•  Physical nodes are typically a server or
virtual machine that has to have a network
interface for chef-client to communicate
with Chef server
•  Cloud node could be Amazon EC2,
Google Compute Engine, Backspace, etc.
•  Chef-client can be used to deploy,
configure and maintain
Nodes in AEM
AEM	
  
Author	
  
AEM	
  
Publish	
  
Apache	
  
with	
  
Dispatcher	
  
Node Objects
• 
 Attributes – configuration data for a node
– Describe the current state of a node
– Can be defined by: cookbooks, roles,
environments
•  Run List - ordered list of roles and/or
recipes that defines all of the information
Chef needs to configure a node to a
certain state
Runlist in AEM
Policy
•  Map business and operational
requirements to settings and objects on
Chef server 
•  Roles - define server types
– A role has zero or more attributes and  a run
list
•  Environments
– Define attributes for environments -
Integration, QA, Staging, Production
Roles in AEM
Environments in AEM
Deployment Scenarios
•  AEM sandbox using Vagrant, Chef and
Berkshelf
•  Local AEM development environment
using a AEM site wrapper cookbook
•  AEM demo environment in the cloud using
Chef and Kitchen
•  Continuous delivery pipeline with Chef and
Chef provisioning
Worksta/on	
  
Local Dev VM or Cloud Instance
VM	
  or	
  Cloud	
  Instance	
  
Vagrant	
  
or	
  	
  
Kitchen	
  	
  
Cookbooks	
  and	
  
Berkshelf	
  
Chef-­‐solo	
  
AEM	
  
Author	
  
AEM	
  
Publish	
  
Dispatcher	
  
Vagrant and Chef Demo
AEM Environment with Chef
Chef	
  
Server	
  
with	
  Nodes,	
  
Cookbooks,	
  
and	
  Policies	
  
Node	
  
AEM	
  
Author	
  
Chef-­‐	
  
client	
  
Node	
  
AEM	
  
Publish	
  
Chef-­‐
client	
  
Node	
  
Dispat-­‐
cher	
  
Chef-­‐
client	
  
Chef Provisioning
•  Allows clusters to be managed with chef-
client and Chef server using recipes
•  Collection of resources to enable creation
of machines using chef-client
•  Bootstrap operations that are done
against an infrastructure like VirtualBox,
Amazon EC2, Docker, etc. using drivers
•  Machines – Chef provisioning runs
multiple machine processes in-parallel in
most situations
Scaling with Chef Provisioning
Chef	
  
Server	
  
with	
  Nodes,	
  
Cookbooks,	
  
and	
  Policies	
  
Node	
  
AEM	
  
Author	
  
Chef-­‐	
  
client	
  
Dispatcher	
  
Node	
  
Publish	
  	
  
Node	
  
Dispatcher	
  
Node	
  
Publish	
  	
  
Node	
  
Scaling with Chef Provisioning
Chef	
  
Server	
  
with	
  Nodes,	
  
Cookbooks,	
  
and	
  Policies	
  
Node	
  
AEM	
  
Author	
  
Chef-­‐	
  
client	
  
Dispatcher	
  
Node	
  
Publish	
  	
  
Node	
  
Dispatcher	
  
Node	
  
Publish	
  	
  
Node	
  
Dispatcher	
  
Node	
  
Publish	
  	
  
Node	
  
Dispatcher	
  
Node	
  
Publish	
  	
  
Node	
  
Wrapping Up
•  Infrastructure as code
•  AEM DevOps with Chef
•  Deploying AEM with Chef
Q & A
Send any questions to drew@herodigital.com

More Related Content

What's hot (20)

PPTX
Opscode Webinar: Managing Your VMware Infrastructure with Chef
Chef Software, Inc.
 
PDF
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Software, Inc.
 
PPTX
AEM (CQ) Dispatcher Security and CDN+Browser Caching
Andrew Khoury
 
PDF
Community Cookbooks & further resources - Fundamentals Webinar Series Part 6
Chef
 
PDF
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Software, Inc.
 
PDF
Learning chef
Jonathan Carrillo
 
PDF
Aem maintenance
Ashokkumar T A
 
PDF
Aem offline content
Ashokkumar T A
 
PPTX
AEM (CQ) Dispatcher Caching Webinar 2013
Andrew Khoury
 
PDF
Apache Jackrabbit Oak on MongoDB
MongoDB
 
PDF
Overview of Chef - Fundamentals Webinar Series Part 1
Chef
 
PPT
Overview of chef ( Infrastructure as a Code )
Pravin Mishra
 
PPTX
Chef introduction
FENG Zhichao
 
KEY
How Flipkart scales PHP
Siddhartha Reddy Kothakapu
 
PDF
The unintended benefits of Chef
Chef Software, Inc.
 
PDF
Automated Deployment and Configuration Engines. Ansible
Alberto Molina Coballes
 
PPTX
AWS Meetup - Sydney - February
markghiasy
 
PPTX
The new repository in AEM 6
Jukka Zitting
 
PDF
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Edureka!
 
PPT
Chef, Devops, and You
Bryan Berry
 
Opscode Webinar: Managing Your VMware Infrastructure with Chef
Chef Software, Inc.
 
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Software, Inc.
 
AEM (CQ) Dispatcher Security and CDN+Browser Caching
Andrew Khoury
 
Community Cookbooks & further resources - Fundamentals Webinar Series Part 6
Chef
 
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Software, Inc.
 
Learning chef
Jonathan Carrillo
 
Aem maintenance
Ashokkumar T A
 
Aem offline content
Ashokkumar T A
 
AEM (CQ) Dispatcher Caching Webinar 2013
Andrew Khoury
 
Apache Jackrabbit Oak on MongoDB
MongoDB
 
Overview of Chef - Fundamentals Webinar Series Part 1
Chef
 
Overview of chef ( Infrastructure as a Code )
Pravin Mishra
 
Chef introduction
FENG Zhichao
 
How Flipkart scales PHP
Siddhartha Reddy Kothakapu
 
The unintended benefits of Chef
Chef Software, Inc.
 
Automated Deployment and Configuration Engines. Ansible
Alberto Molina Coballes
 
AWS Meetup - Sydney - February
markghiasy
 
The new repository in AEM 6
Jukka Zitting
 
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Edureka!
 
Chef, Devops, and You
Bryan Berry
 

Viewers also liked (18)

PDF
AEM Best Practices for Component Development
Gabriel Walt
 
PPTX
Chef for DevOps - an Introduction
Sanjeev Sharma
 
PDF
(Re)discover your AEM
Jakub Wadolowski
 
PDF
Aem authentication vs idp
Saroj Mishra
 
PPTX
AEM - Client Libraries
Prabhdeep Singh
 
PDF
AEM Client Context Customisation
Ankit Gubrani
 
ODP
It Works On My Machine: Vagrant for Software Development
Carlos Perez
 
PDF
EC2 AMI Factory with Chef, Berkshelf, and Packer
George Miranda
 
PPTX
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
Sonatype
 
PDF
Chef: Smart infrastructure automation
Johannes H. P. Skov Frandsen
 
PDF
CIRCUIT 2015 - Content API's For AEM Sites
ICF CIRCUIT
 
PDF
Three WEM Dev Tricks
Gabriel Walt
 
PPTX
Web Apps atop a Content Repository
Gabriel Walt
 
PPTX
When dispatcher caching is not enough...
Jakub Wadolowski
 
PPTX
AEM 6.0 Touch-optimized UI
Gilles Knobloch
 
PDF
CIRCUIT 2015 - Responsive Websites & Grid-Based Layouts
ICF CIRCUIT
 
PDF
Cqcon
Antonio Sanso
 
PDF
Introducing Apache Jackrabbit OAK
Yash Mody
 
AEM Best Practices for Component Development
Gabriel Walt
 
Chef for DevOps - an Introduction
Sanjeev Sharma
 
(Re)discover your AEM
Jakub Wadolowski
 
Aem authentication vs idp
Saroj Mishra
 
AEM - Client Libraries
Prabhdeep Singh
 
AEM Client Context Customisation
Ankit Gubrani
 
It Works On My Machine: Vagrant for Software Development
Carlos Perez
 
EC2 AMI Factory with Chef, Berkshelf, and Packer
George Miranda
 
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
Sonatype
 
Chef: Smart infrastructure automation
Johannes H. P. Skov Frandsen
 
CIRCUIT 2015 - Content API's For AEM Sites
ICF CIRCUIT
 
Three WEM Dev Tricks
Gabriel Walt
 
Web Apps atop a Content Repository
Gabriel Walt
 
When dispatcher caching is not enough...
Jakub Wadolowski
 
AEM 6.0 Touch-optimized UI
Gilles Knobloch
 
CIRCUIT 2015 - Responsive Websites & Grid-Based Layouts
ICF CIRCUIT
 
Introducing Apache Jackrabbit OAK
Yash Mody
 
Ad

Similar to CIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks (20)

PDF
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
Josh Padnick
 
PPTX
Opscode Chef for Dummies
dilippanwar
 
PPTX
Chef fundamentals
Ygor Nascimento
 
PDF
Introduction to Cooking with Chef
John Osborne
 
PDF
Introduction to Chef
Pubudu Suharshan Perera
 
PDF
Automating your infrastructure with Chef
John Ewart
 
PDF
Chef
Adrian Moisey
 
KEY
Using Nagios with Chef
Bryan McLellan
 
ODP
DevOps and Chef improve your life
Juan Vicente Herrera Ruiz de Alejo
 
PDF
2016-02-09 - Breakfast Seminar - Redpill Linpro - Chef at Aptoma - Håkon Drange
Håkon Eriksen Drange
 
PDF
Let's Code our Infrastructure!
continuousphp
 
PDF
DOO-009_Powering High Velocity Development for your Infrastructure
decode2016
 
PDF
Chef
Will Sterling
 
PPTX
Chef for Openstack
Mohit Sethi
 
PDF
2015 08-11-scdo-meetup
Suresh Paulraj
 
PDF
Chef for openstack
openstackindia
 
ODP
Configuration management with Chef
Juan Vicente Herrera Ruiz de Alejo
 
PDF
What is Chef and how we use it at tripsta
Giedrius Rimkus
 
PDF
CHEF - by Scott Russel
Kangaroot
 
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
Josh Padnick
 
Opscode Chef for Dummies
dilippanwar
 
Chef fundamentals
Ygor Nascimento
 
Introduction to Cooking with Chef
John Osborne
 
Introduction to Chef
Pubudu Suharshan Perera
 
Automating your infrastructure with Chef
John Ewart
 
Using Nagios with Chef
Bryan McLellan
 
DevOps and Chef improve your life
Juan Vicente Herrera Ruiz de Alejo
 
2016-02-09 - Breakfast Seminar - Redpill Linpro - Chef at Aptoma - Håkon Drange
Håkon Eriksen Drange
 
Let's Code our Infrastructure!
continuousphp
 
DOO-009_Powering High Velocity Development for your Infrastructure
decode2016
 
Chef for Openstack
Mohit Sethi
 
2015 08-11-scdo-meetup
Suresh Paulraj
 
Chef for openstack
openstackindia
 
Configuration management with Chef
Juan Vicente Herrera Ruiz de Alejo
 
What is Chef and how we use it at tripsta
Giedrius Rimkus
 
CHEF - by Scott Russel
Kangaroot
 
Ad

More from ICF CIRCUIT (10)

PDF
CIRCUIT 2015 - Hybrid App Development with AEM Apps
ICF CIRCUIT
 
PDF
CIRCUIT 2015 - Akamai: Caching and Beyond
ICF CIRCUIT
 
PDF
CIRCUIT 2015 - Free Beer and Testing
ICF CIRCUIT
 
PDF
CIRCUIT 2015 - UI Customization in AEM 6.1
ICF CIRCUIT
 
PDF
CIRCUIT 2015 - Glimpse of perceptual diff
ICF CIRCUIT
 
PDF
CIRCUIT 2015 - Orchestrate your story with interactive video and web content
ICF CIRCUIT
 
PDF
How to migrate from any CMS (thru the front-door)
ICF CIRCUIT
 
PDF
Maximize the power of OSGi in AEM
ICF CIRCUIT
 
PDF
CIRCUIT 2015 - 10 Things Apache Sling Can Do
ICF CIRCUIT
 
PDF
Circuit 2015 Keynote - Carsten Ziegeler
ICF CIRCUIT
 
CIRCUIT 2015 - Hybrid App Development with AEM Apps
ICF CIRCUIT
 
CIRCUIT 2015 - Akamai: Caching and Beyond
ICF CIRCUIT
 
CIRCUIT 2015 - Free Beer and Testing
ICF CIRCUIT
 
CIRCUIT 2015 - UI Customization in AEM 6.1
ICF CIRCUIT
 
CIRCUIT 2015 - Glimpse of perceptual diff
ICF CIRCUIT
 
CIRCUIT 2015 - Orchestrate your story with interactive video and web content
ICF CIRCUIT
 
How to migrate from any CMS (thru the front-door)
ICF CIRCUIT
 
Maximize the power of OSGi in AEM
ICF CIRCUIT
 
CIRCUIT 2015 - 10 Things Apache Sling Can Do
ICF CIRCUIT
 
Circuit 2015 Keynote - Carsten Ziegeler
ICF CIRCUIT
 

Recently uploaded (20)

PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
Software Development Company Keene Systems, Inc (1).pdf
Custom Software Development Company | Keene Systems, Inc.
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PPTX
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
Bitkom eIDAS Summit | European Business Wallet: Use Cases, Macroeconomics, an...
Carsten Stoecker
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PDF
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
PPTX
CapCut Pro PC Crack Latest Version Free Free
josanj305
 
PDF
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pdf
ghjghvhjgc
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PDF
Home Cleaning App Development Services.pdf
V3cube
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
Next Generation AI: Anticipatory Intelligence, Forecasting Inflection Points ...
dleka294658677
 
PDF
NASA A Researcher’s Guide to International Space Station : Earth Observations
Dr. PANKAJ DHUSSA
 
PPTX
Essential Content-centric Plugins for your Website
Laura Byrne
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Software Development Company Keene Systems, Inc (1).pdf
Custom Software Development Company | Keene Systems, Inc.
 
Digital Circuits, important subject in CS
contactparinay1
 
Agentforce World Tour Toronto '25 - MCP with MuleSoft
Alexandra N. Martinez
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
Bitkom eIDAS Summit | European Business Wallet: Use Cases, Macroeconomics, an...
Carsten Stoecker
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
ICONIQ State of AI Report 2025 - The Builder's Playbook
Razin Mustafiz
 
CapCut Pro PC Crack Latest Version Free Free
josanj305
 
Bharatiya Antariksh Hackathon 2025 Idea Submission PPT.pdf
ghjghvhjgc
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Home Cleaning App Development Services.pdf
V3cube
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Next Generation AI: Anticipatory Intelligence, Forecasting Inflection Points ...
dleka294658677
 
NASA A Researcher’s Guide to International Space Station : Earth Observations
Dr. PANKAJ DHUSSA
 
Essential Content-centric Plugins for your Website
Laura Byrne
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
🚀 Let’s Build Our First Slack Workflow! 🔧.pdf
SanjeetMishra29
 

CIRCUIT 2015 - AEM Infrastructure Automation with Chef Cookbooks

  • 1. CIRCUIT – An Adobe Developer Event Presented by ICF Interactive AEM DevOps – AEM Infrastructure Automation with Chef Cookbooks Drew Glass Hero Digital AEM Practice Lead
  • 2. •  Director, Engineering and AEM Practice Lead at Hero Digital http://herodigital.com/ •  San Francisco AEM Community Leader http://www.meetup.com/Adobe- Experience-Manager-Adobe- Marketing-Cloud/ •  MS in Computer Science from University of Illinois Urbana- Champaign [email protected] @drewglass https:// www.linkedin.com/in/ drewglass1
  • 3. Agenda •  What is DevOps •  DevOps with Chef •  AEM Cookbook •  Deployment Scenarios with Chef
  • 4. What Is DevOps •  Use code and automation to increase collaboration between development and operations •  Consistent, testable, repeatable infrastructure
  • 5. The Value in DevOps •  Reduce cost and risk •  Increase throughput and delivery speed
  • 6. DevOps with Chef •  Tool to automate infrastructure provisioning through code •  Thin Domain Specific Language built on top of Ruby •  Provides abstraction for infrastructure •  https://www.chef.io/chef/
  • 7. Chef Basics •  Develop cookbooks on Chef workstation using ChefDK •  Knife Cookbooks and Policies to Chef Server •  Chef client provisions nodes using cookbooks and policies and records that information on Chef Server
  • 8. Chef Basics Illustrated Chef  Server   Nodes,  cookbooks,   policies   Worksta/on     ChefDK,  Knife,   cookbooks   Node   Chef-­‐client   Node   Chef-­‐client   Node   Chef-­‐client  
  • 9. Chef Workstation Chef  Server   Nodes,  cookbooks,   policies   Worksta/on     ChefDK,  Knife,   cookbooks   Node   Chef-­‐client   Node   Chef-­‐client   Node   Chef-­‐client  
  • 10. Chef Workstation •  Develop cookbooks and policies •  Store cookbooks in chef-repo which is synced with version control •  ChefDK - development kit which includes Kitchen, ChefSpec, Berkshelf https://downloads.chef.io/chef-dk/ •  Knife – used to upload items such as cookbooks to Chef server and interact with nodes •  Kitchen - test cookbooks across different platforms •  ChefSpec - simulate convergence of resources on a node •  Berkshelf - manage cookbook dependencies
  • 11. Cookbooks •  Fundamental unit of configuration •  Contains attributes, recipes, templates, files, providers, and resources •  Kinds of cookbooks: base and wrapper
  • 12. AEM Community Base Cookbook h6ps://github.com/tacitknowledge/aem-­‐cookbook    
  • 13. AEM Community Base Cookbook
  • 14. AEM Wrapper Cookbook •  Depends on base cookbook •  Overrides base attributes and may include new recipes, files, providers and templates Example  metadata.rb  
  • 15. Attributes in a Cookbook •  Configuration data •  Defined in a cookbook and can override attributes on a node •  When chef-client is run, attributes in cookbook are compared against attributes on node •  Attributes in default.rb are loaded first
  • 16. Attributes in the AEM Cookbook default[:aem][:version] = nil default[:aem][:jvm_opts] = {} default[:aem][:jar_opts] = [] default[:aem][:enable_webdav] = false default[:aem][:jar_name] = nil default[:aem][:use_yum] = false default[:aem][:download_url] = nil default[:aem][:license_url] = nil default[:aem][:base_dir] = "/opt/aem" default[:aem][:cluster_name] = nil default[:aem][:author] = { :default_context => "/opt/aem/ author", :port => "4502", :runnable_jar => "aem-author- p4502.jar", :base_dir => "/opt/aem/author/crx- quickstart", :jvm_opts => {}, :ldap => { :enabled => false, :options => {} }, :validation_urls => [ "http://localhost:4502/libs/cq/ core/content/login.html", "http://localhost:4502/ damadmin", "http://localhost:4502/ miscadmin", "http://localhost:4502/system/ console/bundles" ], :deploy_pkgs => [], #You changed these, right? :admin_user => "admin", :admin_password => "admin", :new_admin_password => nil, :replication_hosts => [], :find_replication_hosts_dynamical ly => false } default[:aem][:author][:startup] [:max_attempts] = 20 default[:aem][:author][:startup] [:wait_between_attempts] = 30
  • 17. Attributes in the AEM Cookbook
  • 18. Recipes in a Cookbook •  Fundamental configuration element  •  Authored with Ruby and used to define everything to configure part of system •  Executed in order specified in run list •  In AEM, we have recipes for author, publish and dispatcher
  • 19. Author Recipe in the AEM Cookbook
  • 20. Author Recipe in an AEM Cookbook
  • 21. Files and Templates in Cookbooks •  Templates - file written in markup language to solve a more complex configuration scenario •  Files - can be transferred from cookbooks to nodes
  • 23. Dispatcher Template in the AEM Cookbook
  • 24. Dispatcher Template in the AEM Cookbook
  • 25. Resources and Providers •  Resources - package, service, etc. that tells chef-client which provider to use during a during a chef client run for various tasks •  Provider  - defines steps to bring part of system into desired state
  • 26. Author Recipe Calls Init Provider
  • 27. Init Script Provider in the AEM Cookbook
  • 28. Author Recipe Calls Replication Agent Provider
  • 29. Replication Agent Provider in the AEM Cookbook
  • 30. Chef Server Chef  Server   Nodes,  cookbooks,   policies   Worksta/on     ChefDK,  Knife,   cookbooks   Node   Chef-­‐client   Node   Chef-­‐client   Node   Chef-­‐client  
  • 31. Chef Server •  Hub of configuration data •  Stores cookbooks, node information and policies •  Chef-client running on nodes queries Chef server for configuration information like recipes •  Chef-client does the actual configuration on the node •  Allows for distribution of work •  Also includes search
  • 32. Chef-client Chef  Server   Nodes,  cookbooks,   policies   Worksta/on     ChefDK,  Knife,   cookbooks   Node   Chef-­‐client   Node   Chef-­‐client   Node   Chef-­‐client  
  • 33. Chef-client •  Agent that runs on a node managed by Chef •  Chef-client is run to bring a node into a desired state •  Typical chef-client run: –  register and authenticate node with Chef server (RSA public key-pairs) –  builds the node object –  synchronizes cookbooks –  compiles resource collection by loading required cookbooks (recipes, attributes, and all other dependencies) –  provisions node
  • 34. Chef-client Run for Author Node in Dev Environment
  • 35. Node •  Physical, virtual or cloud machine that is configured and maintained by chef-client •  Physical nodes are typically a server or virtual machine that has to have a network interface for chef-client to communicate with Chef server •  Cloud node could be Amazon EC2, Google Compute Engine, Backspace, etc. •  Chef-client can be used to deploy, configure and maintain
  • 36. Nodes in AEM AEM   Author   AEM   Publish   Apache   with   Dispatcher  
  • 37. Node Objects •  Attributes – configuration data for a node – Describe the current state of a node – Can be defined by: cookbooks, roles, environments •  Run List - ordered list of roles and/or recipes that defines all of the information Chef needs to configure a node to a certain state
  • 39. Policy •  Map business and operational requirements to settings and objects on Chef server •  Roles - define server types – A role has zero or more attributes and  a run list •  Environments – Define attributes for environments - Integration, QA, Staging, Production
  • 42. Deployment Scenarios •  AEM sandbox using Vagrant, Chef and Berkshelf •  Local AEM development environment using a AEM site wrapper cookbook •  AEM demo environment in the cloud using Chef and Kitchen •  Continuous delivery pipeline with Chef and Chef provisioning
  • 43. Worksta/on   Local Dev VM or Cloud Instance VM  or  Cloud  Instance   Vagrant   or     Kitchen     Cookbooks  and   Berkshelf   Chef-­‐solo   AEM   Author   AEM   Publish   Dispatcher  
  • 45. AEM Environment with Chef Chef   Server   with  Nodes,   Cookbooks,   and  Policies   Node   AEM   Author   Chef-­‐   client   Node   AEM   Publish   Chef-­‐ client   Node   Dispat-­‐ cher   Chef-­‐ client  
  • 46. Chef Provisioning •  Allows clusters to be managed with chef- client and Chef server using recipes •  Collection of resources to enable creation of machines using chef-client •  Bootstrap operations that are done against an infrastructure like VirtualBox, Amazon EC2, Docker, etc. using drivers •  Machines – Chef provisioning runs multiple machine processes in-parallel in most situations
  • 47. Scaling with Chef Provisioning Chef   Server   with  Nodes,   Cookbooks,   and  Policies   Node   AEM   Author   Chef-­‐   client   Dispatcher   Node   Publish     Node   Dispatcher   Node   Publish     Node  
  • 48. Scaling with Chef Provisioning Chef   Server   with  Nodes,   Cookbooks,   and  Policies   Node   AEM   Author   Chef-­‐   client   Dispatcher   Node   Publish     Node   Dispatcher   Node   Publish     Node   Dispatcher   Node   Publish     Node   Dispatcher   Node   Publish     Node  
  • 49. Wrapping Up •  Infrastructure as code •  AEM DevOps with Chef •  Deploying AEM with Chef
  • 50. Q & A Send any questions to [email protected]