SlideShare uma empresa Scribd logo
1 de 73
Baixar para ler offline
Chef: Software Defined
Infrastructure Today & Tomorrow
Matt Ray
TXLF
June 14, 2014
Introductions
• Matt Ray
• Director of Partner
Integration at Chef
• matt@getchef.com
• mattray GitHub|IRC|Twitter
http://www.flickr.com/photos/michaelheiss/3090102907/
Complexity
4
Items of Manipulation (Resources)
• Networking
• Files
• Directories
• Symlinks
• Mounts
• Registry Keys
• Powershell Scripts
• Users
• Groups
• Packages
• Services
• Filesystems
• and so much more
5
Application
A tale of growth...
6
Application
Application Database
Add a database
7
Application
App Databases
Make database redundant
8
App Servers
App Databases
Application server redundancy
9
App LB
App Servers
App Databases
Add a load balancer
10
App LBs
App Servers
App Databases
Webscale!
11
App LBs
App Servers
App DB Cache
App DBs
Now we need a caching layer
12
App LBs
App Servers
App DB Cache
App DBs
Infrastructure has a Topology
13
Round Robin DNS
App Servers
App DB Cache
App DBs
Floating IP?
Your Infrastructure is a Snowflake
14
App LBs
App Servers
< Shiny!
DB slaves
Cache
DB Cache
DBs
Complexity Increases Quickly
Are we monitoring??
15
App LBs
App Servers
DB slaves
Cache
DB Cache
DBs
...and change happens!
16
App LBs
App Servers
DB slaves
Cache
DB Cache
DBs
...and change happens!
Add a Central Log Host
Central Log Host
17
App LBs
App Servers
DB slaves
Cache
DB Cache
DBs
...and change happens!
Add a Central Log Host!
!
Update syslog.conf on
all Nodes
Central Log Host
18
Chef Solves This Problem
• But you already
guessed that, didn’t
you?
19
Chef is Infrastructure as Code
• Programmatically
provision and
configure components
http://www.flickr.com/photos/louisb/4555295187/
20
Chef is Infrastructure as Code
• Treat like any other
code base
http://www.flickr.com/photos/louisb/4555295187/
21
Chef is Infrastructure as Code
• Reconstruct business
from code repository,
data backups, and
compute resources
http://www.flickr.com/photos/louisb/4555295187/
22
Chef is Infrastructure as Code
• Programmatically
provision and
configure components
• Treat like any other
code base
• Reconstruct business
from code repository,
data backup, and
compute resourceshttp://www.flickr.com/photos/louisb/4555295187/
23
Configuration Code
• Chef ensures each Node complies with the policy
• Policy is determined by the configurations in each
Node’s run list
• Reduce management complexity through abstraction
• Store the configuration of your infrastructure in
version control
24
Declarative Interface to Resources
• You define the policy in your Chef configuration
• Your policy states what state each resource should
be in, but not how to get there
• Chef-client will pull the policy from the Chef Server
and enforce the policy on the Node
25
How does it work?
http://i3.kym-cdn.com/photos/images/original/000/046/123/magnets.jpg
Managing Complexity
• Organizations
• Environments
• Roles
• Nodes
• Recipes
• Cookbooks
• Search
27
Their Infrastructure
Organizations
My Infrastructure Your Infrastructure
28
Environments
Development Staging Production
29
Environments Define Policy
• Environments may include data attributes necessary
for configuring your infrastructure, e.g.
• The URL of your payment service’s API
• The location of your package repository
• The version of the Chef configuration files that
should be used
30
Roles
Load Balancers
Application Servers
DB Cache
Database
31
Roles Define Policy
• Roles may include an ordered list of Chef
configuration files that should be applied
• This list is called a Run List
• Order is always important in the Run List
• Roles may include data attributes necessary for
configuring your infrastructure, for example:
• The port that the application server listens on
• A list of applications that should be deployed
32
Nodes
33
Node
• Each Node will
• Belong to one Organization
• Belong to one Environment
• Have zero or more Roles
34
Nodes Adhere to Policy
• The chef-client application runs on each node, which
• Gathers the current system configuration of the
node
• Downloads the desired system configuration
policies from the Chef server for that node
• Configures the node such that it adheres to those
policies
35
Resources
• A Resource represents a piece of the system and its
desired state
• A package that should be installed
• A service that should be running
• A file that should be generated
• A cron job that should be configured
• A user that should be managed
• and more
36
Resources in Recipes
• Resources are the fundamental building blocks of
Chef configuration
• Resources are gathered into Recipes
• Recipes ensure the system is in the desired state
37
Recipes
• Configuration files that describe resources and their
desired state
• Recipes can:
• Install and configure software components
• Manage files
• Deploy applications
• Execute other recipes
• and more
38
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
Example Recipe
Cookbooks
• Recipes are stored in
Cookbooks
• Cookbooks contain recipes,
templates, files, custom
resources, etc
• Code re-use and modularity
http://www.flickr.com/photos/shutterhacks/4474421855/
40
Run List
Node
Enterprise
Chef
chef-client
What policy should I follow?
41
Run List
Node
Enterprise
Chef
chef-client
What policy should I follow?
"recipe[ntp::client]"	

"recipe[users]"	

"role[webserver]"
42
Run List
Enterprise
Chef
chef-client
What policy should I follow?
"recipe[ntp::client]"	

"recipe[users]"	

"role[webserver]"
43
Run List Specifies Policy
• The Run List is an ordered collection of policies that
the Node should follow
• Chef-client obtains the Run List from the Chef
Server
• Chef-client ensures the Node complies with the
policy in the Run List
44
Search
• Search for nodes with Roles
• Find Topology Data
!
• IP addresses
• Hostnames
• FQDNs
http://www.flickr.com/photos/kathycsus/268677262545
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
46
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
47
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 -%>
48
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 -%>
49
# 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 into Templates
50
Jboss App
Memcache
Postgres Slaves
Postgres Master
NagiosGraphite
So when this...
51
Jboss App
Memcache
Postgres Slaves
Postgres Master
NagiosGraphite
...becomes this
52
Memcache
Postgres Slaves
Postgres Master
NagiosGraphite
	

!
!
!
	

!
!
Jboss App
Memcache
Postgres Slaves
Postgres Master
NagiosGraphite
...this can happen automatically
53
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
Count the Resources
Jboss App
54
Which Operating Systems?
• Many supported
platforms and
architectures
• Relatively easy to port
• Omnibus-Chef
• AIX, Arch, Fedora,
Gentoo, OmniOS,
OpenBSD, Rasbian,
SmartOS and more
55
The Chef Community
• Apache License, Version 2.0
• Thousands of Individual and Corporate contributors.
• Thousands of cookbooks available from the
community
• http://community.opscode.com
The Chef API and Server
• HTTPS, RESTful API w/ JSON, RSA key auth
• Infrastructure data store such as node data
• Environments
• Search Service
• Data bags
• SSH and Push jobs
http://www.flickr.com/photos/core-materials/4419853626/sizes/o/in/photostream/
knife
knife - with the Chef Server
• knife node
• create / edit / delete
• list
• knife cookbook ...
• knife role ...
• knife environment ...
59
knife - with clouds
• knife azure
• knife cloudstack
• knife do
• knife ec2
• knife gce
• knife hp
• knife openstack
• knife rackspace
• knife vcloud
• knife vsphere
• ...and many others
60
Virtualization and Containers?
• Docker
• Hyper-V
• KVM
• LXC
• OpenVZ
• Vagrant
• Virtualbox
• VMware
• Xen
• Zones
61
Test Kitchen
• Integration testing for your
infrastructure code
• Tests your cookbooks on all
the supported platforms with
“real” machines
62
™
Desktop, Virtualization & Cloud
• Vagrant
• VMware
• CloudStack
• Eucalyptus
• OpenStack
• bare metal
• AWS
• Rackspace
• HP
• Google
• Azure
• many others
• AWS
• Rackspace
• HP
• Google
• Azure
• many others
Desktop, Virtualization & Cloud
• Vagrant
• VMware
• CloudStack
• Eucalyptus
• OpenStack
• bare metal
™
How about Storage?
• Ceph
• EMC
• Gluster
• NetApp
• Nexenta
• and more
65
What about Networking?
• Routers and switches
• Load balancers
• Firewalls
• SDN
66
Chef Metal
• Chef recipes for deploying infrastructure
• Libraries for repeatably creating machines and
deployments with Chef primitives
• Bootstrappers for many infrastructure types
• Provisioner nodes, remote command execution
68
Chef Metal: Providers
• Cloud
• Digital Ocean, EC2, Fog, OpenStack
• Virtualization
• Vagrant (VirtualBox, Fusion), vSphere
• Containers
• Docker & LXC
• SSH
• PXE in progress
69
Chef Metal: Example Recipe
machine 'mario' do!
recipe 'mydb'!
tag 'mydb_master'!
end!
num_webservers = 1!
1.upto(num_webservers) do |i|!
machine "luigi#{i}" do!
recipe 'mywebapp'!
end!
end
70
What does this all mean?
•Every infrastructure is a unique
snowflake
•Infrastructure as Code brings
transparency and traceability
•Test your deployments at every stage
•Use the same infrastructure code for
wherever you want to deploy
™
Austin, Texas
• Lots of Chef users in Austin
• Austin Chef Meetup
• Wednesday June 18, Maudies
Triangle 8:30-10:30am
• Austin DevOps Meetup
• www.meetup.com/austin-devops/
• Agile Austin DevOps
• Cloud, Docker, OpenStack, etc..
72
Thanks!
Matt Ray
matt@getchef.com
@mattray

Mais conteúdo relacionado

Mais procurados

Practical introduction to dev ops with chef
Practical introduction to dev ops with chefPractical introduction to dev ops with chef
Practical introduction to dev ops with chef
LeanDog
 
London devops logging
London devops loggingLondon devops logging
London devops logging
Tomas Doran
 
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Campmodern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
Puppet
 
Environments - Fundamentals Webinar Series Week 5
Environments - Fundamentals Webinar Series Week 5Environments - Fundamentals Webinar Series Week 5
Environments - Fundamentals Webinar Series Week 5
Chef
 
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
Chef Software, Inc.
 

Mais procurados (20)

Deploying OpenStack with Chef
Deploying OpenStack with ChefDeploying OpenStack with Chef
Deploying OpenStack with Chef
 
Velocity 2011 Chef OpenStack Workshop
Velocity 2011 Chef OpenStack WorkshopVelocity 2011 Chef OpenStack Workshop
Velocity 2011 Chef OpenStack Workshop
 
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 Deployment with Chef Workshop
OpenStack Deployment with Chef WorkshopOpenStack Deployment with Chef Workshop
OpenStack Deployment with Chef Workshop
 
Achieving Infrastructure Portability with Chef
Achieving Infrastructure Portability with ChefAchieving Infrastructure Portability with Chef
Achieving Infrastructure Portability with Chef
 
OpenStack Deployments with Chef
OpenStack Deployments with ChefOpenStack Deployments with Chef
OpenStack Deployments with Chef
 
Practical introduction to dev ops with chef
Practical introduction to dev ops with chefPractical introduction to dev ops with chef
Practical introduction to dev ops with chef
 
Chef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation Setup
 
Managing Complexity at Velocity
Managing Complexity at VelocityManaging Complexity at Velocity
Managing Complexity at Velocity
 
London devops logging
London devops loggingLondon devops logging
London devops logging
 
Automated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAutomated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. Ansible
 
Vagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptopVagrant, Ansible, and OpenStack on your laptop
Vagrant, Ansible, and OpenStack on your laptop
 
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Campmodern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
 
Integrated Cache on Netscaler
Integrated Cache on NetscalerIntegrated Cache on Netscaler
Integrated Cache on Netscaler
 
Environments - Fundamentals Webinar Series Week 5
Environments - Fundamentals Webinar Series Week 5Environments - Fundamentals Webinar Series Week 5
Environments - Fundamentals Webinar Series Week 5
 
Red Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with PuppetRed Hat Satellite 6 - Automation with Puppet
Red Hat Satellite 6 - Automation with Puppet
 
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
Node setup, resource, and recipes - Fundamentals Webinar Series Part 2
 
Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3
 
Opscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with ChefOpscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with Chef
 
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
 

Destaque

Виртуальный рабочий стол
Виртуальный рабочий столВиртуальный рабочий стол
Виртуальный рабочий стол
SaaS.ru Portal
 
Hand Paint Water Color Tunis 002
Hand Paint Water Color Tunis 002Hand Paint Water Color Tunis 002
Hand Paint Water Color Tunis 002
ipag9999
 
An assessment of voter behaviour & political participation
An assessment of voter behaviour & political participationAn assessment of voter behaviour & political participation
An assessment of voter behaviour & political participation
Amir Karim-Ajam
 
Information technology information night
Information technology information nightInformation technology information night
Information technology information night
Bronwyn1975
 
PAGAN/BAGAN
PAGAN/BAGANPAGAN/BAGAN
PAGAN/BAGAN
Markus Burman
 

Destaque (18)

IBM Live Case Study: Leveraging Software-Defined Infrastructure Control to De...
IBM Live Case Study: Leveraging Software-Defined Infrastructure Control to De...IBM Live Case Study: Leveraging Software-Defined Infrastructure Control to De...
IBM Live Case Study: Leveraging Software-Defined Infrastructure Control to De...
 
Toronto VMUG - November 13, 2013 - CiRBA
Toronto VMUG - November 13, 2013 - CiRBAToronto VMUG - November 13, 2013 - CiRBA
Toronto VMUG - November 13, 2013 - CiRBA
 
Виртуальный рабочий стол
Виртуальный рабочий столВиртуальный рабочий стол
Виртуальный рабочий стол
 
Hand Paint Water Color Tunis 002
Hand Paint Water Color Tunis 002Hand Paint Water Color Tunis 002
Hand Paint Water Color Tunis 002
 
Cannes Lions 2016: The Trends Decoded
Cannes Lions 2016: The Trends DecodedCannes Lions 2016: The Trends Decoded
Cannes Lions 2016: The Trends Decoded
 
Bullet proofing your career online 41812
Bullet proofing your career online 41812Bullet proofing your career online 41812
Bullet proofing your career online 41812
 
SearchLove London | Ade Lewis 'Becoming a Digital Super-Hero'
SearchLove London | Ade Lewis 'Becoming a Digital Super-Hero'SearchLove London | Ade Lewis 'Becoming a Digital Super-Hero'
SearchLove London | Ade Lewis 'Becoming a Digital Super-Hero'
 
RESETTLEMENT: 10 FAKTEN
RESETTLEMENT: 10 FAKTENRESETTLEMENT: 10 FAKTEN
RESETTLEMENT: 10 FAKTEN
 
An assessment of voter behaviour & political participation
An assessment of voter behaviour & political participationAn assessment of voter behaviour & political participation
An assessment of voter behaviour & political participation
 
Chicago Family Studio
Chicago Family StudioChicago Family Studio
Chicago Family Studio
 
Infographic: Extending Middle-Class Tax Cuts
Infographic: Extending Middle-Class Tax CutsInfographic: Extending Middle-Class Tax Cuts
Infographic: Extending Middle-Class Tax Cuts
 
MindTree Considers Leading Enterprise Contract Management Software
MindTree Considers Leading Enterprise Contract Management SoftwareMindTree Considers Leading Enterprise Contract Management Software
MindTree Considers Leading Enterprise Contract Management Software
 
Blended learning - a whole college approach
Blended learning - a whole college approachBlended learning - a whole college approach
Blended learning - a whole college approach
 
How to-make-pastel-painting-panels
How to-make-pastel-painting-panelsHow to-make-pastel-painting-panels
How to-make-pastel-painting-panels
 
01 intro - will margiloff-pdf
01   intro - will margiloff-pdf01   intro - will margiloff-pdf
01 intro - will margiloff-pdf
 
Information technology information night
Information technology information nightInformation technology information night
Information technology information night
 
PAGAN/BAGAN
PAGAN/BAGANPAGAN/BAGAN
PAGAN/BAGAN
 
How to deal with a rogue government4 (texas style) plain powerpoint 2 26 13.ppsx
How to deal with a rogue government4 (texas style) plain powerpoint 2 26 13.ppsxHow to deal with a rogue government4 (texas style) plain powerpoint 2 26 13.ppsx
How to deal with a rogue government4 (texas style) plain powerpoint 2 26 13.ppsx
 

Semelhante a TXLF: Chef- Software Defined Infrastructure Today & Tomorrow

Aai 3228-dev ops-tools-websphere-sl
Aai 3228-dev ops-tools-websphere-slAai 3228-dev ops-tools-websphere-sl
Aai 3228-dev ops-tools-websphere-sl
sflynn073
 
Chef for Openstack
Chef for OpenstackChef for Openstack
Chef for Openstack
Mohit Sethi
 

Semelhante a TXLF: Chef- Software Defined Infrastructure Today & Tomorrow (20)

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
 
Chef for OpenStack- Fall 2012.pdf
Chef for OpenStack- Fall 2012.pdfChef for OpenStack- Fall 2012.pdf
Chef for OpenStack- Fall 2012.pdf
 
Aai 3228-dev ops-tools-websphere-sl
Aai 3228-dev ops-tools-websphere-slAai 3228-dev ops-tools-websphere-sl
Aai 3228-dev ops-tools-websphere-sl
 
OSDC 2013 | Introduction into Chef by Andy Hawkins
OSDC 2013 | Introduction into Chef by Andy HawkinsOSDC 2013 | Introduction into Chef by Andy Hawkins
OSDC 2013 | Introduction into Chef by Andy Hawkins
 
Chef fundamentals
Chef fundamentalsChef fundamentals
Chef fundamentals
 
IBM InterConnect 2015 - IIB in the Cloud
IBM InterConnect 2015 - IIB in the CloudIBM InterConnect 2015 - IIB in the Cloud
IBM InterConnect 2015 - IIB in the Cloud
 
Chef for openstack
Chef for openstackChef for openstack
Chef for openstack
 
Introduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitIntroduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen Summit
 
Chef for Openstack
Chef for OpenstackChef for Openstack
Chef for Openstack
 
SharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi VončinaSharePoint 2013 Performance Analysis - Robi Vončina
SharePoint 2013 Performance Analysis - Robi Vončina
 
Infrastructure modeling with chef
Infrastructure modeling with chefInfrastructure modeling with chef
Infrastructure modeling with 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
 
SCALE12X: Chef for OpenStack
SCALE12X: Chef for OpenStackSCALE12X: Chef for OpenStack
SCALE12X: Chef for OpenStack
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
 
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
 
AWS re:Invent 2016: Configuration Management in the Cloud (DEV305)
AWS re:Invent 2016: Configuration Management in the Cloud (DEV305)AWS re:Invent 2016: Configuration Management in the Cloud (DEV305)
AWS re:Invent 2016: Configuration Management in the Cloud (DEV305)
 
Running Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on HadoopRunning Airflow Workflows as ETL Processes on Hadoop
Running Airflow Workflows as ETL Processes on Hadoop
 
TechBeats #2
TechBeats #2TechBeats #2
TechBeats #2
 
Moving Windows Applications to the Cloud
Moving Windows Applications to the CloudMoving Windows Applications to the Cloud
Moving Windows Applications to the Cloud
 
SPSUtah 2014 SharePoint 2013 Performance (Admin)
SPSUtah 2014 SharePoint 2013 Performance (Admin)SPSUtah 2014 SharePoint 2013 Performance (Admin)
SPSUtah 2014 SharePoint 2013 Performance (Admin)
 

Mais de Matt Ray

Mais de Matt Ray (20)

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

Último

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
vu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
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
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
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)
 
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
 
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...
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

TXLF: Chef- Software Defined Infrastructure Today & Tomorrow

  • 1.
  • 2. Chef: Software Defined Infrastructure Today & Tomorrow Matt Ray TXLF June 14, 2014
  • 3. Introductions • Matt Ray • Director of Partner Integration at Chef • matt@getchef.com • mattray GitHub|IRC|Twitter
  • 5. Items of Manipulation (Resources) • Networking • Files • Directories • Symlinks • Mounts • Registry Keys • Powershell Scripts • Users • Groups • Packages • Services • Filesystems • and so much more 5
  • 6. Application A tale of growth... 6
  • 10. App LB App Servers App Databases Add a load balancer 10
  • 11. App LBs App Servers App Databases Webscale! 11
  • 12. App LBs App Servers App DB Cache App DBs Now we need a caching layer 12
  • 13. App LBs App Servers App DB Cache App DBs Infrastructure has a Topology 13
  • 14. Round Robin DNS App Servers App DB Cache App DBs Floating IP? Your Infrastructure is a Snowflake 14
  • 15. App LBs App Servers < Shiny! DB slaves Cache DB Cache DBs Complexity Increases Quickly Are we monitoring?? 15
  • 16. App LBs App Servers DB slaves Cache DB Cache DBs ...and change happens! 16
  • 17. App LBs App Servers DB slaves Cache DB Cache DBs ...and change happens! Add a Central Log Host Central Log Host 17
  • 18. App LBs App Servers DB slaves Cache DB Cache DBs ...and change happens! Add a Central Log Host! ! Update syslog.conf on all Nodes Central Log Host 18
  • 19. Chef Solves This Problem • But you already guessed that, didn’t you? 19
  • 20. Chef is Infrastructure as Code • Programmatically provision and configure components http://www.flickr.com/photos/louisb/4555295187/ 20
  • 21. Chef is Infrastructure as Code • Treat like any other code base http://www.flickr.com/photos/louisb/4555295187/ 21
  • 22. Chef is Infrastructure as Code • Reconstruct business from code repository, data backups, and compute resources http://www.flickr.com/photos/louisb/4555295187/ 22
  • 23. Chef is Infrastructure as Code • Programmatically provision and configure components • Treat like any other code base • Reconstruct business from code repository, data backup, and compute resourceshttp://www.flickr.com/photos/louisb/4555295187/ 23
  • 24. Configuration Code • Chef ensures each Node complies with the policy • Policy is determined by the configurations in each Node’s run list • Reduce management complexity through abstraction • Store the configuration of your infrastructure in version control 24
  • 25. Declarative Interface to Resources • You define the policy in your Chef configuration • Your policy states what state each resource should be in, but not how to get there • Chef-client will pull the policy from the Chef Server and enforce the policy on the Node 25
  • 26. How does it work? http://i3.kym-cdn.com/photos/images/original/000/046/123/magnets.jpg
  • 27. Managing Complexity • Organizations • Environments • Roles • Nodes • Recipes • Cookbooks • Search 27
  • 30. Environments Define Policy • Environments may include data attributes necessary for configuring your infrastructure, e.g. • The URL of your payment service’s API • The location of your package repository • The version of the Chef configuration files that should be used 30
  • 32. Roles Define Policy • Roles may include an ordered list of Chef configuration files that should be applied • This list is called a Run List • Order is always important in the Run List • Roles may include data attributes necessary for configuring your infrastructure, for example: • The port that the application server listens on • A list of applications that should be deployed 32
  • 34. Node • Each Node will • Belong to one Organization • Belong to one Environment • Have zero or more Roles 34
  • 35. Nodes Adhere to Policy • The chef-client application runs on each node, which • Gathers the current system configuration of the node • Downloads the desired system configuration policies from the Chef server for that node • Configures the node such that it adheres to those policies 35
  • 36. Resources • A Resource represents a piece of the system and its desired state • A package that should be installed • A service that should be running • A file that should be generated • A cron job that should be configured • A user that should be managed • and more 36
  • 37. Resources in Recipes • Resources are the fundamental building blocks of Chef configuration • Resources are gathered into Recipes • Recipes ensure the system is in the desired state 37
  • 38. Recipes • Configuration files that describe resources and their desired state • Recipes can: • Install and configure software components • Manage files • Deploy applications • Execute other recipes • and more 38
  • 39. 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 Example Recipe
  • 40. Cookbooks • Recipes are stored in Cookbooks • Cookbooks contain recipes, templates, files, custom resources, etc • Code re-use and modularity http://www.flickr.com/photos/shutterhacks/4474421855/ 40
  • 42. Run List Node Enterprise Chef chef-client What policy should I follow? "recipe[ntp::client]" "recipe[users]" "role[webserver]" 42
  • 43. Run List Enterprise Chef chef-client What policy should I follow? "recipe[ntp::client]" "recipe[users]" "role[webserver]" 43
  • 44. Run List Specifies Policy • The Run List is an ordered collection of policies that the Node should follow • Chef-client obtains the Run List from the Chef Server • Chef-client ensures the Node complies with the policy in the Run List 44
  • 45. Search • Search for nodes with Roles • Find Topology Data ! • IP addresses • Hostnames • FQDNs http://www.flickr.com/photos/kathycsus/268677262545
  • 46. 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 46
  • 47. 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 47
  • 48. 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 -%> 48
  • 49. 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 -%> 49
  • 50. # 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 into Templates 50
  • 51. Jboss App Memcache Postgres Slaves Postgres Master NagiosGraphite So when this... 51
  • 52. Jboss App Memcache Postgres Slaves Postgres Master NagiosGraphite ...becomes this 52
  • 53. Memcache Postgres Slaves Postgres Master NagiosGraphite ! ! ! ! ! Jboss App Memcache Postgres Slaves Postgres Master NagiosGraphite ...this can happen automatically 53
  • 54. 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 Count the Resources Jboss App 54
  • 55. Which Operating Systems? • Many supported platforms and architectures • Relatively easy to port • Omnibus-Chef • AIX, Arch, Fedora, Gentoo, OmniOS, OpenBSD, Rasbian, SmartOS and more 55
  • 56. The Chef Community • Apache License, Version 2.0 • Thousands of Individual and Corporate contributors. • Thousands of cookbooks available from the community • http://community.opscode.com
  • 57. The Chef API and Server • HTTPS, RESTful API w/ JSON, RSA key auth • Infrastructure data store such as node data • Environments • Search Service • Data bags • SSH and Push jobs http://www.flickr.com/photos/core-materials/4419853626/sizes/o/in/photostream/
  • 58. knife
  • 59. knife - with the Chef Server • knife node • create / edit / delete • list • knife cookbook ... • knife role ... • knife environment ... 59
  • 60. knife - with clouds • knife azure • knife cloudstack • knife do • knife ec2 • knife gce • knife hp • knife openstack • knife rackspace • knife vcloud • knife vsphere • ...and many others 60
  • 61. Virtualization and Containers? • Docker • Hyper-V • KVM • LXC • OpenVZ • Vagrant • Virtualbox • VMware • Xen • Zones 61
  • 62. Test Kitchen • Integration testing for your infrastructure code • Tests your cookbooks on all the supported platforms with “real” machines 62
  • 63. ™ Desktop, Virtualization & Cloud • Vagrant • VMware • CloudStack • Eucalyptus • OpenStack • bare metal • AWS • Rackspace • HP • Google • Azure • many others
  • 64. • AWS • Rackspace • HP • Google • Azure • many others Desktop, Virtualization & Cloud • Vagrant • VMware • CloudStack • Eucalyptus • OpenStack • bare metal ™
  • 65. How about Storage? • Ceph • EMC • Gluster • NetApp • Nexenta • and more 65
  • 66. What about Networking? • Routers and switches • Load balancers • Firewalls • SDN 66
  • 67.
  • 68. Chef Metal • Chef recipes for deploying infrastructure • Libraries for repeatably creating machines and deployments with Chef primitives • Bootstrappers for many infrastructure types • Provisioner nodes, remote command execution 68
  • 69. Chef Metal: Providers • Cloud • Digital Ocean, EC2, Fog, OpenStack • Virtualization • Vagrant (VirtualBox, Fusion), vSphere • Containers • Docker & LXC • SSH • PXE in progress 69
  • 70. Chef Metal: Example Recipe machine 'mario' do! recipe 'mydb'! tag 'mydb_master'! end! num_webservers = 1! 1.upto(num_webservers) do |i|! machine "luigi#{i}" do! recipe 'mywebapp'! end! end 70
  • 71. What does this all mean? •Every infrastructure is a unique snowflake •Infrastructure as Code brings transparency and traceability •Test your deployments at every stage •Use the same infrastructure code for wherever you want to deploy ™
  • 72. Austin, Texas • Lots of Chef users in Austin • Austin Chef Meetup • Wednesday June 18, Maudies Triangle 8:30-10:30am • Austin DevOps Meetup • www.meetup.com/austin-devops/ • Agile Austin DevOps • Cloud, Docker, OpenStack, etc.. 72