DevOps and Chef
Upcoming SlideShare
Loading in...5
×
 

DevOps and Chef

on

  • 7,775 views

DevOps as a buzzword has had a lot of attention recently. This presentation is my take on the origins and essence of the matter, as well as an introduction to how Chef, the open source configuration ...

DevOps as a buzzword has had a lot of attention recently. This presentation is my take on the origins and essence of the matter, as well as an introduction to how Chef, the open source configuration management software, can help to solve one of the problems an Operations team faces as it moves towards the DevOps goals.

Statistics

Views

Total Views
7,775
Views on SlideShare
6,614
Embed Views
1,161

Actions

Likes
11
Downloads
212
Comments
1

20 Embeds 1,161

http://devopser.me 1023
http://www.devopser.me 44
http://elscaminsdelacreacio.wordpress.com 23
http://confluence.nehta.net.au 19
http://chat.devopser.me 8
http://pms.bizmerce.com 8
http://www.onlydoo.com 6
http://abtasty.com 4
http://190.7.109.219 4
http://coderwall.com 4
http://us-w1.rockmelt.com 3
http://bertagimenez.wordpress.com 3
http://dev.devopser.me 3
http://www.scoop.it 2
http://www.linkedin.com 2
http://claire.www.myedu.office 1
http://kssminus.cafe24.com 1
http://plus.url.google.com 1
http://www.jfn.ac.lk 1
http://flashattackcrew.blogspot.com 1
More...

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Write a comment...
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

DevOps and Chef DevOps and Chef Presentation Transcript

  • DevOps & ChefFriday 16 March 12
  • DevOpsFriday 16 March 12
  • Devs vs OpsFriday 16 March 12
  • Devs vs OpsFriday 16 March 12
  • Devs vs Ops The Wall Of ConfusionFriday 16 March 12
  • Change vs StabilityFriday 16 March 12
  • A Meeting of Minds Follow code into the wild Accept change: become agileFriday 16 March 12
  • Buzzword: DevOpsFriday 16 March 12
  • Buzzword: DevOps Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword BuzzwordFriday 16 March 12
  • Buzzword: DevOps Buzzword Buzzword Buzzword Buzz Lightyear Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword BuzzwordFriday 16 March 12
  • Buzzword DevOps Buzzword: Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Lightyear Buzzword Buzz Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzz Aldrin Buzzword Buzzword BuzzwordFriday 16 March 12
  • What is DevOps?Friday 16 March 12
  • What is DevOps? What is DevOps NOT?Friday 16 March 12
  • What is DevOps? They are making a play for our jobs What is DevOps NOT?Friday 16 March 12
  • Devs want root What is DevOps? They are making a play for our jobs What is DevOps NOT?Friday 16 March 12
  • DevOps is not a job title, it’s a philosophy Devs want root What is DevOps? They are making a play for our jobs What is DevOps NOT?Friday 16 March 12
  • DevOps is not a job title, it’s a philosophy Devs want root What is DevOps? They are making a play for our jobs What is DevOps NOT? So many wordsFriday 16 March 12
  • DevOps, for meFriday 16 March 12
  • DevOps, for me: TestingFriday 16 March 12
  • DevOps, for me: Testing MonitoringFriday 16 March 12
  • DevOps, for me: Testing Monitoring AutomationFriday 16 March 12
  • DevOps, for me: Testing Monitoring AutomationFriday 16 March 12
  • DevOps, for me: Testing Don’t release broken things Monitoring Know when things break Automation Replace/fix broken things instantlyFriday 16 March 12
  • ✔ ?Friday 16 March 12
  • SCCS: Source Code Control SystemFriday 16 March 12
  • SCCS: Source Code Control System 1972 40 Years Ago!Friday 16 March 12
  • Revision Control ✔Friday 16 March 12
  • Revision Control Test Driven Development ✔Friday 16 March 12
  • Revision Control Test Driven Development Feature Branches ✔Friday 16 March 12
  • Revision Control Test Driven Development Feature Branches Continuous Integration ✔Friday 16 March 12
  • Revision Control Test Driven Development Feature Branches Continuous Integration Staging Environments ✔Friday 16 March 12
  • Revision Control Test Driven Development Feature Branches Continuous Integration Staging Environments AGILE ✔Friday 16 March 12
  • AGILEFriday 16 March 12
  • AGILE OPS ?Friday 16 March 12
  • AGILE OPS Continuous Deployment ? Feature Flags Dark Launches Automated Recovery IMVU - 50+ Flickr - 10+ Etsy - 25Friday 16 March 12
  • Instant Feedback Rollbacks Confidence No fear of changeFriday 16 March 12
  • Code InfrastructureFriday 16 March 12
  • Infrastructure CodeFriday 16 March 12
  • Infrastructure As CodeFriday 16 March 12
  • $  ssh  root@web1 Last  login:  Tue  Mar  13 #  apt-­‐get  install  apache2 ... #  vim  /etc/apache2/sites-­‐enabled/default.conf ... #  /etc/init.d/apache2  restart ... #  scp  web2:/root/.ssh/authorized_keys  ~/.sshFriday 16 March 12
  • ChefFriday 16 March 12
  • SERVER chef-client on node use knife to push retrieves config to server configuration from server use knife to query and CLIENT CLIENT ssh to clients (workstation) (server/node)Friday 16 March 12
  • Chef/nodes/web1.jsonFriday 16 March 12
  • { "access" : [ "developers", "designers" ], "name": "web1", "run_list": [ "role[base]", "role[web]", "recipe[splunk]" ]}Friday 16 March 12
  • { "access" : [ "developers", "designers" ], "name": "web1", "run_list": [ "role[base]", "role[web]", "recipe[splunk]" ]}Friday 16 March 12
  • Chef/nodes/web1.json Chef/roles/web.rbFriday 16 March 12
  • run_list("recipe[apache]", "role[monitoring]")Friday 16 March 12
  • run_list("recipe[apache]", "role[monitoring]")Friday 16 March 12
  • Chef/nodes/web1.json Chef/roles/web.rb Chef/cookbooks/apache/ recipes/default.rbFriday 16 March 12
  • package "apache2" do action :install endFriday 16 March 12
  • apache_modules = [wsgi, ssl, auth_tkt, proxy_http, headers, rewrite, status] apache_modules.each do |mod| apache_module mod do enable true notifies :restart, "service[apache2]" end endFriday 16 March 12
  • apache_modules = [wsgi, ssl, auth_tkt, proxy_http, headers, rewrite, status] apache_modules.each do |mod| apache_module mod do enable true notifies :restart, "service[apache2]" end endFriday 16 March 12
  • package "apache2" do case node[:platform] when "centos","redhat","fedora","suse" package_name "httpd" when "debian","ubuntu" package_name "apache2-mpm-prefork" end action :install endFriday 16 March 12
  • package "apache2" do case node[:platform] when "centos","redhat","fedora","suse" package_name "httpd" when "debian","ubuntu" package_name "apache2-mpm-prefork" end action :install endFriday 16 March 12
  • Chef/nodes/web1.json Chef/roles/web.rb Chef/cookbooks/apache/ recipes/default.rb attributes/default.rbFriday 16 March 12
  • default[:apache][:version] = "2.2"Friday 16 March 12
  • package "apache2" do action :install version "#{node[:apache][:version]}" endFriday 16 March 12
  • Chef/nodes/web1.json Chef/roles/web.rb Chef/cookbooks/apache/ recipes/default.rb attributes/default.rb templates/default/apache2.conf.erbFriday 16 March 12
  • template "#{node[:apache][:dir]}/apache2.conf" do source "apache2.conf.erb" owner "root" mode 0644 notifies :restart, resources(:service => "apache2") endFriday 16 March 12
  • It’s all RubyFriday 16 March 12
  • It’s all Ruby http://wiki.opscode.com/display/chef/Just+Enough+Ruby+for+Chef “Just Enough Ruby for Chef”Friday 16 March 12
  • It’s all Ruby Let’s hackFriday 16 March 12
  • Chef/nodes/web1.json Chef/roles/web.rb Chef/cookbooks/apache/ recipes/default.rb attributes/default.rb templates/default/apache2.conf.erb libraries/default.rbFriday 16 March 12
  • class Chef   class Recipe     def apache_ports(&block)       @node[:apache][:vhosts].each do |vh|        vh[:ports].each do |p|          block.call(p)          end       end     end   end endFriday 16 March 12
  • apache_ports do |p| firewall_port p do action :open end endFriday 16 March 12
  • apache_ports do |p| firewall_port p do action :open end endFriday 16 March 12
  • define :firewall_port, :action => :open do if not params.has_key?(:port) params[:port] = params[:name] end   if params[:action] == :open     execute "open #{params[:port]}" do       command "iptables -A INPUT --destination-port #{params[:port]} -j ACCEPT"     end   else     execute "close #{params[:port]}" do       command "iptables -A INPUT --destination-port #{params[:port]} -j DROP"     end   end endFriday 16 March 12
  • Providers package "apache2" do action :install end apt-get install yum install node[:platform] brew installFriday 16 March 12
  • "#{File.expand_path( Chef::Config[:file_cache_path] )}/handlers/yola.rb"Friday 16 March 12
  • "#{File.expand_path( Chef::Config[:file_cache_path] )}/handlers/yola.rb" class YolaHandler < Chef::Handler def report() run_status.updated_resources.each do |r| campfire_speak(r.to_s) end end endFriday 16 March 12
  • "#{File.expand_path( Chef::Config[:file_cache_path] )}/handlers/yola.rb" class YolaHandler < Chef::Handler def report() run_status.updated_resources.each do |r| campfire_speak(r.to_s) end end endFriday 16 March 12
  • Chef/nodes/web1.json Chef/roles/web.rb Chef/cookbooks/apache/ recipes/default.rb attributes/default.rb templates/default/apache2.conf.erb libraries/default.rb Chef/environments/production.rbFriday 16 March 12
  • Chef/nodes/web1.json Chef/roles/web.rb Chef/cookbooks/apache/ recipes/default.rb attributes/default.rb templates/default/apache2.conf.erb libraries/default.rb Chef/environments/production.rb Chef/environments/testing.rbFriday 16 March 12
  • default_attributes({ "aws_region" => "usa-east" }) default_attributes({ "aws_region" => "usa-east", "logging" => { "debug" => true } })Friday 16 March 12
  • Chef/nodes/web1.json Chef/roles/web.rb Chef/cookbooks/apache/ recipes/default.rb attributes/default.rb templates/default/apache2.conf.erb libraries/default.rb Chef/environments/production.rb Chef/environments/testing.rb Chef/data_bags/employees/jonathan.jsonFriday 16 March 12
  • { "name": "Jonathan Hitchcock", "id": "jonathan", "groups": ["developers", "operations"], "ssh_keys": [ { "key": "AAAB3NzC1yc2EAAAABIwAAAQEA3advEyDE0aEo==" } ] }Friday 16 March 12
  • ProvisioningFriday 16 March 12
  • Provisioning $ knife ec2 server create -r role[webserver] -I ami-7000f019 -f m1.smallFriday 16 March 12
  • Provisioning $ knife ec2 server create -r role[webserver] -I ami-7000f019 -f m1.small Amazon EC2 Openstack Rackspace Cloud libvirt Eucalyptus KVM Kickstart XEN VagrantFriday 16 March 12
  • Integration configuration data vs configuration logicFriday 16 March 12
  • Integration configuration vs configuration logic dataFriday 16 March 12
  • Integration configuration vs configuration logic data Ohai Collects infrastructure data Stored and indexed in NoSQL Search and useFriday 16 March 12
  • (A side note on) Attributes default normal override automaticFriday 16 March 12
  • (A side note on) Attributes default cookbooks, data bags normal node definitions override for special cases automatic ohaiFriday 16 March 12
  • (Back to) Integration search(:node, role:webbackend) do |wb| haproxy_backend "#{wb[:apache][:port]}" do action :create end end Systems auto-discover each other Configuration is responsive to changesFriday 16 March 12
  • Integration search(:node, role:webbackend) do |wb| haproxy_backend "#{wb[:apache][:port]}" do action :create end end Systems auto-discover each other Configuration is responsive to changes So you don’t have to be!Friday 16 March 12
  • Jonathan Hitchcock @vhata github.com/vhataFriday 16 March 12