SlideShare une entreprise Scribd logo
1  sur  69
Télécharger pour lire hors ligne
Introduction to Infrastructure as
Code & Automation / Introduction to
Chef
Ned Harris, Solution Architect
Chef
http://www.flickr.com/photos/michaelheiss/3090102907/
Complexity
Managing Complexity
•  SSH, make with the typey typey
Managing Complexity
•  SSH, make with the typey typey
•  Keep notes in ~/server.txt
Managing Complexity
•  SSH, make with the typey typey
•  Keep notes in ~/server.txt
•  Move notes to the wiki
Managing Complexity
•  SSH, make with the typey typey
•  Keep notes in ~/server.txt
•  Move notes to the wiki
•  Custom scripts (setup.sh)
Managing Complexity
•  SSH, make with the typey typey
•  Keep notes in ~/server.txt
•  Move notes to the wiki
•  Custom scripts (setup.sh)
•  Golden Images
Golden 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/
Typical Infrastructure
Memcache
Postgres Slaves
Postgres Master
NagiosGraphite
Jboss App
New Compliance Mandate!
Jboss App
Memcache
Postgres Slaves
Postgres Master
NagiosGraphite
• Move SSH off port 22
• Lets put it on 2022
6 Golden Image Updates
Jboss App
Memcache
Postgres Slaves
Postgres Master
NagiosGraphite
• edit /etc/ssh/sshd_config
1 2
3
4
5
6
12 Instance Replacements
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
Done in Maintenance Windows
• 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
12
Different IP Addresses?
Jboss App
Memcache
Postgres Slaves
Postgres Master
NagiosGraphite
• Invalid configs!
Managing Complexity
•  SSH, make with the typey typey
•  Keep notes in ~/server.txt
•  Move notes to the wiki
•  Custom scripts (setup.sh)
•  Golden Images
•  Policy-driven configuration management
Policies
•  Declarations about the state of thing in a system
•  applied repeatedly and repair the system when needed
•  often change
Repeatable Operations
•  Idempotent
•  can be applied an infinite number of times and yield the same result every time
•  Convergent
•  test state and repair if needed
Policy Evolves
Following Policy
•  A control loop keeps the system stable and allows for change when policy is
updated
Policy Evolves
That's great and all, !
but tell me about !
Chef!!
What is Chef?
•  Framework for managing complexity
•  Infrastructure as code
•  a domain-specific language (DSL) for describing convergent operations
•  A community of professionals
•  A company
The Chef Software Platform
Chef
Development Kit
Cookbook and
Policy Authoring
Test-Driven
Infrastructure
Chef Server
Management
Console
Analytics
Platform
High Availability
and Replication
Chef
Client
Nodes
Data
Center
The
Cloud
How does Chef work?
•  Ensure desired state by continually testing and repairing individual resources in
the system
•  Compose policies using a series of abstractions
Desired Configuration
Node
Chef Server
What policy should I follow?
Desired Configuration
Node
Chef Server
What policy should I follow?
"recipe[ntp::client]"
"recipe[users]"
"role[webserver]"
Desired Configuration
Chef Server
What policy should I follow?
"recipe[ntp::client]"
"recipe[users]"
"role[webserver]"
Recipes
package "apache2"resource one
Recipes
package "apache2"
template "/etc/apache2/apache2.conf" do
source "apache2.conf.erb"
owner "root"
group "root"
mode "0644"
variables(:allow_override => "All")
notifies :reload, "service[apache2]"
end
resource one
resource two
Recipes
package "apache2"
template "/etc/apache2/apache2.conf" do
source "apache2.conf.erb"
owner "root"
group "root"
mode "0644"
variables(:allow_override => "All")
notifies :reload, "service[apache2]"
end
service "apache2" do
action [:enable,:start]
supports :reload => true
end
resource one
resource two
resource three
Recipes
resource one
Recipes
resource one
resource two
Recipes
resource one
resource two
resource three
Built-in Resources
• package
• template
• service
• cron
• directory
• mount
• user
• group
• registry_key
• remote_directory
• route
• ...and many more!
Managing Complexity
•  Organizations
•  Environments
•  Roles
•  Nodes
•  Recipes
•  Cookbooks
•  Search
•  Data
Their Infrastructure
Organizations
My Infrastructure Your Infrastructure
Environments
Development Staging Production
Roles
Load Balancers
Application Servers
DB Cache
Database
Nodes
Search
•  Search for nodes with Roles
•  Find Topology Data
•  IP addresses
•  Hostnames
•  FQDNs
http://www.flickr.com/photos/kathycsus/2686740
Search for Nodes
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	
  
Webservers
HAProxy Configuration
HA Proxy
Webservers
HAProxy Load Balancer
HA ProxyEnterprise
Chef
pool_members =
search("node","role:webserver")
Webservers
HAProxy Load Balancer
HA ProxyEnterprise
Chef
Webservers?
pool_members =
search("node","role:webserver")
Webservers
HAProxy Load Balancer
HA ProxyEnterprise
Chef
Webservers?
pool_members =
search("node","role:webserver")
Webservers
HAProxy Load Balancer
HA ProxyEnterprise
Chef
Webservers?
pool_members =
search("node","role:webserver")
{
"web01" : {
"hostname" : "web01",
"ipaddress" : "10.1.1.1"
},
"web02" : {
"hostname" : "web02",
"ipaddress" : "10.1.1.2"
},
"web03" : {
"hostname" : "web03",
"ipaddress" : "10.1.1.3"
},
"web04" : {
"hostname" : "web04",
"ipaddress" : "10.1.1.4"
},
"web05" : {
"hostname" : "web05",
"ipaddress" : "10.1.1.5"
},
"web06" : {
"hostname" : "web06",
"ipaddress" : "10.1.1.6"
}
}
Webservers
HAProxy Load Balancer
HA ProxyEnterprise
Chef
Webservers?
pool_members =
search("node","role:webserver")
{
"web01" : {
"hostname" : "web01",
"ipaddress" : "10.1.1.1"
},
"web02" : {
"hostname" : "web02",
"ipaddress" : "10.1.1.2"
},
"web03" : {
"hostname" : "web03",
"ipaddress" : "10.1.1.3"
},
"web04" : {
"hostname" : "web04",
"ipaddress" : "10.1.1.4"
},
"web05" : {
"hostname" : "web05",
"ipaddress" : "10.1.1.5"
},
"web06" : {
"hostname" : "web06",
"ipaddress" : "10.1.1.6"
}
}
Webservers
HAProxy Load Balancer
HA ProxyEnterprise
Chef
Webservers?
pool_members =
search("node","role:webserver")
{
"web01" : {
"hostname" : "web01",
"ipaddress" : "10.1.1.1"
},
"web02" : {
"hostname" : "web02",
"ipaddress" : "10.1.1.2"
},
"web03" : {
"hostname" : "web03",
"ipaddress" : "10.1.1.3"
},
"web04" : {
"hostname" : "web04",
"ipaddress" : "10.1.1.4"
},
"web05" : {
"hostname" : "web05",
"ipaddress" : "10.1.1.5"
},
"web06" : {
"hostname" : "web06",
"ipaddress" : "10.1.1.6"
}
}
pool_members
{
"web01" : {
"hostname" : "web01",
"ipaddress" : "10.1.1.1"
},
"web02" : {
"hostname" : "web02",
"ipaddress" : "10.1.1.2"
},
"web03" : {
"hostname" : "web03",
"ipaddress" : "10.1.1.3"
},
"web04" : {
"hostname" : "web04",
"ipaddress" : "10.1.1.4"
},
"web05" : {
"hostname" : "web05",
"ipaddress" : "10.1.1.5"
},
"web06" : {
"hostname" : "web06",
"ipaddress" : "10.1.1.6"
}
}
Search for Nodes
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 into 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	
  -­‐%>	
  
Webservers
HAProxy Configuration
HA Proxypool_members
{
"web01" : {
"hostname" : "web01",
"ipaddress" : "10.1.1.1"
},
"web02" : {
"hostname" : "web02",
"ipaddress" : "10.1.1.2"
},
"web03" : {
"hostname" : "web03",
"ipaddress" : "10.1.1.3"
},
"web04" : {
"hostname" : "web04",
"ipaddress" : "10.1.1.4"
},
"web05" : {
"hostname" : "web05",
"ipaddress" : "10.1.1.5"
},
"web06" : {
"hostname" : "web06",
"ipaddress" : "10.1.1.6"
}
}
<% @pool_members.each do |member| -%>
server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check
<% end -%>
Webservers
HAProxy Configuration
HA Proxy
<% @pool_members.each do |member| -%>
server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check
<% end -%>
pool_members
{
"web01" : {
"hostname" : "web01",
"ipaddress" : "10.1.1.1"
},
"web02" : {
"hostname" : "web02",
"ipaddress" : "10.1.1.2"
},
"web03" : {
"hostname" : "web03",
"ipaddress" : "10.1.1.3"
},
"web04" : {
"hostname" : "web04",
"ipaddress" : "10.1.1.4"
},
"web05" : {
"hostname" : "web05",
"ipaddress" : "10.1.1.5"
},
"web06" : {
"hostname" : "web06",
"ipaddress" : "10.1.1.6"
}
}
haproxy.cfg
server web01 10.1.1.1 weight 1 maxconn 1 check
Webservers
HAProxy Configuration
HA Proxy
<% @pool_members.each do |member| -%>
server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check
<% end -%>
pool_members
{
"web01" : {
"hostname" : "web01",
"ipaddress" : "10.1.1.1"
},
"web02" : {
"hostname" : "web02",
"ipaddress" : "10.1.1.2"
},
"web03" : {
"hostname" : "web03",
"ipaddress" : "10.1.1.3"
},
"web04" : {
"hostname" : "web04",
"ipaddress" : "10.1.1.4"
},
"web05" : {
"hostname" : "web05",
"ipaddress" : "10.1.1.5"
},
"web06" : {
"hostname" : "web06",
"ipaddress" : "10.1.1.6"
}
}
haproxy.cfg
server web01 10.1.1.1 weight 1 maxconn 1 check
server web02 10.1.1.2 weight 1 maxconn 1 check
Webservers
HAProxy Configuration
HA Proxy
<% @pool_members.each do |member| -%>
server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check
<% end -%>
pool_members
{
"web01" : {
"hostname" : "web01",
"ipaddress" : "10.1.1.1"
},
"web02" : {
"hostname" : "web02",
"ipaddress" : "10.1.1.2"
},
"web03" : {
"hostname" : "web03",
"ipaddress" : "10.1.1.3"
},
"web04" : {
"hostname" : "web04",
"ipaddress" : "10.1.1.4"
},
"web05" : {
"hostname" : "web05",
"ipaddress" : "10.1.1.5"
},
"web06" : {
"hostname" : "web06",
"ipaddress" : "10.1.1.6"
}
}
haproxy.cfg
server web01 10.1.1.1 weight 1 maxconn 1 check
server web02 10.1.1.2 weight 1 maxconn 1 check
server web03 10.1.1.3 weight 1 maxconn 1 check
Webservers
HAProxy Configuration
HA Proxy
<% @pool_members.each do |member| -%>
server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check
<% end -%>
pool_members
{
"web01" : {
"hostname" : "web01",
"ipaddress" : "10.1.1.1"
},
"web02" : {
"hostname" : "web02",
"ipaddress" : "10.1.1.2"
},
"web03" : {
"hostname" : "web03",
"ipaddress" : "10.1.1.3"
},
"web04" : {
"hostname" : "web04",
"ipaddress" : "10.1.1.4"
},
"web05" : {
"hostname" : "web05",
"ipaddress" : "10.1.1.5"
},
"web06" : {
"hostname" : "web06",
"ipaddress" : "10.1.1.6"
}
}
haproxy.cfg
server web01 10.1.1.1 weight 1 maxconn 1 check
server web02 10.1.1.2 weight 1 maxconn 1 check
server web03 10.1.1.3 weight 1 maxconn 1 check
server web04 10.1.1.4 weight 1 maxconn 1 check
Webservers
HAProxy Configuration
HA Proxy
<% @pool_members.each do |member| -%>
server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check
<% end -%>
pool_members
{
"web01" : {
"hostname" : "web01",
"ipaddress" : "10.1.1.1"
},
"web02" : {
"hostname" : "web02",
"ipaddress" : "10.1.1.2"
},
"web03" : {
"hostname" : "web03",
"ipaddress" : "10.1.1.3"
},
"web04" : {
"hostname" : "web04",
"ipaddress" : "10.1.1.4"
},
"web05" : {
"hostname" : "web05",
"ipaddress" : "10.1.1.5"
},
"web06" : {
"hostname" : "web06",
"ipaddress" : "10.1.1.6"
}
}
haproxy.cfg
server web01 10.1.1.1 weight 1 maxconn 1 check
server web02 10.1.1.2 weight 1 maxconn 1 check
server web03 10.1.1.3 weight 1 maxconn 1 check
server web04 10.1.1.4 weight 1 maxconn 1 check
server web05 10.1.1.5 weight 1 maxconn 1 check
Webservers
HAProxy Configuration
HA Proxy
<% @pool_members.each do |member| -%>
server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check
<% end -%>
haproxy.cfg
server web01 10.1.1.1 weight 1 maxconn 1 check
server web02 10.1.1.2 weight 1 maxconn 1 check
server web03 10.1.1.3 weight 1 maxconn 1 check
server web04 10.1.1.4 weight 1 maxconn 1 check
server web05 10.1.1.5 weight 1 maxconn 1 check
server web06 10.1.1.1 weight 1 maxconn 1 check
pool_members
{
"web01" : {
"hostname" : "web01",
"ipaddress" : "10.1.1.1"
},
"web02" : {
"hostname" : "web02",
"ipaddress" : "10.1.1.2"
},
"web03" : {
"hostname" : "web03",
"ipaddress" : "10.1.1.3"
},
"web04" : {
"hostname" : "web04",
"ipaddress" : "10.1.1.4"
},
"web05" : {
"hostname" : "web05",
"ipaddress" : "10.1.1.5"
},
"web06" : {
"hostname" : "web06",
"ipaddress" : "10.1.1.6"
}
}
So when this…
Jboss App
Memcache
Postgres Slaves
Postgres Master
NagiosGraphite
…becomes this…
Jboss App
Memcache
Postgres Slaves
Postgres Master
NagiosGraphite
…this can happen automaticaly!
Memcache
Postgres Slaves
Postgres Master
NagiosGraphite
Jboss App
Memcache
Postgres Slaves
Postgres Master
NagiosGraphite
Count the resources
NagiosGraphite NagiosGraphite
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
•  Postgres authZ config
• 12+ resource changes for 1 node addition
Jboss App
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/
ChefDK
Increase CHEF adoption through ChefDK
●  ChefDK: CHEF Software Development Kit, fully
supported with the Chef Premium Subscription
●  Workflow Definition: Our recommendation on the
process to test and verify your infrastructure code
before committing it to source control and shipping
it to production.
●  Workflow Enhancement: Based on customer
feedback and use cases
ChefDK: In the Box
First Class Support on Windows, Linux, and
OSX for the entire suite of Chef development
tools
●  Test Kitchen: Virtualized testing harness
●  Berkshelf: Dependency solver
●  Chef-Vault: Secrets management
●  Rubocop / Foodcritic: Code linting
●  Chefspec: In-memory Unit Testing
●  Chef.bin: New wrapper binary to tie it all
together, with new extensible cookbook
generators.
The Chef workflow
Create new
skeleton
cookbook.
Create a VM
environment for
cookbook
development.
Write/debug
cookbook
recipes
(iterative step).
Perform
acceptance
tests.
Deploy to
production.
Questions?
Introduction to Chef

Contenu connexe

Tendances

Altitude SF 2017: Debugging Fastly VCL 101
Altitude SF 2017: Debugging Fastly VCL 101Altitude SF 2017: Debugging Fastly VCL 101
Altitude SF 2017: Debugging Fastly VCL 101Fastly
 
Tips for going fast in a slow world: Michael May at OSCON 2015
Tips for going fast in a slow world: Michael May at OSCON 2015Tips for going fast in a slow world: Michael May at OSCON 2015
Tips for going fast in a slow world: Michael May at OSCON 2015Fastly
 
Rails Caching Secrets from the Edge
Rails Caching Secrets from the EdgeRails Caching Secrets from the Edge
Rails Caching Secrets from the EdgeMichael May
 
Chef Actions: Delightful near real-time activity tracking!
Chef Actions: Delightful near real-time activity tracking!Chef Actions: Delightful near real-time activity tracking!
Chef Actions: Delightful near real-time activity tracking!James Casey
 
Building a better web
Building a better webBuilding a better web
Building a better webFastly
 
Chef at WebMD
Chef at WebMDChef at WebMD
Chef at WebMDadamleff
 
WordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngineWordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngineNGINX, Inc.
 
NLIT 2011: Chef & Capistrano
NLIT 2011: Chef & CapistranoNLIT 2011: Chef & Capistrano
NLIT 2011: Chef & Capistranonickblah
 
Meetup bangalore aug31st2019
Meetup bangalore aug31st2019Meetup bangalore aug31st2019
Meetup bangalore aug31st2019D.Rajesh Kumar
 
Meetup bangalore 9_novupdated
Meetup bangalore 9_novupdatedMeetup bangalore 9_novupdated
Meetup bangalore 9_novupdatedD.Rajesh Kumar
 
Unlocked Nov 2013: Main Slide Pack
Unlocked Nov 2013: Main Slide PackUnlocked Nov 2013: Main Slide Pack
Unlocked Nov 2013: Main Slide PackRackspace Academy
 
I can't believe it's not a queue: Kafka and Spring
I can't believe it's not a queue: Kafka and SpringI can't believe it's not a queue: Kafka and Spring
I can't believe it's not a queue: Kafka and SpringJoe Kutner
 
Automated release management with team city & octopusdeploy - NDC 2013
Automated release management with team city & octopusdeploy - NDC 2013Automated release management with team city & octopusdeploy - NDC 2013
Automated release management with team city & octopusdeploy - NDC 2013Kristoffer Deinoff
 
Choosing a Javascript Framework
Choosing a Javascript FrameworkChoosing a Javascript Framework
Choosing a Javascript FrameworkAll Things Open
 
NGINX 101 - now with more Docker
NGINX 101 - now with more DockerNGINX 101 - now with more Docker
NGINX 101 - now with more DockerSarah Novotny
 
Apache Camel: Jetty Component With Example
Apache Camel: Jetty Component With ExampleApache Camel: Jetty Component With Example
Apache Camel: Jetty Component With ExampleAmit Aggarwal
 
So I Wrote a Manifest
So I Wrote a ManifestSo I Wrote a Manifest
So I Wrote a ManifestPuppet
 

Tendances (19)

Altitude SF 2017: Debugging Fastly VCL 101
Altitude SF 2017: Debugging Fastly VCL 101Altitude SF 2017: Debugging Fastly VCL 101
Altitude SF 2017: Debugging Fastly VCL 101
 
Tips for going fast in a slow world: Michael May at OSCON 2015
Tips for going fast in a slow world: Michael May at OSCON 2015Tips for going fast in a slow world: Michael May at OSCON 2015
Tips for going fast in a slow world: Michael May at OSCON 2015
 
Rails Caching Secrets from the Edge
Rails Caching Secrets from the EdgeRails Caching Secrets from the Edge
Rails Caching Secrets from the Edge
 
Chef Actions: Delightful near real-time activity tracking!
Chef Actions: Delightful near real-time activity tracking!Chef Actions: Delightful near real-time activity tracking!
Chef Actions: Delightful near real-time activity tracking!
 
Building a better web
Building a better webBuilding a better web
Building a better web
 
Chef at WebMD
Chef at WebMDChef at WebMD
Chef at WebMD
 
WordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngineWordPress + NGINX Best Practices with EasyEngine
WordPress + NGINX Best Practices with EasyEngine
 
Rebooting a Cloud
Rebooting a CloudRebooting a Cloud
Rebooting a Cloud
 
NLIT 2011: Chef & Capistrano
NLIT 2011: Chef & CapistranoNLIT 2011: Chef & Capistrano
NLIT 2011: Chef & Capistrano
 
Meetup bangalore aug31st2019
Meetup bangalore aug31st2019Meetup bangalore aug31st2019
Meetup bangalore aug31st2019
 
Meetup bangalore 9_novupdated
Meetup bangalore 9_novupdatedMeetup bangalore 9_novupdated
Meetup bangalore 9_novupdated
 
Improve Magento Performance
Improve Magento PerformanceImprove Magento Performance
Improve Magento Performance
 
Unlocked Nov 2013: Main Slide Pack
Unlocked Nov 2013: Main Slide PackUnlocked Nov 2013: Main Slide Pack
Unlocked Nov 2013: Main Slide Pack
 
I can't believe it's not a queue: Kafka and Spring
I can't believe it's not a queue: Kafka and SpringI can't believe it's not a queue: Kafka and Spring
I can't believe it's not a queue: Kafka and Spring
 
Automated release management with team city & octopusdeploy - NDC 2013
Automated release management with team city & octopusdeploy - NDC 2013Automated release management with team city & octopusdeploy - NDC 2013
Automated release management with team city & octopusdeploy - NDC 2013
 
Choosing a Javascript Framework
Choosing a Javascript FrameworkChoosing a Javascript Framework
Choosing a Javascript Framework
 
NGINX 101 - now with more Docker
NGINX 101 - now with more DockerNGINX 101 - now with more Docker
NGINX 101 - now with more Docker
 
Apache Camel: Jetty Component With Example
Apache Camel: Jetty Component With ExampleApache Camel: Jetty Component With Example
Apache Camel: Jetty Component With Example
 
So I Wrote a Manifest
So I Wrote a ManifestSo I Wrote a Manifest
So I Wrote a Manifest
 

Similaire à Introduction to Chef

Introduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefIntroduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefNathen Harvey
 
Introduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefIntroduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefAll Things Open
 
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
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chefkevsmith
 
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014Rackspace Academy
 
Achieving Infrastructure Portability with Chef
Achieving Infrastructure Portability with ChefAchieving Infrastructure Portability with Chef
Achieving Infrastructure Portability with ChefMatt Ray
 
CouchDB for Web Applications - Erlang Factory London 2009
CouchDB for Web Applications - Erlang Factory London 2009CouchDB for Web Applications - Erlang Factory London 2009
CouchDB for Web Applications - Erlang Factory London 2009Jason Davies
 
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
TXLF: Chef- Software Defined Infrastructure Today & TomorrowTXLF: Chef- Software Defined Infrastructure Today & Tomorrow
TXLF: Chef- Software Defined Infrastructure Today & TomorrowMatt Ray
 
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...Timofey Turenko
 
Building a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStackBuilding a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStackke4qqq
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Emerson Eduardo Rodrigues Von Staffen
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...Amazon Web Services
 
Puppet and Apache CloudStack
Puppet and Apache CloudStackPuppet and Apache CloudStack
Puppet and Apache CloudStackPuppet
 
Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Jennifer Davis
 
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto Docker, Inc.
 
Managing Infrastructure as Code
Managing Infrastructure as CodeManaging Infrastructure as Code
Managing Infrastructure as CodeAllan Shone
 
EC2 AMI Factory with Chef, Berkshelf, and Packer
EC2 AMI Factory with Chef, Berkshelf, and PackerEC2 AMI Factory with Chef, Berkshelf, and Packer
EC2 AMI Factory with Chef, Berkshelf, and PackerGeorge Miranda
 
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
 

Similaire à Introduction to Chef (20)

Introduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefIntroduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to Chef
 
Introduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefIntroduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to Chef
 
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
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
 
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
 
Achieving Infrastructure Portability with Chef
Achieving Infrastructure Portability with ChefAchieving Infrastructure Portability with Chef
Achieving Infrastructure Portability with Chef
 
CouchDB for Web Applications - Erlang Factory London 2009
CouchDB for Web Applications - Erlang Factory London 2009CouchDB for Web Applications - Erlang Factory London 2009
CouchDB for Web Applications - Erlang Factory London 2009
 
Configuration management with Chef
Configuration management with ChefConfiguration management with Chef
Configuration management with Chef
 
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
TXLF: Chef- Software Defined Infrastructure Today & TomorrowTXLF: Chef- Software Defined Infrastructure Today & Tomorrow
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
 
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
 
Building a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStackBuilding a Dev/Test Cloud with Apache CloudStack
Building a Dev/Test Cloud with Apache CloudStack
 
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
Devops continuousintegration and deployment onaws puttingmoneybackintoyourmis...
 
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
DevOps, Continuous Integration and Deployment on AWS: Putting Money Back into...
 
Puppet and Apache CloudStack
Puppet and Apache CloudStackPuppet and Apache CloudStack
Puppet and Apache CloudStack
 
Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015
 
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
Orchestrating Docker with Terraform and Consul by Mitchell Hashimoto
 
Managing Infrastructure as Code
Managing Infrastructure as CodeManaging Infrastructure as Code
Managing Infrastructure as Code
 
EC2 AMI Factory with Chef, Berkshelf, and Packer
EC2 AMI Factory with Chef, Berkshelf, and PackerEC2 AMI Factory with Chef, Berkshelf, and Packer
EC2 AMI Factory with Chef, Berkshelf, and Packer
 
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
 
Chef for OpenStack- Fall 2012.pdf
Chef for OpenStack- Fall 2012.pdfChef for OpenStack- Fall 2012.pdf
Chef for OpenStack- Fall 2012.pdf
 

Plus de Suresh Paulraj

Accelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWSAccelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWSSuresh Paulraj
 
Introduction to Stacki - World's fastest Linux server provisioning Tool
Introduction to Stacki - World's fastest Linux server provisioning ToolIntroduction to Stacki - World's fastest Linux server provisioning Tool
Introduction to Stacki - World's fastest Linux server provisioning ToolSuresh Paulraj
 
2015 08-11-scdo-meetup
2015 08-11-scdo-meetup2015 08-11-scdo-meetup
2015 08-11-scdo-meetupSuresh Paulraj
 
Getting started with salt stack
Getting started with salt stackGetting started with salt stack
Getting started with salt stackSuresh Paulraj
 
Getting started with salt stack
Getting started with salt stackGetting started with salt stack
Getting started with salt stackSuresh Paulraj
 
SoCalDevOpsUserGroup-PresentationPuppetLabs
SoCalDevOpsUserGroup-PresentationPuppetLabsSoCalDevOpsUserGroup-PresentationPuppetLabs
SoCalDevOpsUserGroup-PresentationPuppetLabsSuresh Paulraj
 

Plus de Suresh Paulraj (6)

Accelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWSAccelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWS
 
Introduction to Stacki - World's fastest Linux server provisioning Tool
Introduction to Stacki - World's fastest Linux server provisioning ToolIntroduction to Stacki - World's fastest Linux server provisioning Tool
Introduction to Stacki - World's fastest Linux server provisioning Tool
 
2015 08-11-scdo-meetup
2015 08-11-scdo-meetup2015 08-11-scdo-meetup
2015 08-11-scdo-meetup
 
Getting started with salt stack
Getting started with salt stackGetting started with salt stack
Getting started with salt stack
 
Getting started with salt stack
Getting started with salt stackGetting started with salt stack
Getting started with salt stack
 
SoCalDevOpsUserGroup-PresentationPuppetLabs
SoCalDevOpsUserGroup-PresentationPuppetLabsSoCalDevOpsUserGroup-PresentationPuppetLabs
SoCalDevOpsUserGroup-PresentationPuppetLabs
 

Dernier

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 

Dernier (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

Introduction to Chef

  • 1. Introduction to Infrastructure as Code & Automation / Introduction to Chef Ned Harris, Solution Architect Chef
  • 3. Managing Complexity •  SSH, make with the typey typey
  • 4. Managing Complexity •  SSH, make with the typey typey •  Keep notes in ~/server.txt
  • 5. Managing Complexity •  SSH, make with the typey typey •  Keep notes in ~/server.txt •  Move notes to the wiki
  • 6. Managing Complexity •  SSH, make with the typey typey •  Keep notes in ~/server.txt •  Move notes to the wiki •  Custom scripts (setup.sh)
  • 7. Managing Complexity •  SSH, make with the typey typey •  Keep notes in ~/server.txt •  Move notes to the wiki •  Custom scripts (setup.sh) •  Golden Images
  • 8. Golden 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/
  • 10. New Compliance Mandate! Jboss App Memcache Postgres Slaves Postgres Master NagiosGraphite • Move SSH off port 22 • Lets put it on 2022
  • 11. 6 Golden Image Updates Jboss App Memcache Postgres Slaves Postgres Master NagiosGraphite • edit /etc/ssh/sshd_config 1 2 3 4 5 6
  • 12. 12 Instance Replacements 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
  • 13. Done in Maintenance Windows • 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 12
  • 14. Different IP Addresses? Jboss App Memcache Postgres Slaves Postgres Master NagiosGraphite • Invalid configs!
  • 15. Managing Complexity •  SSH, make with the typey typey •  Keep notes in ~/server.txt •  Move notes to the wiki •  Custom scripts (setup.sh) •  Golden Images •  Policy-driven configuration management
  • 16. Policies •  Declarations about the state of thing in a system •  applied repeatedly and repair the system when needed •  often change
  • 17. Repeatable Operations •  Idempotent •  can be applied an infinite number of times and yield the same result every time •  Convergent •  test state and repair if needed
  • 19. Following Policy •  A control loop keeps the system stable and allows for change when policy is updated
  • 20. Policy Evolves That's great and all, ! but tell me about ! Chef!!
  • 21. What is Chef? •  Framework for managing complexity •  Infrastructure as code •  a domain-specific language (DSL) for describing convergent operations •  A community of professionals •  A company
  • 22. The Chef Software Platform Chef Development Kit Cookbook and Policy Authoring Test-Driven Infrastructure Chef Server Management Console Analytics Platform High Availability and Replication Chef Client Nodes Data Center The Cloud
  • 23. How does Chef work? •  Ensure desired state by continually testing and repairing individual resources in the system •  Compose policies using a series of abstractions
  • 25. Desired Configuration Node Chef Server What policy should I follow? "recipe[ntp::client]" "recipe[users]" "role[webserver]"
  • 26. Desired Configuration Chef Server What policy should I follow? "recipe[ntp::client]" "recipe[users]" "role[webserver]"
  • 28. Recipes package "apache2" template "/etc/apache2/apache2.conf" do source "apache2.conf.erb" owner "root" group "root" mode "0644" variables(:allow_override => "All") notifies :reload, "service[apache2]" end resource one resource two
  • 29. Recipes package "apache2" template "/etc/apache2/apache2.conf" do source "apache2.conf.erb" owner "root" group "root" mode "0644" variables(:allow_override => "All") notifies :reload, "service[apache2]" end service "apache2" do action [:enable,:start] supports :reload => true end resource one resource two resource three
  • 34.
  • 35. Managing Complexity •  Organizations •  Environments •  Roles •  Nodes •  Recipes •  Cookbooks •  Search •  Data
  • 39. Nodes
  • 40. Search •  Search for nodes with Roles •  Find Topology Data •  IP addresses •  Hostnames •  FQDNs http://www.flickr.com/photos/kathycsus/2686740
  • 41. Search for Nodes 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  
  • 43. Webservers HAProxy Load Balancer HA ProxyEnterprise Chef pool_members = search("node","role:webserver")
  • 44. Webservers HAProxy Load Balancer HA ProxyEnterprise Chef Webservers? pool_members = search("node","role:webserver")
  • 45. Webservers HAProxy Load Balancer HA ProxyEnterprise Chef Webservers? pool_members = search("node","role:webserver")
  • 46. Webservers HAProxy Load Balancer HA ProxyEnterprise Chef Webservers? pool_members = search("node","role:webserver") { "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } }
  • 47. Webservers HAProxy Load Balancer HA ProxyEnterprise Chef Webservers? pool_members = search("node","role:webserver") { "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } }
  • 48. Webservers HAProxy Load Balancer HA ProxyEnterprise Chef Webservers? pool_members = search("node","role:webserver") { "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } } pool_members { "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } }
  • 49. Search for Nodes 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  
  • 50. Pass results into 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  -­‐%>  
  • 51. Webservers HAProxy Configuration HA Proxypool_members { "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } } <% @pool_members.each do |member| -%> server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check <% end -%>
  • 52. Webservers HAProxy Configuration HA Proxy <% @pool_members.each do |member| -%> server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check <% end -%> pool_members { "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } } haproxy.cfg server web01 10.1.1.1 weight 1 maxconn 1 check
  • 53. Webservers HAProxy Configuration HA Proxy <% @pool_members.each do |member| -%> server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check <% end -%> pool_members { "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } } haproxy.cfg server web01 10.1.1.1 weight 1 maxconn 1 check server web02 10.1.1.2 weight 1 maxconn 1 check
  • 54. Webservers HAProxy Configuration HA Proxy <% @pool_members.each do |member| -%> server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check <% end -%> pool_members { "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } } haproxy.cfg server web01 10.1.1.1 weight 1 maxconn 1 check server web02 10.1.1.2 weight 1 maxconn 1 check server web03 10.1.1.3 weight 1 maxconn 1 check
  • 55. Webservers HAProxy Configuration HA Proxy <% @pool_members.each do |member| -%> server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check <% end -%> pool_members { "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } } haproxy.cfg server web01 10.1.1.1 weight 1 maxconn 1 check server web02 10.1.1.2 weight 1 maxconn 1 check server web03 10.1.1.3 weight 1 maxconn 1 check server web04 10.1.1.4 weight 1 maxconn 1 check
  • 56. Webservers HAProxy Configuration HA Proxy <% @pool_members.each do |member| -%> server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check <% end -%> pool_members { "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } } haproxy.cfg server web01 10.1.1.1 weight 1 maxconn 1 check server web02 10.1.1.2 weight 1 maxconn 1 check server web03 10.1.1.3 weight 1 maxconn 1 check server web04 10.1.1.4 weight 1 maxconn 1 check server web05 10.1.1.5 weight 1 maxconn 1 check
  • 57. Webservers HAProxy Configuration HA Proxy <% @pool_members.each do |member| -%> server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check <% end -%> haproxy.cfg server web01 10.1.1.1 weight 1 maxconn 1 check server web02 10.1.1.2 weight 1 maxconn 1 check server web03 10.1.1.3 weight 1 maxconn 1 check server web04 10.1.1.4 weight 1 maxconn 1 check server web05 10.1.1.5 weight 1 maxconn 1 check server web06 10.1.1.1 weight 1 maxconn 1 check pool_members { "web01" : { "hostname" : "web01", "ipaddress" : "10.1.1.1" }, "web02" : { "hostname" : "web02", "ipaddress" : "10.1.1.2" }, "web03" : { "hostname" : "web03", "ipaddress" : "10.1.1.3" }, "web04" : { "hostname" : "web04", "ipaddress" : "10.1.1.4" }, "web05" : { "hostname" : "web05", "ipaddress" : "10.1.1.5" }, "web06" : { "hostname" : "web06", "ipaddress" : "10.1.1.6" } }
  • 58. So when this… Jboss App Memcache Postgres Slaves Postgres Master NagiosGraphite
  • 59. …becomes this… Jboss App Memcache Postgres Slaves Postgres Master NagiosGraphite
  • 60. …this can happen automaticaly! Memcache Postgres Slaves Postgres Master NagiosGraphite Jboss App Memcache Postgres Slaves Postgres Master NagiosGraphite
  • 61. Count the resources NagiosGraphite NagiosGraphite 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 •  Postgres authZ config • 12+ resource changes for 1 node addition Jboss App
  • 62. 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/
  • 63. 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/
  • 65. Increase CHEF adoption through ChefDK ●  ChefDK: CHEF Software Development Kit, fully supported with the Chef Premium Subscription ●  Workflow Definition: Our recommendation on the process to test and verify your infrastructure code before committing it to source control and shipping it to production. ●  Workflow Enhancement: Based on customer feedback and use cases
  • 66. ChefDK: In the Box First Class Support on Windows, Linux, and OSX for the entire suite of Chef development tools ●  Test Kitchen: Virtualized testing harness ●  Berkshelf: Dependency solver ●  Chef-Vault: Secrets management ●  Rubocop / Foodcritic: Code linting ●  Chefspec: In-memory Unit Testing ●  Chef.bin: New wrapper binary to tie it all together, with new extensible cookbook generators.
  • 67. The Chef workflow Create new skeleton cookbook. Create a VM environment for cookbook development. Write/debug cookbook recipes (iterative step). Perform acceptance tests. Deploy to production.