SlideShare uma empresa Scribd logo
1 de 70
Baixar para ler offline
Introduction to ChefIntroduction to Chef
Andy Hawkins
andy@opscode.com
Me :-)Me :-)
• Solution Architect
• Early cloud platforms
• Roll-my -own automation
• DCA
• Chef!
• Before that; system integration for major
US outsourcer
Chef is an automation platform for developers & systems engineers to continuously
define, build, and manage infrastructure.
CHEF USES:
• Recipes and Cookbooks
that describe Infrastructure as Code.
•Chef enables people to easily build &
manage complex & dynamic applications
at massive scale
•New model for describing infrastructure that
promotes reuse
•Programmatically provision and configure
•Reconstruct business from code repository,
data backup, and bare metal resources
ChefChef
When should I use an automation framework?When should I use an automation framework?
• Now?
• It is always earlier than you think :-)
• Before you suffer configuration drift!
• After you outgrow Heroku?
• When you need to set-up the “third
machine”
Evolving towards an automation frameworkEvolving towards an automation framework
• Just build it
• Keep notes in server.txt
• Move notes to the wiki
• Custom scripts (in scm?!)
• Build from template / Golden Images
• Automation framework
Typical Use CasesTypical Use Cases
See NodeSee Node
Application Server
See NodesSee Nodes
Application Server
Application Database
See Nodes GrowSee Nodes Grow
Application Server
Application Databases
Application Servers
Application Databases
See Nodes GrowSee Nodes Grow
Application Servers
Application Databases
Load Balancer
See Nodes GrowSee Nodes Grow
See Nodes GrowSee Nodes Grow
Application Servers
Application Databases
Load Balancers
See Nodes GrowSee Nodes Grow
Application Servers
Application Database Cache
Load Balancers
Application Databases
Tied together with ConfigTied together with Config
Application Servers
Application Database Cache
Load Balancers
Application Databases
Infrastructure is a SnowflakeInfrastructure is a Snowflake
Application Servers
Application Database Cache
Load Balancers
Floating IP?
Application Databases
Evolving ComplexityEvolving Complexity
Load Balancers
Application Servers
NoSQL
Database
Slaves
ApplicationCache
Database
Cache
Database
Complexity Grows QuicklyComplexity Grows Quickly
Configuration Management
http://www.flickr.com/photos/philliecasablanca/335473411
Golden Images are not the answerGolden Images are not the answer
• Gold is heavy
• Hard to transport
• Hard to mold
• Easy to lose
configuration detail
http://www.flickr.com/photos/garysoup/2977173063/
Jboss App
Memcache
Postgres Slaves
Postgres Master
NagiosGraphite
Typical InfrastructureTypical Infrastructure
Jboss App
Memcache
Postgres Slaves
Postgres Master
NagiosGraphite
• Move SSH off port 22
• Lets put it on 2022
New Compliance Mandate!New Compliance Mandate!
Jboss App
Memcache
Postgres Slaves
Postgres Master
NagiosGraphite
• edit /etc/ssh/sshd_config
1 2
3
4
5
6
6 Golden Image Updates6 Golden Image Updates
Jboss App
Memcache
Postgres Slaves
Postgres Master
NagiosGraphite
• Delete, launch
1 2
3 4 5 6 7
8 9
10 11
12
• Repeat
• Typically manually
12 Instance Replacements12 Instance Replacements
• Don’t break anything!
• Bob just got fired =(
5
Jboss App
Memcache
Postgres Slaves
Postgres Master
NagiosGraphite 1 2
4 5 6 7
8 9
10 11
12
3
Done in Maintenance WindowsDone in Maintenance Windows
Jboss App
Memcache
Postgres Slaves
Postgres Master
NagiosGraphite
• Invalid configs!
Different IP Addresses?Different IP Addresses?
Configuration DesperationConfiguration Desperation
Code Sample
http://www.flickr.com/photos/francoforeshock/5716969942
• But you already
guessed that, didn’t
you?
Chef Solves this ProblemChef Solves this Problem
Chef is Infrastructure as CodeChef is Infrastructure as Code
http://www.flickr.com/photos/louisb/4555295187/
• Programmatically
provision and configure
• Treat like any other code
base
• Reconstruct business from
code repository, data
backup, and bare metal
resources.
• 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/
NodesNodes
Collections of ResourcesCollections of Resources
• Networking
• Files
• Directories
• Symlinks
• Mounts
• Routes
• Users
• Groups
• Tasks
• Packages
• Software
• Services
• Configurations
• Other Stuff
http://www.flickr.com/photos/stevekeys/3123167585/
Declarative Interface to ResourcesDeclarative Interface to Resources
• Define policy
• Say what, not how
• Pull not Push
http://www.flickr.com/photos/bixentro/2591838509/
Ruby!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
chef-client runs on your systems (nodes)
chef abstracts nodes into roles to help you scale
efficiently
chef environments help you to manage the lifecycle
cookbooks are packages for chef and run lists attach
them to nodes
everything is indexed for search
knife is your command line to control chef
chef-client runs on your systems (nodes)
chef abstracts nodes into roles to help you scale
efficiently
chef environments help you to manage the lifecycle
cookbooks are packages for chef and run lists attach
them to nodes
everything is indexed for search
knife is your command line to control chef
Key ConceptsKey Concepts
Recipes and CookbooksRecipes 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/
Recipes and CookbooksRecipes 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/
http://www.flickr.com/photos/kathycsus/2686772625
• IP addresses
• Hostnames
• FQDNs
• Search for when
static config isn’t
enough
• data-driven power
SearchSearch
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 TemplatesPass 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 -%>
Pass Results to TemplatesPass Results to Templates
Jboss App
Memcache
Postgres Slaves
Postgres Master
So when thisSo when this
NagiosGraphite
Jboss App
Memcache
Postgres Slaves
Postgres Master
NagiosGraphite
Becomes thisBecomes this
Jboss App
Memcache
Postgres
Slaves
Postgres Master
NagiosGraphite
Updates can be automaticUpdates can be automatic
NagiosGraphite
Count the resourcesCount the resources
Jboss App
Memcache
Postgres
Slaves
• Load balancer config
• Nagios host ping
• Nagios host ssh
• Nagios host HTTP
• Nagios host app health
• Graphite CPU
• Graphite Memory
• Graphite Disk
• Graphite SNMP
• Memcache firewall
• Postgres firewall
• 12+ resource changes for 1 node addition
Build anythingBuild 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 simplyAnd manage it simply
http://www.flickr.com/photos/helico/404640681/
• Automatically
reconfigure everything
• Linux,Windows,
Unixes, BSDs
• Load balancers
• Metrics collection
systems
• Monitoring systems
• Cloud migrations
become trivial
Code Sample
Landscape of Chef-managed InfrastructureLandscape of Chef-managed Infrastructure
knifeknife
Code Sample
Knife is the command-line tool used by ChefsKnife is the command-line tool used by Chefs
knife with the Chef Serverknife with the Chef Server
• knife node
• create/delete/edit
• list
• knife cookbook ...
• knife role ...
• knife environment ...
knife searchknife search
• What operating systems are running?
• What version of ruby is running?
• How much memory do you have on each
machine?
Ohai!Ohai!
"memory": { "swap": { "cached": "0kB",
"total": "4128760kB", "free": "4128760kB" },
"total": "2055676kB", "free": "1646524kB",
"buffers": "35032kB", "cached": "210276kB",
"active": "125336kB", "inactive": "142884kB",
"dirty": "8kB", "writeback": "0kB", "anon_pages":
"22976kB", "mapped": "8416kB", "slab":
"121512kB", "slab_reclaimable": "41148kB",
"slab_unreclaim": "80364kB", "page_tables":
"1784kB", "nfs_unstable": "0kB", "bounce": "0kB",
"commit_limit": "5156596kB", "committed_as":
"74980kB", "vmalloc_total": "34359738367kB",
"vmalloc_used": "274512kB", "vmalloc_chunk":
"34359449936kB" },
Ohai!Ohai!
"block_device": { "ram0": { "size":
"32768", "removable": "0" },
"ram1": { "size": "32768",
"removable": "0" }, "ram2": {
"size": "32768", "removable": "0"
},
"hostname": "server-1", "fqdn": "server-
1.example.com", "domain":
"example.com", "network": {
"interfaces": { "eth0": { "type":
"eth", "number": "0",
"encapsulation": "Ethernet",
"addresses": { "00:0C:29:43:26:C5":
{ "family": "lladdr" },
"192.168.177.138": { "family":
"inet", "broadcast":
"192.168.177.255", "netmask":
"255.255.255.0" },
"fe80::20c:29ff:fe43:26c5": {
"family": "inet6", "prefixlen": "64",
"scope": "Link" } },
knife searchknife search
knife searchknife search
knife search “*:*” -a platform
knife search “*:*” -a languages.ruby.version
knife search “*:*” -a memory.total
knife sshknife ssh• $ knife ssh "roles:rails-web" "sudo chef-client"
knife bootstrapknife 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 ec2knife 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 openstackknife 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 PortabilityChef for Infrastructure Portability
• knife ec2
• knife rackspace
• knife hp
• knife google
• knife azure
• knife cloudstack
• knife openstack
• knife vsphere
• ... and many others
CommunityCommunity
The Chef CommunityThe Chef Community
• Apache License, Version 2.0
• 1200+ Individual contributors
• 200+ Corporate contributors
• Google, HP, Dell, Rackspace, VMware,
Joyent, Calxeda, Heroku, SUSE and
many more
• 800+ cookbooks
• http://community.opscode.com
How Do I StartHow Do I Start
Learning ChefLearning Chef
•docs.opscode.com
•learnchef.com
•opscode.eventbrite.com
•lists.opscode.com
Your first projectYour first project
• Identify the right project
• a fragile artifact?, something that
causes you issues, a new development?
• be prepared to think outside the box
• challenge the way you do things
• identify what success is (and measure)
• faster, better, lower effort .....
It’s all about peopleIt’s all about people
• Find a sponsor
• Assemble the right team; cross-
department, compatible skill-sets?
• Make change but measure the outcomes
• Collaborate; the job is not done until it is
done
• Learn and improve
#ChefConf 2013#ChefConf 2013
Tex
Yep, we’re hiring!Yep, we’re hiring!
Thanks! Any Questions?Thanks! Any Questions?
Andy Hawkins
andy@opscode.com

Mais conteúdo relacionado

Mais procurados

Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Software, Inc.
 
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
 
Chaione Ember.js Training
Chaione Ember.js TrainingChaione Ember.js Training
Chaione Ember.js Trainingaortbals
 
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Software, Inc.
 
Play Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level OverviewPlay Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level OverviewJosh Padnick
 
Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1Chef
 
Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )Pravin Mishra
 
Opscode-Eucalyptus Webinar 20110721
 Opscode-Eucalyptus Webinar 20110721 Opscode-Eucalyptus Webinar 20110721
Opscode-Eucalyptus Webinar 20110721Chef Software, Inc.
 
Introduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitIntroduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitJennifer Davis
 
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Software, Inc.
 
OpenStack Austin Meetup January 2014: Chef + OpenStack
OpenStack Austin Meetup January 2014: Chef + OpenStackOpenStack Austin Meetup January 2014: Chef + OpenStack
OpenStack Austin Meetup January 2014: Chef + OpenStackMatt Ray
 
Archetype autoplugins
Archetype autopluginsArchetype autoplugins
Archetype autopluginsMark Schaake
 
Velocity 2011 Chef OpenStack Workshop
Velocity 2011 Chef OpenStack WorkshopVelocity 2011 Chef OpenStack Workshop
Velocity 2011 Chef OpenStack WorkshopChef Software, Inc.
 
Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Jennifer Davis
 
Chef for OpenStack: Grizzly Roadmap
Chef for OpenStack: Grizzly RoadmapChef for OpenStack: Grizzly Roadmap
Chef for OpenStack: Grizzly RoadmapMatt Ray
 
Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014Ricard Clau
 
ITP Spacebrew Workshop - Spring 2014
ITP Spacebrew Workshop - Spring 2014ITP Spacebrew Workshop - Spring 2014
ITP Spacebrew Workshop - Spring 2014Brett Renfer
 

Mais procurados (19)

Coscup
CoscupCoscup
Coscup
 
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
 
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
 
Chaione Ember.js Training
Chaione Ember.js TrainingChaione Ember.js Training
Chaione Ember.js Training
 
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of Chef
 
Play Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level OverviewPlay Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level Overview
 
Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1
 
Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )
 
Opscode-Eucalyptus Webinar 20110721
 Opscode-Eucalyptus Webinar 20110721 Opscode-Eucalyptus Webinar 20110721
Opscode-Eucalyptus Webinar 20110721
 
Introduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitIntroduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen Summit
 
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
 
OpenStack Austin Meetup January 2014: Chef + OpenStack
OpenStack Austin Meetup January 2014: Chef + OpenStackOpenStack Austin Meetup January 2014: Chef + OpenStack
OpenStack Austin Meetup January 2014: Chef + OpenStack
 
SCALE 10x Build a Cloud Day
SCALE 10x Build a Cloud DaySCALE 10x Build a Cloud Day
SCALE 10x Build a Cloud Day
 
Archetype autoplugins
Archetype autopluginsArchetype autoplugins
Archetype autoplugins
 
Velocity 2011 Chef OpenStack Workshop
Velocity 2011 Chef OpenStack WorkshopVelocity 2011 Chef OpenStack Workshop
Velocity 2011 Chef OpenStack Workshop
 
Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015
 
Chef for OpenStack: Grizzly Roadmap
Chef for OpenStack: Grizzly RoadmapChef for OpenStack: Grizzly Roadmap
Chef for OpenStack: Grizzly Roadmap
 
Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014Big Data! Great! Now What? #SymfonyCon 2014
Big Data! Great! Now What? #SymfonyCon 2014
 
ITP Spacebrew Workshop - Spring 2014
ITP Spacebrew Workshop - Spring 2014ITP Spacebrew Workshop - Spring 2014
ITP Spacebrew Workshop - Spring 2014
 

Semelhante a OSDC 2013 | Introduction into Chef by Andy Hawkins

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
 
SCALE12X: Chef for OpenStack
SCALE12X: Chef for OpenStackSCALE12X: Chef for OpenStack
SCALE12X: Chef for OpenStackMatt Ray
 
Chef for OpenStack December 2012
Chef for OpenStack December 2012Chef for OpenStack December 2012
Chef for OpenStack December 2012Matt Ray
 
Network Infrastructure as Code with Chef and Cisco
Network Infrastructure as Code with Chef and CiscoNetwork Infrastructure as Code with Chef and Cisco
Network Infrastructure as Code with Chef and CiscoMatt Ray
 
DEVNET-1007 Network Infrastructure as Code with Chef and Cisco
DEVNET-1007	Network Infrastructure as Code with Chef and CiscoDEVNET-1007	Network Infrastructure as Code with Chef and Cisco
DEVNET-1007 Network Infrastructure as Code with Chef and CiscoCisco DevNet
 
201304 chef for open stack overview
201304 chef for open stack overview201304 chef for open stack overview
201304 chef for open stack overviewOpenStack Foundation
 
201304 chef for open stack overview
201304 chef for open stack overview201304 chef for open stack overview
201304 chef for open stack overviewOpenStack Foundation
 
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWSCloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWSAWS Vietnam Community
 
There and Back Again: How We Drank the Chef Kool-Aid, Sobered Up, and Learned...
There and Back Again: How We Drank the Chef Kool-Aid, Sobered Up, and Learned...There and Back Again: How We Drank the Chef Kool-Aid, Sobered Up, and Learned...
There and Back Again: How We Drank the Chef Kool-Aid, Sobered Up, and Learned...Chef
 
habitat at docker bud
habitat at docker budhabitat at docker bud
habitat at docker budMandi Walls
 
Common Challenges in DevOps Change Management
Common Challenges in DevOps Change ManagementCommon Challenges in DevOps Change Management
Common Challenges in DevOps Change ManagementMatt Ray
 
Standardizing and Managing Your Infrastructure - MOSC 2011
Standardizing and Managing Your Infrastructure - MOSC 2011Standardizing and Managing Your Infrastructure - MOSC 2011
Standardizing and Managing Your Infrastructure - MOSC 2011Brian Ritchie
 
Continuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeContinuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeSascha Möllering
 
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...Gaetano Giunta
 
MySQL Infrastructure Testing Automation at GitHub
MySQL Infrastructure Testing Automation at GitHubMySQL Infrastructure Testing Automation at GitHub
MySQL Infrastructure Testing Automation at GitHubIke Walker
 

Semelhante a OSDC 2013 | Introduction into Chef by Andy Hawkins (20)

Chef for OpenStack- Fall 2012.pdf
Chef for OpenStack- Fall 2012.pdfChef for OpenStack- Fall 2012.pdf
Chef for OpenStack- Fall 2012.pdf
 
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
 
OpenStack Deployments with Chef
OpenStack Deployments with ChefOpenStack Deployments with Chef
OpenStack Deployments with Chef
 
SCALE12X: Chef for OpenStack
SCALE12X: Chef for OpenStackSCALE12X: Chef for OpenStack
SCALE12X: Chef for OpenStack
 
Chef For OpenStack Overview
Chef For OpenStack OverviewChef For OpenStack Overview
Chef For OpenStack Overview
 
Chef for OpenStack December 2012
Chef for OpenStack December 2012Chef for OpenStack December 2012
Chef for OpenStack December 2012
 
Network Infrastructure as Code with Chef and Cisco
Network Infrastructure as Code with Chef and CiscoNetwork Infrastructure as Code with Chef and Cisco
Network Infrastructure as Code with Chef and Cisco
 
DEVNET-1007 Network Infrastructure as Code with Chef and Cisco
DEVNET-1007	Network Infrastructure as Code with Chef and CiscoDEVNET-1007	Network Infrastructure as Code with Chef and Cisco
DEVNET-1007 Network Infrastructure as Code with Chef and Cisco
 
201304 chef for open stack overview
201304 chef for open stack overview201304 chef for open stack overview
201304 chef for open stack overview
 
201304 chef for open stack overview
201304 chef for open stack overview201304 chef for open stack overview
201304 chef for open stack overview
 
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWSCloudsolutionday 2016: DevOps workflow with Docker on AWS
Cloudsolutionday 2016: DevOps workflow with Docker on AWS
 
There and Back Again: How We Drank the Chef Kool-Aid, Sobered Up, and Learned...
There and Back Again: How We Drank the Chef Kool-Aid, Sobered Up, and Learned...There and Back Again: How We Drank the Chef Kool-Aid, Sobered Up, and Learned...
There and Back Again: How We Drank the Chef Kool-Aid, Sobered Up, and Learned...
 
habitat at docker bud
habitat at docker budhabitat at docker bud
habitat at docker bud
 
Common Challenges in DevOps Change Management
Common Challenges in DevOps Change ManagementCommon Challenges in DevOps Change Management
Common Challenges in DevOps Change Management
 
Power of Azure Devops
Power of Azure DevopsPower of Azure Devops
Power of Azure Devops
 
Standardizing and Managing Your Infrastructure - MOSC 2011
Standardizing and Managing Your Infrastructure - MOSC 2011Standardizing and Managing Your Infrastructure - MOSC 2011
Standardizing and Managing Your Infrastructure - MOSC 2011
 
Continuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as CodeContinuous Delivery and Infrastructure as Code
Continuous Delivery and Infrastructure as Code
 
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
 
Hosting Ruby Web Apps
Hosting Ruby Web AppsHosting Ruby Web Apps
Hosting Ruby Web Apps
 
MySQL Infrastructure Testing Automation at GitHub
MySQL Infrastructure Testing Automation at GitHubMySQL Infrastructure Testing Automation at GitHub
MySQL Infrastructure Testing Automation at GitHub
 

Último

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 

Último (20)

Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 

OSDC 2013 | Introduction into Chef by Andy Hawkins

  • 1. Introduction to ChefIntroduction to Chef Andy Hawkins andy@opscode.com
  • 2. Me :-)Me :-) • Solution Architect • Early cloud platforms • Roll-my -own automation • DCA • Chef! • Before that; system integration for major US outsourcer
  • 3. Chef is an automation platform for developers & systems engineers to continuously define, build, and manage infrastructure. CHEF USES: • Recipes and Cookbooks that describe Infrastructure as Code. •Chef enables people to easily build & manage complex & dynamic applications at massive scale •New model for describing infrastructure that promotes reuse •Programmatically provision and configure •Reconstruct business from code repository, data backup, and bare metal resources ChefChef
  • 4. When should I use an automation framework?When should I use an automation framework? • Now? • It is always earlier than you think :-) • Before you suffer configuration drift! • After you outgrow Heroku? • When you need to set-up the “third machine”
  • 5. Evolving towards an automation frameworkEvolving towards an automation framework • Just build it • Keep notes in server.txt • Move notes to the wiki • Custom scripts (in scm?!) • Build from template / Golden Images • Automation framework
  • 8. See NodesSee Nodes Application Server Application Database
  • 9. See Nodes GrowSee Nodes Grow Application Server Application Databases
  • 11. Application Servers Application Databases Load Balancer See Nodes GrowSee Nodes Grow
  • 12. See Nodes GrowSee Nodes Grow Application Servers Application Databases Load Balancers
  • 13. See Nodes GrowSee Nodes Grow Application Servers Application Database Cache Load Balancers Application Databases
  • 14. Tied together with ConfigTied together with Config Application Servers Application Database Cache Load Balancers Application Databases
  • 15. Infrastructure is a SnowflakeInfrastructure is a Snowflake Application Servers Application Database Cache Load Balancers Floating IP? Application Databases
  • 16. Evolving ComplexityEvolving Complexity Load Balancers Application Servers NoSQL Database Slaves ApplicationCache Database Cache Database
  • 19. Golden Images are not the answerGolden Images are not the answer • Gold is heavy • Hard to transport • Hard to mold • Easy to lose configuration detail http://www.flickr.com/photos/garysoup/2977173063/
  • 20. Jboss App Memcache Postgres Slaves Postgres Master NagiosGraphite Typical InfrastructureTypical Infrastructure
  • 21. Jboss App Memcache Postgres Slaves Postgres Master NagiosGraphite • Move SSH off port 22 • Lets put it on 2022 New Compliance Mandate!New Compliance Mandate!
  • 22. Jboss App Memcache Postgres Slaves Postgres Master NagiosGraphite • edit /etc/ssh/sshd_config 1 2 3 4 5 6 6 Golden Image Updates6 Golden Image Updates
  • 23. Jboss App Memcache Postgres Slaves Postgres Master NagiosGraphite • Delete, launch 1 2 3 4 5 6 7 8 9 10 11 12 • Repeat • Typically manually 12 Instance Replacements12 Instance Replacements
  • 24. • Don’t break anything! • Bob just got fired =( 5 Jboss App Memcache Postgres Slaves Postgres Master NagiosGraphite 1 2 4 5 6 7 8 9 10 11 12 3 Done in Maintenance WindowsDone in Maintenance Windows
  • 25. Jboss App Memcache Postgres Slaves Postgres Master NagiosGraphite • Invalid configs! Different IP Addresses?Different IP Addresses?
  • 26. Configuration DesperationConfiguration Desperation Code Sample http://www.flickr.com/photos/francoforeshock/5716969942
  • 27. • But you already guessed that, didn’t you? Chef Solves this ProblemChef Solves this Problem
  • 28. Chef is Infrastructure as CodeChef is Infrastructure as Code http://www.flickr.com/photos/louisb/4555295187/ • Programmatically provision and configure • Treat like any other code base • Reconstruct business from code repository, data backup, and bare metal resources.
  • 29. • 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/ NodesNodes
  • 30. Collections of ResourcesCollections of Resources • Networking • Files • Directories • Symlinks • Mounts • Routes • Users • Groups • Tasks • Packages • Software • Services • Configurations • Other Stuff http://www.flickr.com/photos/stevekeys/3123167585/
  • 31. Declarative Interface to ResourcesDeclarative Interface to Resources • Define policy • Say what, not how • Pull not Push http://www.flickr.com/photos/bixentro/2591838509/
  • 32. Ruby!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
  • 33. chef-client runs on your systems (nodes) chef abstracts nodes into roles to help you scale efficiently chef environments help you to manage the lifecycle cookbooks are packages for chef and run lists attach them to nodes everything is indexed for search knife is your command line to control chef chef-client runs on your systems (nodes) chef abstracts nodes into roles to help you scale efficiently chef environments help you to manage the lifecycle cookbooks are packages for chef and run lists attach them to nodes everything is indexed for search knife is your command line to control chef Key ConceptsKey Concepts
  • 34. Recipes and CookbooksRecipes 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/
  • 35. Recipes and CookbooksRecipes 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/
  • 36.
  • 37.
  • 38. http://www.flickr.com/photos/kathycsus/2686772625 • IP addresses • Hostnames • FQDNs • Search for when static config isn’t enough • data-driven power SearchSearch
  • 39. 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 TemplatesPass Results to Templates
  • 40. # 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 -%> Pass Results to TemplatesPass Results to Templates
  • 41. Jboss App Memcache Postgres Slaves Postgres Master So when thisSo when this NagiosGraphite
  • 42. Jboss App Memcache Postgres Slaves Postgres Master NagiosGraphite Becomes thisBecomes this
  • 44. NagiosGraphite Count the resourcesCount the resources Jboss App Memcache Postgres Slaves • Load balancer config • Nagios host ping • Nagios host ssh • Nagios host HTTP • Nagios host app health • Graphite CPU • Graphite Memory • Graphite Disk • Graphite SNMP • Memcache firewall • Postgres firewall • 12+ resource changes for 1 node addition
  • 45. Build anythingBuild 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/
  • 46. And manage it simplyAnd manage it simply http://www.flickr.com/photos/helico/404640681/ • Automatically reconfigure everything • Linux,Windows, Unixes, BSDs • Load balancers • Metrics collection systems • Monitoring systems • Cloud migrations become trivial
  • 47. Code Sample Landscape of Chef-managed InfrastructureLandscape of Chef-managed Infrastructure
  • 49. Code Sample Knife is the command-line tool used by ChefsKnife is the command-line tool used by Chefs
  • 50. knife with the Chef Serverknife with the Chef Server • knife node • create/delete/edit • list • knife cookbook ... • knife role ... • knife environment ...
  • 51. knife searchknife search • What operating systems are running? • What version of ruby is running? • How much memory do you have on each machine?
  • 53. "memory": { "swap": { "cached": "0kB", "total": "4128760kB", "free": "4128760kB" }, "total": "2055676kB", "free": "1646524kB", "buffers": "35032kB", "cached": "210276kB", "active": "125336kB", "inactive": "142884kB", "dirty": "8kB", "writeback": "0kB", "anon_pages": "22976kB", "mapped": "8416kB", "slab": "121512kB", "slab_reclaimable": "41148kB", "slab_unreclaim": "80364kB", "page_tables": "1784kB", "nfs_unstable": "0kB", "bounce": "0kB", "commit_limit": "5156596kB", "committed_as": "74980kB", "vmalloc_total": "34359738367kB", "vmalloc_used": "274512kB", "vmalloc_chunk": "34359449936kB" }, Ohai!Ohai! "block_device": { "ram0": { "size": "32768", "removable": "0" }, "ram1": { "size": "32768", "removable": "0" }, "ram2": { "size": "32768", "removable": "0" }, "hostname": "server-1", "fqdn": "server- 1.example.com", "domain": "example.com", "network": { "interfaces": { "eth0": { "type": "eth", "number": "0", "encapsulation": "Ethernet", "addresses": { "00:0C:29:43:26:C5": { "family": "lladdr" }, "192.168.177.138": { "family": "inet", "broadcast": "192.168.177.255", "netmask": "255.255.255.0" }, "fe80::20c:29ff:fe43:26c5": { "family": "inet6", "prefixlen": "64", "scope": "Link" } },
  • 55. knife searchknife search knife search “*:*” -a platform knife search “*:*” -a languages.ruby.version knife search “*:*” -a memory.total
  • 56. knife sshknife ssh• $ knife ssh "roles:rails-web" "sudo chef-client"
  • 57. knife bootstrapknife 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!
  • 58. knife ec2knife 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]'
  • 59. knife openstackknife 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]'
  • 60. Chef for Infrastructure PortabilityChef for Infrastructure Portability • knife ec2 • knife rackspace • knife hp • knife google • knife azure • knife cloudstack • knife openstack • knife vsphere • ... and many others
  • 62. The Chef CommunityThe Chef Community • Apache License, Version 2.0 • 1200+ Individual contributors • 200+ Corporate contributors • Google, HP, Dell, Rackspace, VMware, Joyent, Calxeda, Heroku, SUSE and many more • 800+ cookbooks • http://community.opscode.com
  • 63. How Do I StartHow Do I Start
  • 65. Your first projectYour first project • Identify the right project • a fragile artifact?, something that causes you issues, a new development? • be prepared to think outside the box • challenge the way you do things • identify what success is (and measure) • faster, better, lower effort .....
  • 66. It’s all about peopleIt’s all about people • Find a sponsor • Assemble the right team; cross- department, compatible skill-sets? • Make change but measure the outcomes • Collaborate; the job is not done until it is done • Learn and improve
  • 67.
  • 69. Yep, we’re hiring!Yep, we’re hiring!
  • 70. Thanks! Any Questions?Thanks! Any Questions? Andy Hawkins andy@opscode.com