© 2014 Adobe Systems Incorporated. All Rights Reserved. Master Chef class hps://github.com/francoisledroff/connectcon-chef-repo Francois Le Droff –
© 2014 Adobe Systems Incorporated. All Rights Reserved. What does Chef code look like ? •! Recipes •! Aributes •! Resources •! Cookbooks
© 2014 Adobe Systems Incorporated. All Rights Reserved. Recipes Fundamental conguration element •! Authored in Ruby •! Queries , denes aributes
© 2014 Adobe Systems Incorporated. All Rights Reserved. •! aem-cookbook/recipes/default.rb case node['platform_family'] when 'rhel&ap
© 2014 Adobe Systems Incorporated. All Rights Reserved. Recipes : Resources & LW Resources •! aem-cookbook/recipes/default.rb remote_file node[
© 2014 Adobe Systems Incorporated. All Rights Reserved. Recipes : AEM LW Resources •! tacit-aem-cookbook/recipes/author.rb node[:aem][:author][:dep
© 2014 Adobe Systems Incorporated. All Rights Reserved. –! aem-cookbook/recipes/start.rb ruby_block 'block_until_cq_operational' do blo
© 2014 Adobe Systems Incorporated. All Rights Reserved. Cookbook paerns [1] •! Library cookbooks: –! hps://github.com/RiotGames/artifact-cookbook
© 2014 Adobe Systems Incorporated. All Rights Reserved. I got it
© 2014 Adobe Systems Incorporated. All Rights Reserved. Chef-server nodes
© 2014 Adobe Systems Incorporated. All Rights Reserved. workstation GitChef-server nodes ssh env. roles aributes recipes cookbooks
© 2014 Adobe Systems Incorporated. All Rights Reserved. @francoisledroff
© 2014 Adobe Systems Incorporated. All Rights Reserved. workstation GitChef-server nodes RSA key Auth ssh knifeenv. roles aributes recipes Chef-
© 2014 Adobe Systems Incorporated. All Rights Reserved. workstation GitChef-server nodes RSA key Auth ssh knifeenv. roles aributes recipes Chef-
© 2014 Adobe Systems Incorporated. All Rights Reserved. workstation GitChef-server nodes RSA key Auth ssh RSA key Auth knifeenv. roles aribute
© 2014 Adobe Systems Incorporated. All Rights Reserved. Search API knifeworkstation env. roles aributes cookbooks recipes Gitorg Chef-DK github Nex
© 2014 Adobe Systems Incorporated. All Rights Reserved. How ?
© 2014 Adobe Systems Incorporated. All Rights Reserved. Use case 0 : one AEM Author author
© 2014 Adobe Systems Incorporated. All Rights Reserved. Use case 0 : Chef Automation –! Install the jdk –! Download the jar –! Install it as a serv
© 2014 Adobe Systems Incorporated. All Rights Reserved. OSS from opscode and elsewhere Chef, Ruby, rvm, bundler knifeworkstation Chef-DK opscode
© 2014 Adobe Systems Incorporated. All Rights Reserved. workstation Gitssh A Chef repo in Git Every Chef automated infra needs a Chef Repository git
© 2014 Adobe Systems Incorporated. All Rights Reserved. nodeGet Few Machines/Nodes to deploy your code/infra to workstation ssh •! Need a few nodes
© 2014 Adobe Systems Incorporated. All Rights Reserved. @npeltier
© 2014 Adobe Systems Incorporated. All Rights Reserved. A Chef Server comes in 3 avors •! On premise OS Chef Server •! On premise Enterprise Chef
© 2014 Adobe Systems Incorporated. All Rights Reserved. A Chef Org top-level entity for role-based access org Chef-server hps (ldap) Auth Web UI
© 2014 Adobe Systems Incorporated. All Rights Reserved. workstation Git ssh A few private keys to associate your new chef repo with your chef server
© 2014 Adobe Systems Incorporated. All Rights Reserved. Bootstrap your nodes knifeworkstation Chef-server RSA key Auth node org RSA Keys chef-cli
© 2014 Adobe Systems Incorporated. All Rights Reserved. Chef-server nodes RSA key Auth Search API aributes node object run-list chef-clients Nod
© 2014 Adobe Systems Incorporated. All Rights Reserved. Start Coding: Manage your dependencies •! A few aem cookbooks on github •! hps://github.
© 2014 Adobe Systems Incorporated. All Rights Reserved. Start Coding: Manage your dependencies •! Use Berkshelf for Chef cookbooks $ cat Berksfil
© 2014 Adobe Systems Incorporated. All Rights Reserved. Upload your cookbooks chef-client and ntp declared in your chef server org knife workstat
© 2014 Adobe Systems Incorporated. All Rights Reserved. Run-list & Roles connectcon-chef-repo/roles/ name ”publish” Description ”connecton aem p
© 2014 Adobe Systems Incorporated. All Rights Reserved. Apply Run-List to Nodes aributes hps://chef.corp.adobe.com/organizations ~/workspace/gith
© 2014 Adobe Systems Incorporated. All Rights Reserved. Agenda •! What •! How •! Why
© 2014 Adobe Systems Incorporated. All Rights Reserved. Chef-client run [root@ot1slu010 ~]# sudo chef-client Starting Chef Client, version 11.12.8 r
© 2014 Adobe Systems Incorporated. All Rights Reserved. So we have an Author : Use Case 0 Author Author{ "name": ”<author-connectcon-
© 2014 Adobe Systems Incorporated. All Rights Reserved. Let’s add a publish : Use Case 1 { "name": ”<publish-connectcon-fqdn>"
© 2014 Adobe Systems Incorporated. All Rights Reserved. And there is magic: Chef search API •! tacit-aem-cookbook/providers/replicator.rb hps://gi
© 2014 Adobe Systems Incorporated. All Rights Reserved. Replication conguration happens #{role}:”publish” #{cluster_name}:”dev” Author Publish
© 2014 Adobe Systems Incorporated. All Rights Reserved. Let’s add a Dispatcher : Use Case 2 Dispatcher Author Publish Dispatcher Dispatcher { &quo
© 2014 Adobe Systems Incorporated. All Rights Reserved. What about Secret Management ? aem_replicator "replicate_to_publish_servers" do
© 2014 Adobe Systems Incorporated. All Rights Reserved. What about Secret Management ? aem_replicator "replicate_to_publish_servers" do
© 2014 Adobe Systems Incorporated. All Rights Reserved. Git UX/Dev/QA/Ops dev dev-stable prod ps Chef-server hps RSA private key Auth
© 2014 Adobe Systems Incorporated. All Rights Reserved. Chef-Vault in Action: include_recipe 'chef-vault-util::default' item = chef_vau
© 2014 Adobe Systems Incorporated. All Rights Reserved. What ?
© 2014 Adobe Systems Incorporated. All Rights Reserved. Let’s Add a Load Balancer : Use Case 3 HA/LB Dispatcher { "name": ”<lb-connec
© 2014 Adobe Systems Incorporated. All Rights Reserved. •! myapp-cookbook/recipes/log.rb logrotate_app 'aem' do cookbook 'logrotat
© 2014 Adobe Systems Incorporated. All Rights Reserved. Let’s cluster things!
© 2014 Adobe Systems Incorporated. All Rights Reserved. AEM Production Infrastructure LB/HA Dispatcher Publish Author MongoDB servers Dispatcher !&q
© 2014 Adobe Systems Incorporated. All Rights Reserved. you got it ?
© 2014 Adobe Systems Incorporated. All Rights Reserved. Search API knifeworkstation env. roles aributes cookbooks recipes Gitorg Chef-DK github Nex
© 2014 Adobe Systems Incorporated. All Rights Reserved. #LearnChef Learn Stuff Automate IT infrastructure and application delivery
© 2014 Adobe Systems Incorporated. All Rights Reserved. What Stuff ? •! Git Stuff •! Ruby stuff •! VM / Container stuff •! Cloud stuff •! Network stuff •
© 2014 Adobe Systems Incorporated. All Rights Reserved. Why ?
© 2014 Adobe Systems Incorporated. All Rights Reserved. Devops? “ You built it You run it! ”
© 2014 Adobe Systems Incorporated. All Rights Reserved. “ An automation platform that transforms infrastructure into code ”
© 2014 Adobe Systems Incorporated. All Rights Reserved. Chef, Devops ? No silver bullet. hps://twier.com/DEVOPS_BORAT/status/52857016670105600
© 2014 Adobe Systems Incorporated. All Rights Reserved. Chef, Devops ? No silver bullet. hps://twier.com/mindweather/status/458653460234502144
© 2014 Adobe Systems Incorporated. All Rights Reserved. Why ? •! Breaking down the wall of confusions •! As infra is code, it becomes: –! Testable
© 2014 Adobe Systems Incorporated. All Rights Reserved. hps://www.ickr.com/photos/francoisledroff/6107220850/in/set-72157626126325552
© 2014 Adobe Systems Incorporated. All Rights Reserved. hps://www.ickr.com/photos/blmoregon/7883684692
© 2014 Adobe Systems Incorporated. All Rights Reserved. AEM Production Infrastructure LB/HA Dispatcher Publish Author MongoDB servers Dispatcher !&q
© 2014 Adobe Systems Incorporated. All Rights Reserved. One more publish? LB/HA Dispatcher Publish Author !" MongoDB servers Dispatcher !"
© 2014 Adobe Systems Incorporated. All Rights Reserved. is needs to be congured LB/HA Dispatcher Publish Author MongoDB servers Dispatcher !"
© 2014 Adobe Systems Incorporated. All Rights Reserved. A more complex production
© 2014 Adobe Systems Incorporated. All Rights Reserved. Next scale of complexity…
© 2014 Adobe Systems Incorporated. All Rights Reserved. •! Created in 2009, Edited by Opscode/Chef •! Apache License •! On-top-of/in Ruby •! Very ac
© 2014 Adobe Systems Incorporated. All Rights Reserved. Why you should be a cook ? •! We all know the difficulties of local environment setup. •! Some
© 2014 Adobe Systems Incorporated. All Rights Reserved. Questions
© 2014 Adobe Systems Incorporated. All Rights Reserved. Appendix
© 2014 Adobe Systems Incorporated. All Rights Reserved. (D)VCS dev dev-stable ps rc Prod dev branch support branch stabevb minor release/ fast tr
© 2014 Adobe Systems Incorporated. All Rights Reserved. Environment le/cookbooks name ”dev" description "Environment for dev nodes” ov
© 2014 Adobe Systems Incorporated. All Rights Reserved. dev dev-stable ps rc prod D4 S4 D2 S2 PRD Git Environments / Environment cookbooks
© 2014 Adobe Systems Incorporated. All Rights Reserved. Infrastructure ? noun \ˈin-frə-ˌstrək-chər [1] A Collection of –! Resources: •! Network no
© 2014 Adobe Systems Incorporated. All Rights Reserved. Infrastructure as Code? •! Does not only replace your shell scripts •! Does allow: –! to bui
Comments to this Manuals