SlideShare ist ein Scribd-Unternehmen logo
1 von 79
A PRACTICAL
INTRODUCTION TO DEVOPS
       WITH CHEF
      Nick Barendt - LeanDog
     CWRU ACM Link-State 2012
WHO AM I

• CWRU Alumnus     - Wayward Electrical Engineer

• LeanDog   - Director of Labs

• CWRU   EECS Adjunct Faculty

• Embedded   Linux (Bootloaders, Kernel Drivers, Daemons)

• Web/Cloud   (AWS, Python Django)
LEANDOG
      http://leandog.com
http://leandog.com/dogtreats/
        Copyright 2012, Nick Barendt
DEVOPS
DEVELOPMENT
     +
 OPERATIONS
DEVELOPMENT
     +
 OPERATIONS
DEVOPS
• Agile/Lean    Development

• Frequent    Releases (Minimize WIP)

• Continuous     Integration → Continuous Delivery

• Reduced     Stress: Release is Non-Event; TDD/BDD

• Holistic   - code/infrastructure are inextricably linked
TOPICS FOR TODAY



• Configuration   Management

• Deployment Automation
SAMPLE APPLICATION


• Ubuntu   12.04 LTS

• Apache2

• Python   Django

• PostgreSQL
Apache2

static content   mod_wsgi   Postgresql
STATIC CONTENT



• aka “files”

• HTML, CSS, JavaScript, images, etc.
MOD_WSGI


• WSGI   - Web Server Gateway Interface

 • Python    Universal HTTP interface

• mod_wsgi Apache    plugin

• executes   Python/Django code in response to HTTP requests
POSTGRESQL

• Relational   Database Management System

• Django’s   Object Relational Mapper (ORM) supports:

  • Postgresql

  • MySQL

  • SQLite

  • Oracle
HOW DO WE DEPLOY?
PART 1: THE HARD WAY
INSTALL DISTRO PACKAGES
CREATE THE VIRTUALENV
Virtualenv

• Python “environment” isolated     from rest of system

• Analogous   to Ruby’s rvm

• Python   Interpreter + 3rd party libraries

• pip   - Python Package Manager

• requirements.txt   - 3rd party library manifest, with versions
requirements.txt


    django==1.4.2
    psycopg2==2.4.5
CONFIGURE POSTGRESQL
• Configure    Postgresql to listen on TCP Port 5432

• Configure    Postgresql Authentication

• Create   User “roster”

• Create   Database “roster”
SOURCE!
THAT WASN’T PRETTY
OR EASILY REPEATABLE
PAUSE
WHAT DOES THE APP DO?
BACK TO THE STORY
CONFIGURATION

• Repeatable    and works on a minimal, standard install image

• TIP:   Use virtual machines for development/testing:

  • Snapshot Virtual   Machine

  • Test   Configuration Process

  • Verify   and/or Fix Configuration Process

  • Rollback
SNAPSHOT TREE
   VMware Fusion
    Copyright 2012, Nick Barendt
HOW TO IMPROVE?
TAKE A FEW
  NOTES?
WE CAN DO SLIGHTLY BETTER
SCRIPTS!
“prepare_ubuntu”

#!/bin/bash

# must be run as root!


apt-get   install   -y   apache2 libapache2-mod-wsgi
apt-get   install   -y   python-dev python-virtualenv
apt-get   install   -y   git
apt-get   install   -y   postgresql-9.1 libpq-dev
apt-get   install   -y   vim
“create_virtualenv”


#!/bin/bash

ENV_DIR=env

rm -rf $ENV_DIR
virtualenv $ENV_DIR
$ENV_DIR/bin/pip install -r requirements.txt
HOW ABOUT CONFIG FILES...
YEAH....ABOUT THAT
FINALLY, WE CAN TALK
    ABOUT CHEF
PART 2: CHEF!
LET’S WAIT JUST A LITTLE
      BIT LONGER
IN AN IDEAL WORLD, WHAT
    WOULD WE WANT?
Configuration IS Source


• Configuration    in Version Control

• Text   Files

• Diff ’able

• Tie   Infrastructure Configuration and Production Releases
A DECLARATIVE DSL


database_user 'roster' do
    password 'spartans'
    database_name 'roster'
end
CHEF


• Opscode    - Private company

• 2009

• Open   Source - Apache License 2.0

• Ruby   DSL for configuration “recipes” or “cookbooks”
CHEF ARCHITECTURE


  Chef Server   chef client




     knife
CHEF ARCHITECTURE
BUT I JUST WANT TO
MANAGE A FEW MACHINES...
CHEF-SOLO
chef-solo


• Essentially   chef-client, but operates without chef server

• Only   uses local resources

• Simpler   to start learning

• “Recipes” are    inherently the same as “full blown” chef
CHEF CONCEPTS


• NODES     - “servers”, “computers”, “machines”

• RESOURCES      - abstraction of the “thing” you’re configuring

• RECIPES   - collection of Resource descriptions

• COOKBOOKS        - collections of Recipes and Attributes
NODES

• Ubuntu                       • Scientific       Linux

• Debian                       • OS          X

• Red   Hat                    • Windows

• Fedora

• CentOS

• Oracle
              Copyright 2012, Nick Barendt
RESOURCES

• File                           • User        and Group

• Template                       • Git

• Execute                        • Subversion

• Cron

• Link

• Directory
                Copyright 2012, Nick Barendt
RECIPES
package "libpq-dev"

python_virtualenv node[:roster]["VIRTUALENV_DIR"] do
    interpreter "python2.7"
    action :create
end

pip_cmd = File.join(node[:roster]["VIRTUALENV_DIR"], "bin", "pip")
requirements_txt = File.join(node[:roster]["DEPLOY_DIR"], "requirements.txt")

execute "#{pip_cmd} install -r #{requirements_txt}"    do
end
RECIPES
package "libpq-dev"

python_virtualenv node[:roster]["VIRTUALENV_DIR"] do
    interpreter "python2.7"
    action :create
end

pip_cmd = File.join(node[:roster]["VIRTUALENV_DIR"], "bin", "pip")
requirements_txt = File.join(node[:roster]["DEPLOY_DIR"], "requirements.txt")

execute "#{pip_cmd} install -r #{requirements_txt}"    do
end
RECIPES
package "libpq-dev"

python_virtualenv node[:roster]["VIRTUALENV_DIR"] do
    interpreter "python2.7"
    action :create
end

pip_cmd = File.join(node[:roster]["VIRTUALENV_DIR"], "bin", "pip")
requirements_txt = File.join(node[:roster]["DEPLOY_DIR"], "requirements.txt")

execute "#{pip_cmd} install -r #{requirements_txt}"    do
end
RECIPES
                                      Install Distro Package
package "libpq-dev"

python_virtualenv node[:roster]["VIRTUALENV_DIR"] do
    interpreter "python2.7"
    action :create
end

pip_cmd = File.join(node[:roster]["VIRTUALENV_DIR"], "bin", "pip")
requirements_txt = File.join(node[:roster]["DEPLOY_DIR"], "requirements.txt")

execute "#{pip_cmd} install -r #{requirements_txt}"    do
end
RECIPES
                                       create virtualenv @
package "libpq-dev"
                                          specified path
python_virtualenv node[:roster]["VIRTUALENV_DIR"] do
    interpreter "python2.7"
    action :create
end

pip_cmd = File.join(node[:roster]["VIRTUALENV_DIR"], "bin", "pip")
requirements_txt = File.join(node[:roster]["DEPLOY_DIR"], "requirements.txt")

execute "#{pip_cmd} install -r #{requirements_txt}"    do
end
RECIPES
                                                                 some variables
package "libpq-dev"
                                                                 and Ruby code
python_virtualenv node[:roster]["VIRTUALENV_DIR"] do
    interpreter "python2.7"
    action :create
end

pip_cmd = File.join(node[:roster]["VIRTUALENV_DIR"], "bin", "pip")
requirements_txt = File.join(node[:roster]["DEPLOY_DIR"], "requirements.txt")

execute "#{pip_cmd} install -r #{requirements_txt}"    do
end
RECIPES
package "libpq-dev"

python_virtualenv node[:roster]["VIRTUALENV_DIR"] do
    interpreter "python2.7"
    action :create
end

pip_cmd = File.join(node[:roster]["VIRTUALENV_DIR"], "bin", "pip")
requirements_txt = File.join(node[:roster]["DEPLOY_DIR"], "requirements.txt")

execute "#{pip_cmd} install -r #{requirements_txt}"    do
end



                                  execute command-line
RECIPES
package "libpq-dev"

python_virtualenv node[:roster]["VIRTUALENV_DIR"] do
    interpreter "python2.7"
    action :create
end

pip_cmd = File.join(node[:roster]["VIRTUALENV_DIR"], "bin", "pip")
requirements_txt = File.join(node[:roster]["DEPLOY_DIR"], "requirements.txt")

execute "#{pip_cmd} install -r #{requirements_txt}"    do
end
COOKBOOKS


• Collections   of

  • Attributes

  • Recipes

  • Templates



                     Copyright 2012, Nick Barendt
TONS OF COOKBOOKS
         HTTPS://GITHUB.COM/OPSCODE-COOKBOOKS


• Java                                 • Erlang

• Python                               • Django

• Nagios                               • Rsyslog

• openssh                              • Nginx

• Apache2                              • Perl

• Postfix                               • Many, Many   More
                      Copyright 2012, Nick Barendt
CONVERGENCE

• Chef attempts to converge a machine’s configuration to the
 desired state

• Withtemporary errors, repeated runs will drive towards
 convergence

• Resources     are (generally) idempotent

• Robust

• Try, try   again
HOW DOES THIS ACTUALLY
      WORK?
• Merge    Defaults and Node Attributes

• Recipe   Compilation

• Recipe   Execution
sudo chef-solo -c solo.rb -j solo-configs/standalone.json


solo.rb
# minimal configuration file for chef-solo

cookbook_path File.expand_path File.dirname(__FILE__) + "/cookbooks"


standalone.json
{
    "roster": {
        "app_server": {
             "load_default_data": true
        }
    },
    "postgresql": {
        "password":{
             "postgres": "roster_123"
        }
    },
    "run_list": [
        "recipe[roster::database]",
        "recipe[roster::app_server]"
    ]
}
app_server.rb
include_recipe "apache2"
include_recipe "apache2::mod_wsgi"
include_recipe "python"

node[:roster]["DEPLOY_DIR"] = File.expand_path(
   File.join( File.expand_path( File.dirname(__FILE__) ),
   "..","..","..",".."))

node[:roster]["VIRTUALENV_DIR"] = File.expand_path(
   File.join(node[:roster]["DEPLOY_DIR"], "env"))

# disable default, regardless of how it is symlinked
apache_site "default" do
    enable false
end
apache_site "000-default" do
    enable false
end


# we need a few packages
package "libpq-dev"

python_virtualenv node[:roster]["VIRTUALENV_DIR"] do
    interpreter "python2.7"
    action :create
end
continued
pip_cmd = File.join(node[:roster]["VIRTUALENV_DIR"], "bin",
"pip")
requirements_txt = File.join(node[:roster]["DEPLOY_DIR"],
"requirements.txt")

execute "#{pip_cmd} install -r #{requirements_txt}"   do
end

web_app "roster" do
    template "roster_apache.conf.erb"
end

django_admin_cmd = File.join(node[:roster]["DEPLOY_DIR"],
"cwru_acm", "manage.py")
python_exec = File.join(node[:roster]["VIRTUALENV_DIR"], "bin",
"python")

execute "#{python_exec} #{django_admin_cmd} syncdb --noinput"
do
end

execute "#{python_exec} #{django_admin_cmd} collectstatic --
noinput" do
end

execute "#{python_exec} #{django_admin_cmd} loaddata roster
some_initial_data" do
    only_if {node[:roster][:app_server][:load_default_data]}
end
database.rb
include_recipe "postgresql::client"
include_recipe "postgresql::server"

r = package "ruby-pg" do
  package_name "libpgsql-ruby"
  action :nothing
end
r.run_action(:upgrade)

# Snippet from opscode to reload gems
require 'rubygems'
Gem.clear_paths
require "pg"

include_recipe "database"
postgresql_connection_info = {:host => "127.0.0.1", :port => 5432, :username =>
'postgres', :password => node['postgresql']['password']['postgres']}

postgresql_database "roster" do
    connection postgresql_connection_info
    action :create
end

database_user 'roster' do
    connection postgresql_connection_info
    password 'spartans'
    database_name 'roster'
    provider Chef::Provider::Database::PostgresqlUser
    action :create
end

database_user 'roster' do
    connection postgresql_connection_info
    password 'spartans'
    provider Chef::Provider::Database::PostgresqlUser
    action :grant
end
But Wait, There’s More

• Parametric    Configs. (environments): Dev, Staging, Production

• Roles
      - collect recipes based on how server is used (e.g.,
 Apache2 + Memcache for “front-end”)

• Test   Driven Infrastructure - Configuration is just code!

• Bootstrapping    in AWS EC2 and other Clouds

• Chef    Server, Knife
Questions?

nick@barendt.com         Twitter: @nickbarendt

             Code From Today:
   https://github.com/nbarendt/cwru_acm_2012
FOR MORE INFO
• http://wiki.opscode.com

• Fast
     Start Linux Guide: http://wiki.opscode.com/display/chef/
 Fast+Start+Guide

• AWSEC2 Bootstrapping: http://wiki.opscode.com/display/chef/
 EC2+Bootstrap+Fast+Start+Guide

• O’Reilly:   Test-Driven Infrastructure with Chef

Weitere ähnliche Inhalte

Was ist angesagt?

Augeas, swiss knife resources for your puppet tree
Augeas, swiss knife resources for your puppet treeAugeas, swiss knife resources for your puppet tree
Augeas, swiss knife resources for your puppet treeJulien Pivotto
 
Building Hadoop with Chef
Building Hadoop with ChefBuilding Hadoop with Chef
Building Hadoop with ChefJohn Martin
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer ToolboxPablo Godel
 
Chef for OpenStack - OpenStack Fall 2012 Summit
Chef for OpenStack  - OpenStack Fall 2012 SummitChef for OpenStack  - OpenStack Fall 2012 Summit
Chef for OpenStack - OpenStack Fall 2012 SummitMatt Ray
 
Boston/NYC Chef for OpenStack Hack Days
Boston/NYC Chef for OpenStack Hack DaysBoston/NYC Chef for OpenStack Hack Days
Boston/NYC Chef for OpenStack Hack DaysMatt Ray
 
Chef for OpenStack: OpenStack Spring Summit 2013
Chef for OpenStack: OpenStack Spring Summit 2013Chef for OpenStack: OpenStack Spring Summit 2013
Chef for OpenStack: OpenStack Spring Summit 2013Matt Ray
 
Docker for PHP Developers - ZendCon 2016
Docker for PHP Developers - ZendCon 2016Docker for PHP Developers - ZendCon 2016
Docker for PHP Developers - ZendCon 2016Chris Tankersley
 
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and KibanaPuppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibanapkill
 
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 -  Rock Solid Deployment of Symfony AppsSymfony Live NYC 2014 -  Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony AppsPablo Godel
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsPablo Godel
 
Docker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochraneDocker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochranedotCloud
 
Docker for PHP Developers - php[world] 2017
Docker for PHP Developers - php[world] 2017Docker for PHP Developers - php[world] 2017
Docker for PHP Developers - php[world] 2017Chris Tankersley
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopWalter Heck
 
How bigtop leveraged docker for build automation and one click hadoop provis...
How bigtop leveraged docker for build automation and  one click hadoop provis...How bigtop leveraged docker for build automation and  one click hadoop provis...
How bigtop leveraged docker for build automation and one click hadoop provis...Evans Ye
 
Running Django on Docker: a workflow and code
Running Django on Docker: a workflow and codeRunning Django on Docker: a workflow and code
Running Django on Docker: a workflow and codeDanielle Madeley
 
Package Management and Chef - ChefConf 2015
Package Management and Chef - ChefConf 2015Package Management and Chef - ChefConf 2015
Package Management and Chef - ChefConf 2015Chef
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-wayRobert Lujo
 

Was ist angesagt? (19)

Augeas, swiss knife resources for your puppet tree
Augeas, swiss knife resources for your puppet treeAugeas, swiss knife resources for your puppet tree
Augeas, swiss knife resources for your puppet tree
 
Building Hadoop with Chef
Building Hadoop with ChefBuilding Hadoop with Chef
Building Hadoop with Chef
 
The Modern Developer Toolbox
The Modern Developer ToolboxThe Modern Developer Toolbox
The Modern Developer Toolbox
 
Chef for OpenStack - OpenStack Fall 2012 Summit
Chef for OpenStack  - OpenStack Fall 2012 SummitChef for OpenStack  - OpenStack Fall 2012 Summit
Chef for OpenStack - OpenStack Fall 2012 Summit
 
Boston/NYC Chef for OpenStack Hack Days
Boston/NYC Chef for OpenStack Hack DaysBoston/NYC Chef for OpenStack Hack Days
Boston/NYC Chef for OpenStack Hack Days
 
Chef for OpenStack: OpenStack Spring Summit 2013
Chef for OpenStack: OpenStack Spring Summit 2013Chef for OpenStack: OpenStack Spring Summit 2013
Chef for OpenStack: OpenStack Spring Summit 2013
 
Docker for PHP Developers - ZendCon 2016
Docker for PHP Developers - ZendCon 2016Docker for PHP Developers - ZendCon 2016
Docker for PHP Developers - ZendCon 2016
 
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and KibanaPuppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
Puppetconf 2015 - Puppet Reporting with Elasticsearch Logstash and Kibana
 
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 -  Rock Solid Deployment of Symfony AppsSymfony Live NYC 2014 -  Rock Solid Deployment of Symfony Apps
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
 
Docker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken CochraneDocker at Djangocon 2013 | Talk by Ken Cochrane
Docker at Djangocon 2013 | Talk by Ken Cochrane
 
Docker for PHP Developers - php[world] 2017
Docker for PHP Developers - php[world] 2017Docker for PHP Developers - php[world] 2017
Docker for PHP Developers - php[world] 2017
 
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
 
Getting Started With Aura
Getting Started With AuraGetting Started With Aura
Getting Started With Aura
 
How bigtop leveraged docker for build automation and one click hadoop provis...
How bigtop leveraged docker for build automation and  one click hadoop provis...How bigtop leveraged docker for build automation and  one click hadoop provis...
How bigtop leveraged docker for build automation and one click hadoop provis...
 
Running Django on Docker: a workflow and code
Running Django on Docker: a workflow and codeRunning Django on Docker: a workflow and code
Running Django on Docker: a workflow and code
 
Package Management and Chef - ChefConf 2015
Package Management and Chef - ChefConf 2015Package Management and Chef - ChefConf 2015
Package Management and Chef - ChefConf 2015
 
Docker
DockerDocker
Docker
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
 

Andere mochten auch

Falling in love_with_bad_news
Falling in love_with_bad_newsFalling in love_with_bad_news
Falling in love_with_bad_newsLeanDog
 
Cadenced flow overview
Cadenced flow overviewCadenced flow overview
Cadenced flow overviewLeanDog
 
No one reads anything designing for users on the move
No one reads anything  designing for users on the move No one reads anything  designing for users on the move
No one reads anything designing for users on the move LeanDog
 
Collaboration
CollaborationCollaboration
CollaborationLeanDog
 
Design studio-method-industry2016 (1)
Design studio-method-industry2016 (1)Design studio-method-industry2016 (1)
Design studio-method-industry2016 (1)LeanDog
 
Acceptance testfurureinmind
Acceptance testfurureinmindAcceptance testfurureinmind
Acceptance testfurureinmindLeanDog
 
Pair programming-agile2012
Pair programming-agile2012Pair programming-agile2012
Pair programming-agile2012LeanDog
 
Key lean principles for organizational change
Key lean principles for organizational changeKey lean principles for organizational change
Key lean principles for organizational changeLeanDog
 
Formula 1 Lean by Jon Stahl
Formula 1 Lean by Jon StahlFormula 1 Lean by Jon Stahl
Formula 1 Lean by Jon StahlLeanDog
 
Agile Explained by LeanDog
Agile Explained by LeanDogAgile Explained by LeanDog
Agile Explained by LeanDogLeanDog
 
Using flow based road mapping and options
Using flow based road mapping and optionsUsing flow based road mapping and options
Using flow based road mapping and optionsLeanDog
 
Agile & UX What changes and other C.R.A.P.
Agile & UX What changes and other C.R.A.P.Agile & UX What changes and other C.R.A.P.
Agile & UX What changes and other C.R.A.P.LeanDog
 
Servant Leadership with Moral Authority @LeanDog by Jon R. Stahl
Servant Leadership with Moral Authority @LeanDog by Jon R. StahlServant Leadership with Moral Authority @LeanDog by Jon R. Stahl
Servant Leadership with Moral Authority @LeanDog by Jon R. StahlLeanDog
 
Agile From the Top Down: Executives & Leadership Living Agile by Jon Stahl
Agile From the Top Down: Executives & Leadership Living Agile  by Jon StahlAgile From the Top Down: Executives & Leadership Living Agile  by Jon Stahl
Agile From the Top Down: Executives & Leadership Living Agile by Jon StahlLeanDog
 
Product Design and Organization Design: Two sides of the same coin (1)
Product Design and Organization Design: Two sides of the same coin (1)Product Design and Organization Design: Two sides of the same coin (1)
Product Design and Organization Design: Two sides of the same coin (1)LeanDog
 
Value Focused Prioritization & Decision-Making
Value Focused Prioritization & Decision-MakingValue Focused Prioritization & Decision-Making
Value Focused Prioritization & Decision-MakingLeanDog
 

Andere mochten auch (16)

Falling in love_with_bad_news
Falling in love_with_bad_newsFalling in love_with_bad_news
Falling in love_with_bad_news
 
Cadenced flow overview
Cadenced flow overviewCadenced flow overview
Cadenced flow overview
 
No one reads anything designing for users on the move
No one reads anything  designing for users on the move No one reads anything  designing for users on the move
No one reads anything designing for users on the move
 
Collaboration
CollaborationCollaboration
Collaboration
 
Design studio-method-industry2016 (1)
Design studio-method-industry2016 (1)Design studio-method-industry2016 (1)
Design studio-method-industry2016 (1)
 
Acceptance testfurureinmind
Acceptance testfurureinmindAcceptance testfurureinmind
Acceptance testfurureinmind
 
Pair programming-agile2012
Pair programming-agile2012Pair programming-agile2012
Pair programming-agile2012
 
Key lean principles for organizational change
Key lean principles for organizational changeKey lean principles for organizational change
Key lean principles for organizational change
 
Formula 1 Lean by Jon Stahl
Formula 1 Lean by Jon StahlFormula 1 Lean by Jon Stahl
Formula 1 Lean by Jon Stahl
 
Agile Explained by LeanDog
Agile Explained by LeanDogAgile Explained by LeanDog
Agile Explained by LeanDog
 
Using flow based road mapping and options
Using flow based road mapping and optionsUsing flow based road mapping and options
Using flow based road mapping and options
 
Agile & UX What changes and other C.R.A.P.
Agile & UX What changes and other C.R.A.P.Agile & UX What changes and other C.R.A.P.
Agile & UX What changes and other C.R.A.P.
 
Servant Leadership with Moral Authority @LeanDog by Jon R. Stahl
Servant Leadership with Moral Authority @LeanDog by Jon R. StahlServant Leadership with Moral Authority @LeanDog by Jon R. Stahl
Servant Leadership with Moral Authority @LeanDog by Jon R. Stahl
 
Agile From the Top Down: Executives & Leadership Living Agile by Jon Stahl
Agile From the Top Down: Executives & Leadership Living Agile  by Jon StahlAgile From the Top Down: Executives & Leadership Living Agile  by Jon Stahl
Agile From the Top Down: Executives & Leadership Living Agile by Jon Stahl
 
Product Design and Organization Design: Two sides of the same coin (1)
Product Design and Organization Design: Two sides of the same coin (1)Product Design and Organization Design: Two sides of the same coin (1)
Product Design and Organization Design: Two sides of the same coin (1)
 
Value Focused Prioritization & Decision-Making
Value Focused Prioritization & Decision-MakingValue Focused Prioritization & Decision-Making
Value Focused Prioritization & Decision-Making
 

Ähnlich wie Practical introduction to dev ops with chef

ASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerJürgen Gutsch
 
Docker module 1
Docker module 1Docker module 1
Docker module 1Liang Bo
 
Australian OpenStack User Group August 2012: Chef for OpenStack
Australian OpenStack User Group August 2012: Chef for OpenStackAustralian OpenStack User Group August 2012: Chef for OpenStack
Australian OpenStack User Group August 2012: Chef for OpenStackMatt Ray
 
OpenStack Deployments with Chef
OpenStack Deployments with ChefOpenStack Deployments with Chef
OpenStack Deployments with ChefMatt Ray
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with PuppetKris Buytaert
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, OrchestrationThe Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, OrchestrationErica Windisch
 
Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3Chef
 
Achieving Infrastructure Portability with Chef
Achieving Infrastructure Portability with ChefAchieving Infrastructure Portability with Chef
Achieving Infrastructure Portability with ChefMatt Ray
 
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
Leonid Vasilyev  "Building, deploying and running production code at Dropbox"Leonid Vasilyev  "Building, deploying and running production code at Dropbox"
Leonid Vasilyev "Building, deploying and running production code at Dropbox"IT Event
 
SCALE12X: Chef for OpenStack
SCALE12X: Chef for OpenStackSCALE12X: Chef for OpenStack
SCALE12X: Chef for OpenStackMatt Ray
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chefkevsmith
 
OpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetesOpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetesSamuel Terburg
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with PuppetKris Buytaert
 
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...DevDay.org
 
DevOPS training - Day 2/2
DevOPS training - Day 2/2DevOPS training - Day 2/2
DevOPS training - Day 2/2Vincent Mercier
 
Oscon London 2016 - Docker from Development to Production
Oscon London 2016 - Docker from Development to ProductionOscon London 2016 - Docker from Development to Production
Oscon London 2016 - Docker from Development to ProductionPatrick Chanezon
 
Docker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationDocker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationSuresh Balla
 

Ähnlich wie Practical introduction to dev ops with chef (20)

ASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & dockerASP.NET 5 auf Raspberry PI & docker
ASP.NET 5 auf Raspberry PI & docker
 
Docker module 1
Docker module 1Docker module 1
Docker module 1
 
Australian OpenStack User Group August 2012: Chef for OpenStack
Australian OpenStack User Group August 2012: Chef for OpenStackAustralian OpenStack User Group August 2012: Chef for OpenStack
Australian OpenStack User Group August 2012: Chef for OpenStack
 
Chef for OpenStack- Fall 2012.pdf
Chef for OpenStack- Fall 2012.pdfChef for OpenStack- Fall 2012.pdf
Chef for OpenStack- Fall 2012.pdf
 
OpenStack Deployments with Chef
OpenStack Deployments with ChefOpenStack Deployments with Chef
OpenStack Deployments with Chef
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, OrchestrationThe Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
The Docker "Gauntlet" - Introduction, Ecosystem, Deployment, Orchestration
 
Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3
 
Achieving Infrastructure Portability with Chef
Achieving Infrastructure Portability with ChefAchieving Infrastructure Portability with Chef
Achieving Infrastructure Portability with Chef
 
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
Leonid Vasilyev  "Building, deploying and running production code at Dropbox"Leonid Vasilyev  "Building, deploying and running production code at Dropbox"
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
 
SCALE12X: Chef for OpenStack
SCALE12X: Chef for OpenStackSCALE12X: Chef for OpenStack
SCALE12X: Chef for OpenStack
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
 
OpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetesOpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetes
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with Puppet
 
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
 
Jenkins Pipelines
Jenkins PipelinesJenkins Pipelines
Jenkins Pipelines
 
DevOPS training - Day 2/2
DevOPS training - Day 2/2DevOPS training - Day 2/2
DevOPS training - Day 2/2
 
Oscon London 2016 - Docker from Development to Production
Oscon London 2016 - Docker from Development to ProductionOscon London 2016 - Docker from Development to Production
Oscon London 2016 - Docker from Development to Production
 
Docker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationDocker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualization
 

Practical introduction to dev ops with chef

  • 1. A PRACTICAL INTRODUCTION TO DEVOPS WITH CHEF Nick Barendt - LeanDog CWRU ACM Link-State 2012
  • 2. WHO AM I • CWRU Alumnus - Wayward Electrical Engineer • LeanDog - Director of Labs • CWRU EECS Adjunct Faculty • Embedded Linux (Bootloaders, Kernel Drivers, Daemons) • Web/Cloud (AWS, Python Django)
  • 3. LEANDOG http://leandog.com http://leandog.com/dogtreats/ Copyright 2012, Nick Barendt
  • 5. DEVELOPMENT + OPERATIONS
  • 6. DEVELOPMENT + OPERATIONS
  • 8. • Agile/Lean Development • Frequent Releases (Minimize WIP) • Continuous Integration → Continuous Delivery • Reduced Stress: Release is Non-Event; TDD/BDD • Holistic - code/infrastructure are inextricably linked
  • 9. TOPICS FOR TODAY • Configuration Management • Deployment Automation
  • 10. SAMPLE APPLICATION • Ubuntu 12.04 LTS • Apache2 • Python Django • PostgreSQL
  • 11. Apache2 static content mod_wsgi Postgresql
  • 12. STATIC CONTENT • aka “files” • HTML, CSS, JavaScript, images, etc.
  • 13. MOD_WSGI • WSGI - Web Server Gateway Interface • Python Universal HTTP interface • mod_wsgi Apache plugin • executes Python/Django code in response to HTTP requests
  • 14. POSTGRESQL • Relational Database Management System • Django’s Object Relational Mapper (ORM) supports: • Postgresql • MySQL • SQLite • Oracle
  • 15. HOW DO WE DEPLOY?
  • 16. PART 1: THE HARD WAY
  • 18.
  • 20. Virtualenv • Python “environment” isolated from rest of system • Analogous to Ruby’s rvm • Python Interpreter + 3rd party libraries • pip - Python Package Manager • requirements.txt - 3rd party library manifest, with versions
  • 21. requirements.txt django==1.4.2 psycopg2==2.4.5
  • 22.
  • 24. • Configure Postgresql to listen on TCP Port 5432 • Configure Postgresql Authentication • Create User “roster” • Create Database “roster”
  • 25.
  • 27.
  • 30. PAUSE
  • 31. WHAT DOES THE APP DO?
  • 32.
  • 33. BACK TO THE STORY
  • 34. CONFIGURATION • Repeatable and works on a minimal, standard install image • TIP: Use virtual machines for development/testing: • Snapshot Virtual Machine • Test Configuration Process • Verify and/or Fix Configuration Process • Rollback
  • 35. SNAPSHOT TREE VMware Fusion Copyright 2012, Nick Barendt
  • 37. TAKE A FEW NOTES?
  • 38. WE CAN DO SLIGHTLY BETTER
  • 40. “prepare_ubuntu” #!/bin/bash # must be run as root! apt-get install -y apache2 libapache2-mod-wsgi apt-get install -y python-dev python-virtualenv apt-get install -y git apt-get install -y postgresql-9.1 libpq-dev apt-get install -y vim
  • 41. “create_virtualenv” #!/bin/bash ENV_DIR=env rm -rf $ENV_DIR virtualenv $ENV_DIR $ENV_DIR/bin/pip install -r requirements.txt
  • 42. HOW ABOUT CONFIG FILES...
  • 44. FINALLY, WE CAN TALK ABOUT CHEF
  • 46. LET’S WAIT JUST A LITTLE BIT LONGER
  • 47. IN AN IDEAL WORLD, WHAT WOULD WE WANT?
  • 48. Configuration IS Source • Configuration in Version Control • Text Files • Diff ’able • Tie Infrastructure Configuration and Production Releases
  • 49. A DECLARATIVE DSL database_user 'roster' do     password 'spartans'     database_name 'roster' end
  • 50. CHEF • Opscode - Private company • 2009 • Open Source - Apache License 2.0 • Ruby DSL for configuration “recipes” or “cookbooks”
  • 51. CHEF ARCHITECTURE Chef Server chef client knife
  • 53. BUT I JUST WANT TO MANAGE A FEW MACHINES...
  • 55. chef-solo • Essentially chef-client, but operates without chef server • Only uses local resources • Simpler to start learning • “Recipes” are inherently the same as “full blown” chef
  • 56. CHEF CONCEPTS • NODES - “servers”, “computers”, “machines” • RESOURCES - abstraction of the “thing” you’re configuring • RECIPES - collection of Resource descriptions • COOKBOOKS - collections of Recipes and Attributes
  • 57. NODES • Ubuntu • Scientific Linux • Debian • OS X • Red Hat • Windows • Fedora • CentOS • Oracle Copyright 2012, Nick Barendt
  • 58. RESOURCES • File • User and Group • Template • Git • Execute • Subversion • Cron • Link • Directory Copyright 2012, Nick Barendt
  • 59. RECIPES package "libpq-dev" python_virtualenv node[:roster]["VIRTUALENV_DIR"] do     interpreter "python2.7"     action :create end pip_cmd = File.join(node[:roster]["VIRTUALENV_DIR"], "bin", "pip") requirements_txt = File.join(node[:roster]["DEPLOY_DIR"], "requirements.txt") execute "#{pip_cmd} install -r #{requirements_txt}" do end
  • 60. RECIPES package "libpq-dev" python_virtualenv node[:roster]["VIRTUALENV_DIR"] do     interpreter "python2.7"     action :create end pip_cmd = File.join(node[:roster]["VIRTUALENV_DIR"], "bin", "pip") requirements_txt = File.join(node[:roster]["DEPLOY_DIR"], "requirements.txt") execute "#{pip_cmd} install -r #{requirements_txt}" do end
  • 61. RECIPES package "libpq-dev" python_virtualenv node[:roster]["VIRTUALENV_DIR"] do     interpreter "python2.7"     action :create end pip_cmd = File.join(node[:roster]["VIRTUALENV_DIR"], "bin", "pip") requirements_txt = File.join(node[:roster]["DEPLOY_DIR"], "requirements.txt") execute "#{pip_cmd} install -r #{requirements_txt}" do end
  • 62. RECIPES Install Distro Package package "libpq-dev" python_virtualenv node[:roster]["VIRTUALENV_DIR"] do     interpreter "python2.7"     action :create end pip_cmd = File.join(node[:roster]["VIRTUALENV_DIR"], "bin", "pip") requirements_txt = File.join(node[:roster]["DEPLOY_DIR"], "requirements.txt") execute "#{pip_cmd} install -r #{requirements_txt}" do end
  • 63. RECIPES create virtualenv @ package "libpq-dev" specified path python_virtualenv node[:roster]["VIRTUALENV_DIR"] do     interpreter "python2.7"     action :create end pip_cmd = File.join(node[:roster]["VIRTUALENV_DIR"], "bin", "pip") requirements_txt = File.join(node[:roster]["DEPLOY_DIR"], "requirements.txt") execute "#{pip_cmd} install -r #{requirements_txt}" do end
  • 64. RECIPES some variables package "libpq-dev" and Ruby code python_virtualenv node[:roster]["VIRTUALENV_DIR"] do     interpreter "python2.7"     action :create end pip_cmd = File.join(node[:roster]["VIRTUALENV_DIR"], "bin", "pip") requirements_txt = File.join(node[:roster]["DEPLOY_DIR"], "requirements.txt") execute "#{pip_cmd} install -r #{requirements_txt}" do end
  • 65. RECIPES package "libpq-dev" python_virtualenv node[:roster]["VIRTUALENV_DIR"] do     interpreter "python2.7"     action :create end pip_cmd = File.join(node[:roster]["VIRTUALENV_DIR"], "bin", "pip") requirements_txt = File.join(node[:roster]["DEPLOY_DIR"], "requirements.txt") execute "#{pip_cmd} install -r #{requirements_txt}" do end execute command-line
  • 66. RECIPES package "libpq-dev" python_virtualenv node[:roster]["VIRTUALENV_DIR"] do     interpreter "python2.7"     action :create end pip_cmd = File.join(node[:roster]["VIRTUALENV_DIR"], "bin", "pip") requirements_txt = File.join(node[:roster]["DEPLOY_DIR"], "requirements.txt") execute "#{pip_cmd} install -r #{requirements_txt}" do end
  • 67. COOKBOOKS • Collections of • Attributes • Recipes • Templates Copyright 2012, Nick Barendt
  • 68. TONS OF COOKBOOKS HTTPS://GITHUB.COM/OPSCODE-COOKBOOKS • Java • Erlang • Python • Django • Nagios • Rsyslog • openssh • Nginx • Apache2 • Perl • Postfix • Many, Many More Copyright 2012, Nick Barendt
  • 69. CONVERGENCE • Chef attempts to converge a machine’s configuration to the desired state • Withtemporary errors, repeated runs will drive towards convergence • Resources are (generally) idempotent • Robust • Try, try again
  • 70. HOW DOES THIS ACTUALLY WORK?
  • 71. • Merge Defaults and Node Attributes • Recipe Compilation • Recipe Execution
  • 72.
  • 73. sudo chef-solo -c solo.rb -j solo-configs/standalone.json solo.rb # minimal configuration file for chef-solo cookbook_path File.expand_path File.dirname(__FILE__) + "/cookbooks" standalone.json { "roster": { "app_server": { "load_default_data": true } }, "postgresql": { "password":{ "postgres": "roster_123" } }, "run_list": [ "recipe[roster::database]", "recipe[roster::app_server]" ] }
  • 74. app_server.rb include_recipe "apache2" include_recipe "apache2::mod_wsgi" include_recipe "python" node[:roster]["DEPLOY_DIR"] = File.expand_path( File.join( File.expand_path( File.dirname(__FILE__) ), "..","..","..","..")) node[:roster]["VIRTUALENV_DIR"] = File.expand_path( File.join(node[:roster]["DEPLOY_DIR"], "env")) # disable default, regardless of how it is symlinked apache_site "default" do     enable false end apache_site "000-default" do     enable false end # we need a few packages package "libpq-dev" python_virtualenv node[:roster]["VIRTUALENV_DIR"] do     interpreter "python2.7"     action :create end
  • 75. continued pip_cmd = File.join(node[:roster]["VIRTUALENV_DIR"], "bin", "pip") requirements_txt = File.join(node[:roster]["DEPLOY_DIR"], "requirements.txt") execute "#{pip_cmd} install -r #{requirements_txt}" do end web_app "roster" do     template "roster_apache.conf.erb" end django_admin_cmd = File.join(node[:roster]["DEPLOY_DIR"], "cwru_acm", "manage.py") python_exec = File.join(node[:roster]["VIRTUALENV_DIR"], "bin", "python") execute "#{python_exec} #{django_admin_cmd} syncdb --noinput" do end execute "#{python_exec} #{django_admin_cmd} collectstatic -- noinput" do end execute "#{python_exec} #{django_admin_cmd} loaddata roster some_initial_data" do     only_if {node[:roster][:app_server][:load_default_data]} end
  • 76. database.rb include_recipe "postgresql::client" include_recipe "postgresql::server" r = package "ruby-pg" do   package_name "libpgsql-ruby"   action :nothing end r.run_action(:upgrade) # Snippet from opscode to reload gems require 'rubygems' Gem.clear_paths require "pg" include_recipe "database" postgresql_connection_info = {:host => "127.0.0.1", :port => 5432, :username => 'postgres', :password => node['postgresql']['password']['postgres']} postgresql_database "roster" do     connection postgresql_connection_info     action :create end database_user 'roster' do     connection postgresql_connection_info     password 'spartans'     database_name 'roster'     provider Chef::Provider::Database::PostgresqlUser     action :create end database_user 'roster' do     connection postgresql_connection_info     password 'spartans'     provider Chef::Provider::Database::PostgresqlUser     action :grant end
  • 77. But Wait, There’s More • Parametric Configs. (environments): Dev, Staging, Production • Roles - collect recipes based on how server is used (e.g., Apache2 + Memcache for “front-end”) • Test Driven Infrastructure - Configuration is just code! • Bootstrapping in AWS EC2 and other Clouds • Chef Server, Knife
  • 78. Questions? nick@barendt.com Twitter: @nickbarendt Code From Today: https://github.com/nbarendt/cwru_acm_2012
  • 79. FOR MORE INFO • http://wiki.opscode.com • Fast Start Linux Guide: http://wiki.opscode.com/display/chef/ Fast+Start+Guide • AWSEC2 Bootstrapping: http://wiki.opscode.com/display/chef/ EC2+Bootstrap+Fast+Start+Guide • O’Reilly: Test-Driven Infrastructure with Chef

Hinweis der Redaktion

  1. \n
  2. \n
  3. Agile Software Studio & Coaching\nWeb, Mobile, Embedded Desktop\nCommunity Meetups, GiveCamp\n
  4. What is DevOps?\n\n
  5. traditionally separate teams\nDevelopment - creates software\nOperations - puts it intro production and keeps it running\nfigurative (sometimes literal) wall between \n
  6. Development - creates software\nOperations - puts it intro production and keeps it running\n
  7. portmanteau word capturing the idea of integrated development AND operations\nmates with Agile/Lean principles\nfrequent releases, shorter cycle times\nautomation\n“holistic” view of development and production\n
  8. \n
  9. \n
  10. To make this discussion concrete and practical, we’ll be using a small web application for the examples. \n
  11. using Apache to serve our static content and mod_wsgi to serve our Python Django app\nthere are lots of different deployment options here (nginx, gunicorn, etc.); this is pretty common\nusing postgresql for the Django persistence\n
  12. \n
  13. in our configuration runs as a daemon under Apache\n
  14. we’re using postgresql\n
  15. \n
  16. But often necessary\n
  17. \n
  18. \n
  19. \n
  20. \n
  21. package name == package version\ndjango - the web framework we’re using\npsycopg2 is a Python client interface for postgresql\n\n
  22. \n
  23. \n
  24. editing lots of text files...\n
  25. \n
  26. Now we’re almost ready to actually do something\n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. very simple Dept/Course/Student/Instructor Roster web application\n
  33. \n
  34. can always use your instructions to create a master image that can be “frozen” or bundled\n
  35. \n
  36. \n
  37. actually, a great way to start\n
  38. \n
  39. \n
  40. install the needed packages\nthe script is useful and goes a long way to documenting process\n
  41. \n
  42. \n
  43. sure, you do some horrible shell scripts with sed and awk and such, but really?\n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. we’d like to declare the state of the resource, like a database username, password, and database access, and let someone else figure out how to “make it so!”\n\nthat’s essentially what Chef is\n
  50. very little Ruby experience is required\nothers to be aware of are: cfengine, puppet, and now salt\n
  51. Chef Server (opscode or your own)\n“knife” is a Ruby command-line program\nchef-client runs on your “cluster”\n
  52. really, it looks like this...\nCouchDB\nsolr\nRabbitMQ\n
  53. \n
  54. \n
  55. \n
  56. \n
  57. an instance of a particular machine\nMostly Linux centric, but some Windows support\n
  58. to name just a few\n
  59. \n
  60. resource type of “package”\n
  61. resource name of “libpq-dev”\n
  62. Chef calls yum, apt-get, etc. as appropriate for the platform\n
  63. \n
  64. \n
  65. \n
  66. “executed” top to bottom\n
  67. \n
  68. Yes, they have Django support, but we wouldn’t learn as much from using that\n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. Test Driven Infrastructure book by O’Reilly\n\n
  78. \n
  79. Today’s talk intentionally not a tutorial - lots of fine Chef tutorials out there\n