SlideShare a Scribd company logo
Achieving Infrastructure Portability
with Chef
        CloudOpen 2012

            Matt Ray
       matt@opscode.com
   IRC/Twitter/GitHub: mattray
       www.opscode.com
Data Centers...
To the Cloud!
Why the Cloud?



• Instant infrastructure
• Unlimited capacity
• Autoscaling
• No commitment
• Immediate replacement
Cloud Differentiation



• Each cloud defines themselves
    against Amazon
•   Entry into the market is easier
•   Not a lot of price competition
•   Feature parity is growing
The Dark Side
 of the Cloud
Why not the Cloud?




• Reliability
• Performance
• Security
• Price
Data Gravity
Know our escape plan
for every infrastructure
       provider
Why Chef?
See Node



Application Server
See Nodes



Application Server


Application Database
See Nodes Grow



Application Server


Application Databases
See Nodes Grow



Application Servers


Application Databases
See Nodes Grow

Load Balancer


Application Servers


Application Databases
See Nodes Grow

Load Balancers


        Application Servers


Application Databases
See Nodes Grow

Load Balancers


        Application Servers


Application Database Cache


Application Databases
Tied together with Config

Load Balancers


        Application Servers


Application Database Cache


Application Databases
Infrastructure is a Snowflake

Load Balancers


         Application Servers


Application Database Cache


Floating IP?


Application Databases
Evolving Complexity



        Load Balancers
              ApplicationCache

                   Application Servers
NoSQL        Database Cache

             Database Slaves

        Database
Complexity Grows Quickly
      DC2


DC1

                      DC3
And it Continues to Evolve

That's great and all,
  but tell me about
        Chef!




                          http://www.flickr.com/photos/16339684@N00/2681435235/
Chef is Infrastructure as Code



        •     Programmatically
              provision and configure
        •     Treat like any other code
              base
        •     Reconstruct business from
              code repository, data
              backup, and bare metal
              resources.


       http://www.flickr.com/photos/louisb/4555295187/
Nodes
  • Chef-Client generates
        configurations directly
        on nodes from their
        run list
  • Reduce management
        complexity through
        abstraction
  • Store the configuration
        of your programs in
        version control

http://www.flickr.com/photos/ssoosay/5126146763/
Collections of Resources

• Networking                                        • Routes
                                                    • Users
• Files                                             • Groups
• Directories                                       • Tasks
• Symlinks                                          • Packages
• Mounts                                            • Software
                                                    • Services
                                                    • Configurations
                                                    • Other Stuff
        http://www.flickr.com/photos/stevekeys/3123167585/
Declarative Interface to Resources




•    Define policy
•    Say what, not how
•    Pull not Push




http://www.flickr.com/photos/bixentro/2591838509/
Ruby!
extra_packages = case node['platform']
  when "ubuntu","debian"
    %w{
      ruby1.8
      ruby1.8-dev
      rdoc1.8
      ri1.8
      libopenssl-ruby
    }
  end
extra_packages.each do |pkg|
  package pkg do
    action :install
  end
end
Recipes and Cookbooks


•   Recipes are collections of
    Resources
•   Cookbooks contain
    recipes, templates, files,
    custom resources, etc
•   Code re-use and
    modularity
•   Hundreds already on
    Community.opscode.com

         http://www.flickr.com/photos/shutterhacks/4474421855/
Search

•   Search for nodes
    with Roles
•   Find configuration
    data

•   IP addresses
•   Hostnames
•   FQDNs




       http://www.flickr.com/photos/kathycsus/2686772625
Pass Results to Templates


pool_members = search("node","role:webserver”)

template "/etc/haproxy/haproxy.cfg" do
  source "haproxy-app_lb.cfg.erb"
  owner "root"
  group "root"
  mode 0644
  variables :pool_members => pool_members.uniq
  notifies :restart, "service[haproxy]"
end
Pass Results to Templates



# Set up application listeners here.
listen application 0.0.0.0:80
  balance roundrobin
  <% @pool_members.each do |member| -%>
  server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check
  <% end -%>
<% if node["haproxy"]["enable_admin"] -%>
listen admin 0.0.0.0:22002
  mode http
  stats uri /
<% end -%>
So when this

Graphite   Nagios


                             Jboss App


           Memcache

           Postgres Slaves


           Postgres Master
Becomes this

Graphite   Nagios


                             Jboss App


           Memcache

           Postgres Slaves


           Postgres Master
Updates can be automatic

Graphite   Nagios


                             Jboss App


           Memcache

           Postgres Slaves


           Postgres Master
Count the resources
                                               •   Load balancer config
              Graphite              Nagios     •   Nagios host ping
                                               •   Nagios host ssh
                             Jboss App         •   Nagios host HTTP
                                               •   Nagios host app health
                             Memcache          •   Graphite CPU
                                               •   Graphite Memory
                             Postgres Slaves   •   Graphite Disk
                                               •   Graphite SNMP
                                               •   Memcache firewall
• 12+ resource changes for 1 node addition     •   Postgres firewall
                                                   Postgres authZ config
Build anything

       • Simple internal applications
       • Complex external applications
       • Workstations
       • Hadoop clusters
       • IaaS infrastructure
       • PaaS infrastructure
       • SaaS applications
       • Storage systems
       • You name it
http://www.flickr.com/photos/hyku/245010680/
And manage it simply
• Automatically
  reconfigure
  everything
• Linux, Windows,
  Unixes, BSDs
• Load balancers
• Metrics collection
  systems
• Monitoring systems
• Cloud migrations
  become trivial
                       http://www.flickr.com/photos/helico/404640681/
knife
knife with the Chef Server




•   knife node
    •   create/delete/edit
    •   list
•   knife cookbook ...
•   knife role ...
•   knife environment ...
knife bootstrap


    knife bootstrap SERVER -r 'role[webserver]' -i ~/.ssh/id_rsa



•   SSH to the machine given existing
    credentials
•   Install the Chef Client
•   Register with the Chef Server
•   Run the initial Run List
•   Now managed with Chef!
knife ec2




$ knife ec2
Available ec2 subcommands: (for details, knife SUB-COMMAND --
help)

** EC2 COMMANDS **
knife ec2 flavor list (options)
knife ec2 instance data (options)
knife ec2 server create (options)
knife ec2 server delete SERVER [SERVER] (options)
knife ec2 server list (options)

$ knife ec2 server create -S keypair -i ~/.ssh/id_rsa -x ubuntu
-I ami-4721882e -f m1.small -r 'role[webserver]'
knife openstack




$ knife openstack
Available openstack subcommands: (for details, knife SUB-
COMMAND --help)

** OPENSTACK COMMANDS **
knife openstack flavor list (options)
knife openstack image list (options)
knife openstack server create (options)
knife openstack server delete SERVER [SERVER] (options)
knife openstack server list (options)

$ knife openstack server create -S keypair -i ~/.ssh/id_rsa
-x ubuntu -I 1231 -f standard.small -r 'role[webserver]'
Chef for Infrastructure Portability




•   knife ec2         •   knife cloudstack
•   knife rackspace   •   knife openstack
•   knife hp          •   knife vsphere
•   knife google      •   ... and many
•   knife azure           others
The Chef Community




•   Apache License, Version 2.0
•   850+ Individual contributors
•   150+ Corporate contributors
    •   HP, Dell, Rackspace, VMware, Joyent,
        Calxeda, Heroku, SUSE and many more
•   550+ cookbooks
•   http://community.opscode.com
Desktop, Virtualization, Private & Public Clouds




•   Vagrant              •   AWS
•   VMware               •   Rackspace
•   CloudStack           •   HP
•   Eucalyptus           •   Google
•   OpenStack            •   Azure
•   bare metal           •   many others
Desktop, Virtualization, Private & Public Clouds




•   Vagrant              •   AWS
•   VMware               •   Rackspace
•   CloudStack           •   HP
•   Eucalyptus           •   Google
•   OpenStack            •   Azure
•   bare metal           •   many others
Tale of the Tape




•   Artur Bergman, CEO at Fastly
    •   It's All About Speed
    •   http://youtu.be/qRnTejOMbZU


•   Jason Stowe, CEO at Cycle Computing
    •   CycleCloud + Chef = 50,000-core Utility
        Supercomputer for Science
    •   http://youtu.be/cEaQB6e7G0Q
Chef and Abstractions




•   Resources and Providers
•   Cookbooks (may) normalize deployment
•   Knife treats APIs the same
•   Chef strives to not be opinionated
Environments




•   Lock down versions of cookbooks
    •   stable releases vs. development
•   Enforce attributes for deployment
    •   Ports, addresses, etc.
•   Different run lists based on environment
    •   Debugging enabled?
Environments




•   Use the same infrastructure code for
    wherever you deploy
•   Development, QA, Pre-Production, Prod
•   Role-based Access Controls to restrict the
    promotion of deployment code
TL;DL




•   Every infrastructure is a unique snowflake
•   Understand the costs associated with the
    features of your platform(s) of choice.
•   Chef enables Infrastructure Portability
•   "Data Gravity" is the primary concern
Thanks!


           Matt Ray
      matt@opscode.com
  IRC/Twitter/GitHub: mattray
      www.opscode.com

More Related Content

PDF
Chef for OpenStack - OpenStack Fall 2012 Summit
PDF
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
PDF
SCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud Infrastructure
PDF
Australian OpenStack User Group August 2012: Chef for OpenStack
KEY
Novalug 07142012
PDF
OSDC 2013 | Introduction into Chef by Andy Hawkins
PDF
Boston/NYC Chef for OpenStack Hack Days
PDF
Chef for OpenStack: Grizzly Roadmap
Chef for OpenStack - OpenStack Fall 2012 Summit
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
SCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud Infrastructure
Australian OpenStack User Group August 2012: Chef for OpenStack
Novalug 07142012
OSDC 2013 | Introduction into Chef by Andy Hawkins
Boston/NYC Chef for OpenStack Hack Days
Chef for OpenStack: Grizzly Roadmap

What's hot (20)

PDF
Chef for OpenStack December 2012
PDF
Chef Fundamentals Training Series Module 1: Overview of Chef
PDF
Play Framework: Intro & High-Level Overview
PPTX
Chef fundamentals
PDF
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
PPTX
Structor - Automated Building of Virtual Hadoop Clusters
PDF
24HOP Introduction to Linux for SQL Server DBAs
PDF
Automated Deployment and Configuration Engines. Ansible
PPTX
Sergey Dzyuban "To Build My Own Cloud with Blackjack…"
PDF
AWS Developer Fundamentals
PDF
Integrated Cache on Netscaler
PPTX
Corley scalability
PPTX
Docker, Mesos, Spark
PDF
#WeSpeakLinux Session
KEY
London devops logging
PPTX
HadoopCon- Trend Micro SPN Hadoop Overview
PPT
Overview of chef ( Infrastructure as a Code )
ODP
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
PDF
HadoopCon2015 Multi-Cluster Live Synchronization with Kerberos Federated Hadoop
Chef for OpenStack December 2012
Chef Fundamentals Training Series Module 1: Overview of Chef
Play Framework: Intro & High-Level Overview
Chef fundamentals
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Structor - Automated Building of Virtual Hadoop Clusters
24HOP Introduction to Linux for SQL Server DBAs
Automated Deployment and Configuration Engines. Ansible
Sergey Dzyuban "To Build My Own Cloud with Blackjack…"
AWS Developer Fundamentals
Integrated Cache on Netscaler
Corley scalability
Docker, Mesos, Spark
#WeSpeakLinux Session
London devops logging
HadoopCon- Trend Micro SPN Hadoop Overview
Overview of chef ( Infrastructure as a Code )
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
HadoopCon2015 Multi-Cluster Live Synchronization with Kerberos Federated Hadoop
Ad

Similar to Achieving Infrastructure Portability with Chef (20)

PDF
OpenStack Deployments with Chef
PDF
Chef for OpenStack- Fall 2012.pdf
PDF
SCALE 10x Build a Cloud Day
PDF
Chef For OpenStack Overview
PDF
IBM InterConnect 2015 - IIB in the Cloud
PDF
201304 chef for open stack overview
PDF
201304 chef for open stack overview
PDF
Chef for OpenStack: OpenStack Spring Summit 2013
PPTX
Why Kubernetes as a container orchestrator is a right choice for running spar...
PDF
Webinar - DreamObjects/Ceph Case Study
PDF
MariaDB on Docker
PDF
TechBeats #2
PDF
SCALE12X: Chef for OpenStack
PDF
Getting Started with MariaDB with Docker
PDF
Velocity 2011 Chef OpenStack Workshop
PDF
Java Night 2010 SteamCannon
PPTX
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
PPTX
Spark volume requirements 2018
PPTX
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
PPTX
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
OpenStack Deployments with Chef
Chef for OpenStack- Fall 2012.pdf
SCALE 10x Build a Cloud Day
Chef For OpenStack Overview
IBM InterConnect 2015 - IIB in the Cloud
201304 chef for open stack overview
201304 chef for open stack overview
Chef for OpenStack: OpenStack Spring Summit 2013
Why Kubernetes as a container orchestrator is a right choice for running spar...
Webinar - DreamObjects/Ceph Case Study
MariaDB on Docker
TechBeats #2
SCALE12X: Chef for OpenStack
Getting Started with MariaDB with Docker
Velocity 2011 Chef OpenStack Workshop
Java Night 2010 SteamCannon
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Spark volume requirements 2018
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Ad

More from Matt Ray (20)

PDF
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
PDF
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
PDF
SCaLE 20X: Kubernetes Cloud Cost Monitoring with OpenCost & Optimization Stra...
PDF
HashiTalks 2020 - Chef Tools & Terraform: Better Together
PDF
EmacsConf 2019: Interactive Remote Debugging and Development with TRAMP Mode
PDF
Wellington DevOps: Bringing Your Applications into the Future with Habitat
PDF
DevOps Days Singapore 2018 Ignite - Bringing Your Applications into the Futur...
PDF
Cloud Expo Asia 20181010 - Bringing Your Applications into the Future with Ha...
PDF
Compliance as Code Everywhere
PDF
DevOpsDays Jakarta: State of DevOps 2018
PDF
DevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
PDF
Infrastructure and Compliance Delight with Chef Automate
PDF
Cooking Up Windows with Chef Automate
PDF
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
PDF
DevOpsDays Singapore Habitat Ignite
PDF
Chef Automate - Azure Sydney User Group
PDF
Automating Compliance with InSpec - AWS North Sydney
PDF
Automating Applications with Habitat - Sydney Cloud Native Meetup
PDF
Automating AWS Compliance with InSpec
PDF
Chef Automate - Infracoders Canberra August 8, 2017
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
SCaLE 20X: Kubernetes Cloud Cost Monitoring with OpenCost & Optimization Stra...
HashiTalks 2020 - Chef Tools & Terraform: Better Together
EmacsConf 2019: Interactive Remote Debugging and Development with TRAMP Mode
Wellington DevOps: Bringing Your Applications into the Future with Habitat
DevOps Days Singapore 2018 Ignite - Bringing Your Applications into the Futur...
Cloud Expo Asia 20181010 - Bringing Your Applications into the Future with Ha...
Compliance as Code Everywhere
DevOpsDays Jakarta: State of DevOps 2018
DevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
Infrastructure and Compliance Delight with Chef Automate
Cooking Up Windows with Chef Automate
DevOpsDays Singapore - Continuous Auditing with Compliance as Code
DevOpsDays Singapore Habitat Ignite
Chef Automate - Azure Sydney User Group
Automating Compliance with InSpec - AWS North Sydney
Automating Applications with Habitat - Sydney Cloud Native Meetup
Automating AWS Compliance with InSpec
Chef Automate - Infracoders Canberra August 8, 2017

Recently uploaded (20)

PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Modernizing your data center with Dell and AMD
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
cuic standard and advanced reporting.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Empathic Computing: Creating Shared Understanding
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
Unlocking AI with Model Context Protocol (MCP)
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Modernizing your data center with Dell and AMD
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Spectral efficient network and resource selection model in 5G networks
Reach Out and Touch Someone: Haptics and Empathic Computing
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
NewMind AI Monthly Chronicles - July 2025
Per capita expenditure prediction using model stacking based on satellite ima...
cuic standard and advanced reporting.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Empathic Computing: Creating Shared Understanding
MYSQL Presentation for SQL database connectivity
Dropbox Q2 2025 Financial Results & Investor Presentation

Achieving Infrastructure Portability with Chef

  • 1. Achieving Infrastructure Portability with Chef CloudOpen 2012 Matt Ray matt@opscode.com IRC/Twitter/GitHub: mattray www.opscode.com
  • 4. Why the Cloud? • Instant infrastructure • Unlimited capacity • Autoscaling • No commitment • Immediate replacement
  • 5. Cloud Differentiation • Each cloud defines themselves against Amazon • Entry into the market is easier • Not a lot of price competition • Feature parity is growing
  • 6. The Dark Side of the Cloud
  • 7. Why not the Cloud? • Reliability • Performance • Security • Price
  • 9. Know our escape plan for every infrastructure provider
  • 13. See Nodes Grow Application Server Application Databases
  • 14. See Nodes Grow Application Servers Application Databases
  • 15. See Nodes Grow Load Balancer Application Servers Application Databases
  • 16. See Nodes Grow Load Balancers Application Servers Application Databases
  • 17. See Nodes Grow Load Balancers Application Servers Application Database Cache Application Databases
  • 18. Tied together with Config Load Balancers Application Servers Application Database Cache Application Databases
  • 19. Infrastructure is a Snowflake Load Balancers Application Servers Application Database Cache Floating IP? Application Databases
  • 20. Evolving Complexity Load Balancers ApplicationCache Application Servers NoSQL Database Cache Database Slaves Database
  • 22. And it Continues to Evolve That's great and all, but tell me about Chef! http://www.flickr.com/photos/16339684@N00/2681435235/
  • 23. Chef is Infrastructure as Code • Programmatically provision and configure • Treat like any other code base • Reconstruct business from code repository, data backup, and bare metal resources. http://www.flickr.com/photos/louisb/4555295187/
  • 24. Nodes • Chef-Client generates configurations directly on nodes from their run list • Reduce management complexity through abstraction • Store the configuration of your programs in version control http://www.flickr.com/photos/ssoosay/5126146763/
  • 25. Collections of Resources • Networking • Routes • Users • Files • Groups • Directories • Tasks • Symlinks • Packages • Mounts • Software • Services • Configurations • Other Stuff http://www.flickr.com/photos/stevekeys/3123167585/
  • 26. Declarative Interface to Resources • Define policy • Say what, not how • Pull not Push http://www.flickr.com/photos/bixentro/2591838509/
  • 27. Ruby! extra_packages = case node['platform'] when "ubuntu","debian" %w{ ruby1.8 ruby1.8-dev rdoc1.8 ri1.8 libopenssl-ruby } end extra_packages.each do |pkg| package pkg do action :install end end
  • 28. Recipes and Cookbooks • Recipes are collections of Resources • Cookbooks contain recipes, templates, files, custom resources, etc • Code re-use and modularity • Hundreds already on Community.opscode.com http://www.flickr.com/photos/shutterhacks/4474421855/
  • 29. Search • Search for nodes with Roles • Find configuration data • IP addresses • Hostnames • FQDNs http://www.flickr.com/photos/kathycsus/2686772625
  • 30. Pass Results to Templates pool_members = search("node","role:webserver”) template "/etc/haproxy/haproxy.cfg" do source "haproxy-app_lb.cfg.erb" owner "root" group "root" mode 0644 variables :pool_members => pool_members.uniq notifies :restart, "service[haproxy]" end
  • 31. Pass Results to Templates # Set up application listeners here. listen application 0.0.0.0:80 balance roundrobin <% @pool_members.each do |member| -%> server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check <% end -%> <% if node["haproxy"]["enable_admin"] -%> listen admin 0.0.0.0:22002 mode http stats uri / <% end -%>
  • 32. So when this Graphite Nagios Jboss App Memcache Postgres Slaves Postgres Master
  • 33. Becomes this Graphite Nagios Jboss App Memcache Postgres Slaves Postgres Master
  • 34. Updates can be automatic Graphite Nagios Jboss App Memcache Postgres Slaves Postgres Master
  • 35. Count the resources • Load balancer config Graphite Nagios • Nagios host ping • Nagios host ssh Jboss App • Nagios host HTTP • Nagios host app health Memcache • Graphite CPU • Graphite Memory Postgres Slaves • Graphite Disk • Graphite SNMP • Memcache firewall • 12+ resource changes for 1 node addition • Postgres firewall Postgres authZ config
  • 36. Build anything • Simple internal applications • Complex external applications • Workstations • Hadoop clusters • IaaS infrastructure • PaaS infrastructure • SaaS applications • Storage systems • You name it http://www.flickr.com/photos/hyku/245010680/
  • 37. And manage it simply • Automatically reconfigure everything • Linux, Windows, Unixes, BSDs • Load balancers • Metrics collection systems • Monitoring systems • Cloud migrations become trivial http://www.flickr.com/photos/helico/404640681/
  • 38. knife
  • 39. knife with the Chef Server • knife node • create/delete/edit • list • knife cookbook ... • knife role ... • knife environment ...
  • 40. knife bootstrap knife bootstrap SERVER -r 'role[webserver]' -i ~/.ssh/id_rsa • SSH to the machine given existing credentials • Install the Chef Client • Register with the Chef Server • Run the initial Run List • Now managed with Chef!
  • 41. knife ec2 $ knife ec2 Available ec2 subcommands: (for details, knife SUB-COMMAND -- help) ** EC2 COMMANDS ** knife ec2 flavor list (options) knife ec2 instance data (options) knife ec2 server create (options) knife ec2 server delete SERVER [SERVER] (options) knife ec2 server list (options) $ knife ec2 server create -S keypair -i ~/.ssh/id_rsa -x ubuntu -I ami-4721882e -f m1.small -r 'role[webserver]'
  • 42. knife openstack $ knife openstack Available openstack subcommands: (for details, knife SUB- COMMAND --help) ** OPENSTACK COMMANDS ** knife openstack flavor list (options) knife openstack image list (options) knife openstack server create (options) knife openstack server delete SERVER [SERVER] (options) knife openstack server list (options) $ knife openstack server create -S keypair -i ~/.ssh/id_rsa -x ubuntu -I 1231 -f standard.small -r 'role[webserver]'
  • 43. Chef for Infrastructure Portability • knife ec2 • knife cloudstack • knife rackspace • knife openstack • knife hp • knife vsphere • knife google • ... and many • knife azure others
  • 44. The Chef Community • Apache License, Version 2.0 • 850+ Individual contributors • 150+ Corporate contributors • HP, Dell, Rackspace, VMware, Joyent, Calxeda, Heroku, SUSE and many more • 550+ cookbooks • http://community.opscode.com
  • 45. Desktop, Virtualization, Private & Public Clouds • Vagrant • AWS • VMware • Rackspace • CloudStack • HP • Eucalyptus • Google • OpenStack • Azure • bare metal • many others
  • 46. Desktop, Virtualization, Private & Public Clouds • Vagrant • AWS • VMware • Rackspace • CloudStack • HP • Eucalyptus • Google • OpenStack • Azure • bare metal • many others
  • 47. Tale of the Tape • Artur Bergman, CEO at Fastly • It's All About Speed • http://youtu.be/qRnTejOMbZU • Jason Stowe, CEO at Cycle Computing • CycleCloud + Chef = 50,000-core Utility Supercomputer for Science • http://youtu.be/cEaQB6e7G0Q
  • 48. Chef and Abstractions • Resources and Providers • Cookbooks (may) normalize deployment • Knife treats APIs the same • Chef strives to not be opinionated
  • 49. Environments • Lock down versions of cookbooks • stable releases vs. development • Enforce attributes for deployment • Ports, addresses, etc. • Different run lists based on environment • Debugging enabled?
  • 50. Environments • Use the same infrastructure code for wherever you deploy • Development, QA, Pre-Production, Prod • Role-based Access Controls to restrict the promotion of deployment code
  • 51. TL;DL • Every infrastructure is a unique snowflake • Understand the costs associated with the features of your platform(s) of choice. • Chef enables Infrastructure Portability • "Data Gravity" is the primary concern
  • 52. Thanks! Matt Ray matt@opscode.com IRC/Twitter/GitHub: mattray www.opscode.com