Chef for OpenStack


            Matt Ray
       matt@opscode.com
   IRC/Twitter/GitHub: mattray
  www.opscode.com/openstack
Deploying and Managing
OpenStack is not simple.
Chef makes it easier.
See Node



Application Server
See Nodes



Application Server


Application Database
See Nodes Grow



Application Server


Application Databases
See Nodes Grow



Application Servers


Application Databases
See Nodes Grow

Load Balancer


Application Servers


Application Databases
See Nodes Grow

Load Balancers


        Application Servers


Application Databases
See Nodes Grow

Load Balancers


        Application Servers


Application Database Cache


Application Databases
Tied together with Config

Load Balancers


        Application Servers


Application Database Cache


Application Databases
Infrastructure is a Snowflake

Load Balancers


         Application Servers


Application Database Cache


Floating IP?


Application Databases
Evolving Complexity



        Load Balancers
              ApplicationCache

                   Application Servers
NoSQL        Database Cache

             Database Slaves

        Database
Complexity Grows Quickly
      DC2


DC1

                      DC3
And it Continues to Evolve


Tell me about
    Chef!




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



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


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

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

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




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




http://www.flickr.com/photos/bixentro/2591838509/
Recipes and Cookbooks


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

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

•   Search for nodes
    with Roles
•   Find configuration
    data

•   IP addresses
•   Hostnames
•   FQDNs




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


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

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



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

Graphite   Nagios


                             Jboss App


           Memcache

           Postgres Slaves


           Postgres Master
Becomes this

Graphite   Nagios


                             Jboss App


           Memcache

           Postgres Slaves


           Postgres Master
Updates can be automatic

Graphite   Nagios


                             Jboss App


           Memcache

           Postgres Slaves


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

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



•   Apache License, Version 2.0
•   900+ Individual contributors
•   160+ Corporate contributors
    •   HP, Dell, Rackspace, VMware, Calxeda,
        SUSE and many more
•   600+ cookbooks
•   http://community.opscode.com
What's Out There?




Chef for OpenStack
    Resources
Chef for OpenStack: Why




•   Community for the automated deployment
    and management of OpenStack
•   Reduce fragmentation and encourage
    collaboration
•   Deploying OpenStack is not "secret sauce"
•   Project not a product
•   Apache 2 license
Chef for OpenStack: What



•   Chef Repository for Deploying OpenStack
•   Documentation for Chef for OpenStack
•   Cookbooks
    •   Keystone
    •   Glance
    •   Nova
    •   Horizon
    •   Swift
•   Knife OpenStack
Chef for OpenStack: Where



•   opscode.com/openstack
•   groups.google.com/group/opscode-chef-
    openstack
•   #openstack-chef on irc.freenode.net
•   github.com/opscode/openstack-chef-repo
•   github.com/mattray/openstack-chef-docs
•   github.com/opscode-cookbooks/
    •   keystone, glance, nova, horizon, swift
•   github.com/opscode/knife-openstack
Chef for OpenStack: Who
Rackspace Private Cloud: Alamo




•   Initial fork of current cookbooks
•   github.com/rcbops/chef-cookbooks
•   www.rackspace.com/cloud/private/
Chef for OpenStack: When




•   Essex is working
    •   KVM
    •   Ubuntu 12.04
•   Folsom has already started
    •   LXC
    •   Red Hat
•   Grizzly and forward
Chef for OpenStack: How




github.com/mattray/openstack-chef-docs
Deploying OpenStack




•   Chef ties it all together automatically
•   Scaling changes how we deploy
•   Interchangeable components
•   Configurations shared, supported &
    documented
•   Licensing makes it available to everyone
knife openstack
knife openstack




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

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




$ knife openstack flavor list
ID         Name       Virtual CPUs RAM          Disk
1          m1.tiny    1              512   MB     0 GB
2          m1.small   2             2048   MB    20 GB
3          m1.medium 2              4096   MB    40 GB
4          m1.large   2             8192   MB    80 GB
5          m1.xlarge 4             16384   MB   160 GB
knife openstack image list




$ knife openstack image list
ID Name
13 natty-server-cloudimg-amd64
12 natty-server-cloudimg-amd64-kernel
15 oneiric-server-cloudimg-amd64
14 oneiric-server-cloudimg-amd64-kernel
knife openstack server create




knife openstack server create --node-name ko1 --flavor 1 --image 13 -S trystack
Chef for OpenStack  - OpenStack Fall 2012 Summit
$ ssh -i ~/.ssh/trystack.pem ubuntu@8.21.28.24
The authenticity of host '8.21.28.24 (8.21.28.24)' can't be established.
RSA key fingerprint is 0c:d8:3e:34:d1:de:c4:ee:5f:bc:b5:89:11:0d:73:e0.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '8.21.28.24' (RSA) to the list of known hosts.
Welcome to Ubuntu 11.04 (GNU/Linux 2.6.38-13-virtual x86_64)

 * Documentation:   https://help.ubuntu.com/

  System information as of Thu Feb 16 23:43:29 UTC 2012

  System load: 0.08               Processes:           63
  Usage of /:   40.8% of 1.35GB   Users logged in:     0
  Memory usage: 6%                IP address for eth0: 8.21.28.24
  Swap usage:   0%
---------------------------------------------------------------------
<snip>
Get cloud support with Ubuntu Advantage Cloud Guest
  http://www.ubuntu.com/business/services/cloud

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

ubuntu@ko1:~$
Chef for Infrastructure Portability




•   knife openstack
•   knife hp
•   knife rackspace
•   knife ec2
•   ... and many others
Chef for OpenStack Roadmap



•   Documentation
•   Hypervisors (LXC, Hyper-V)
•   Databases (PostgreSQL)
•   Operating Systems (RHEL, Debian, SUSE)
•   HA Configurations
•   Quantum (pluggable)
•   Cinder (pluggable)
•   Community Events (NYC Nov 13)
Chef for OpenStack Ecosystem




•   Cookbooks reusable outside of OpenStack
•   TestKitchen
•   Librarian
•   Spiceweasel
•   pxe_dust
•   knife-rackspace/hp/dreamhost
•   Crowbar
Chef for OpenStack TL;DL




•   Opscode.com/openstack
•   Project, not a product
•   Lots of contributors with real
    deployments
•   Essex works, Folsom started
•   Features driven by demand
    (show up for what you want)
•   Documentation with examples
Thanks!


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

More Related Content

PDF
Achieving Infrastructure Portability with Chef
PDF
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
PDF
Managing Complexity at Velocity
PDF
SCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud Infrastructure
PDF
OpenStack Deployments with Chef
PDF
Chef for OpenStack: OpenStack Spring Summit 2013
PDF
Opscode-Eucalyptus Webinar 20110721
PDF
Deploying OpenStack with Chef
Achieving Infrastructure Portability with Chef
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
Managing Complexity at Velocity
SCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud Infrastructure
OpenStack Deployments with Chef
Chef for OpenStack: OpenStack Spring Summit 2013
Opscode-Eucalyptus Webinar 20110721
Deploying OpenStack with Chef

What's hot (20)

PDF
OpenStack Austin Meetup January 2014: Chef + OpenStack
PDF
Chef & OpenStack: OSCON 2014
PDF
Boston/NYC Chef for OpenStack Hack Days
PDF
OSDC 2013 | Introduction into Chef by Andy Hawkins
KEY
Novalug 07142012
PDF
Australian OpenStack User Group August 2012: Chef for OpenStack
PDF
Chef for OpenStack: Grizzly Roadmap
PDF
SCALE 10x Build a Cloud Day
PDF
Atlanta OpenStack 2014 Chef for OpenStack Deployment Workshop
PDF
OpenStack Deployment with Chef Workshop
PDF
Velocity 2011 Chef OpenStack Workshop
PDF
Chef 11 Preview/Chef for OpenStack
PDF
24HOP Introduction to Linux for SQL Server DBAs
KEY
Practical introduction to dev ops with chef
PDF
Chef for OpenStack December 2012
PDF
#WeSpeakLinux Session
PDF
Overview of Chef - Fundamentals Webinar Series Part 1
PPTX
To Build My Own Cloud with Blackjack…
PDF
Spark Summit Europe: Building a REST Job Server for interactive Spark as a se...
OpenStack Austin Meetup January 2014: Chef + OpenStack
Chef & OpenStack: OSCON 2014
Boston/NYC Chef for OpenStack Hack Days
OSDC 2013 | Introduction into Chef by Andy Hawkins
Novalug 07142012
Australian OpenStack User Group August 2012: Chef for OpenStack
Chef for OpenStack: Grizzly Roadmap
SCALE 10x Build a Cloud Day
Atlanta OpenStack 2014 Chef for OpenStack Deployment Workshop
OpenStack Deployment with Chef Workshop
Velocity 2011 Chef OpenStack Workshop
Chef 11 Preview/Chef for OpenStack
24HOP Introduction to Linux for SQL Server DBAs
Practical introduction to dev ops with chef
Chef for OpenStack December 2012
#WeSpeakLinux Session
Overview of Chef - Fundamentals Webinar Series Part 1
To Build My Own Cloud with Blackjack…
Spark Summit Europe: Building a REST Job Server for interactive Spark as a se...
Ad

Viewers also liked (11)

PDF
TDD for DevOps with Chef
PDF
Cloud Computing is not simple - The complexity is in the details
PDF
Invox - Présentation Générale - Content Marketing & Marketing Automation
PDF
Compliance Automation Workshop
KEY
Infrastructure Automation with Chef
PPTX
Don't let this happen to you! Cloud, complexity and drift
PPTX
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
PDF
DEVOPS - La synthèse
PDF
Journée DevOps : Les piliers du déploiement applicatif avec XL Deploy de Xebi...
PDF
Chef human talks montpellier lite
PPTX
Introduction à la démarche Devops
TDD for DevOps with Chef
Cloud Computing is not simple - The complexity is in the details
Invox - Présentation Générale - Content Marketing & Marketing Automation
Compliance Automation Workshop
Infrastructure Automation with Chef
Don't let this happen to you! Cloud, complexity and drift
DevOps and Continuous Delivery Reference Architectures (including Nexus and o...
DEVOPS - La synthèse
Journée DevOps : Les piliers du déploiement applicatif avec XL Deploy de Xebi...
Chef human talks montpellier lite
Introduction à la démarche Devops
Ad

Similar to Chef for OpenStack - OpenStack Fall 2012 Summit (20)

PDF
Chef For OpenStack Overview
PDF
201304 chef for open stack overview
PDF
201304 chef for open stack overview
PDF
SCALE12X: Chef for OpenStack
PDF
Webinar - DreamObjects/Ceph Case Study
PPTX
Why Kubernetes as a container orchestrator is a right choice for running spar...
PDF
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
PDF
TechBeats #2
PDF
IBM InterConnect 2015 - IIB in the Cloud
PPTX
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
PPTX
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
PDF
Play Framework and Activator
PDF
Introduction to node js - From "hello world" to deploying on azure
PDF
Apache Spark on Kubernetes Anirudh Ramanathan and Tim Chen
PDF
Introduction to Chef
PDF
A closer look to locaweb IaaS
PPTX
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
PDF
Openstack India May Meetup
PDF
Java Night 2010 SteamCannon
PDF
Getting Started with MariaDB with Docker
Chef For OpenStack Overview
201304 chef for open stack overview
201304 chef for open stack overview
SCALE12X: Chef for OpenStack
Webinar - DreamObjects/Ceph Case Study
Why Kubernetes as a container orchestrator is a right choice for running spar...
Leonid Vasilyev "Building, deploying and running production code at Dropbox"
TechBeats #2
IBM InterConnect 2015 - IIB in the Cloud
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Play Framework and Activator
Introduction to node js - From "hello world" to deploying on azure
Apache Spark on Kubernetes Anirudh Ramanathan and Tim Chen
Introduction to Chef
A closer look to locaweb IaaS
Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure
Openstack India May Meetup
Java Night 2010 SteamCannon
Getting Started with MariaDB with Docker

More from Matt Ray (20)

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

Recently uploaded (20)

PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PDF
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
PPTX
Build Your First AI Agent with UiPath.pptx
DOCX
Basics of Cloud Computing - Cloud Ecosystem
PDF
Comparative analysis of machine learning models for fake news detection in so...
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PPTX
Microsoft Excel 365/2024 Beginner's training
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PDF
CloudStack 4.21: First Look Webinar slides
PPTX
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
4 layer Arch & Reference Arch of IoT.pdf
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PPTX
Training Program for knowledge in solar cell and solar industry
PDF
STKI Israel Market Study 2025 version august
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
A review of recent deep learning applications in wood surface defect identifi...
The influence of sentiment analysis in enhancing early warning system model f...
Credit Without Borders: AI and Financial Inclusion in Bangladesh
The-2025-Engineering-Revolution-AI-Quality-and-DevOps-Convergence.pdf
Build Your First AI Agent with UiPath.pptx
Basics of Cloud Computing - Cloud Ecosystem
Comparative analysis of machine learning models for fake news detection in so...
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Early detection and classification of bone marrow changes in lumbar vertebrae...
Microsoft Excel 365/2024 Beginner's training
Improvisation in detection of pomegranate leaf disease using transfer learni...
CloudStack 4.21: First Look Webinar slides
AI IN MARKETING- PRESENTED BY ANWAR KABIR 1st June 2025.pptx
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
4 layer Arch & Reference Arch of IoT.pdf
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
Training Program for knowledge in solar cell and solar industry
STKI Israel Market Study 2025 version august
Custom Battery Pack Design Considerations for Performance and Safety
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION

Chef for OpenStack - OpenStack Fall 2012 Summit

  • 1. Chef for OpenStack Matt Ray [email protected] IRC/Twitter/GitHub: mattray www.opscode.com/openstack
  • 3. Chef makes it easier.
  • 6. See Nodes Grow Application Server Application Databases
  • 7. See Nodes Grow Application Servers Application Databases
  • 8. See Nodes Grow Load Balancer Application Servers Application Databases
  • 9. See Nodes Grow Load Balancers Application Servers Application Databases
  • 10. See Nodes Grow Load Balancers Application Servers Application Database Cache Application Databases
  • 11. Tied together with Config Load Balancers Application Servers Application Database Cache Application Databases
  • 12. Infrastructure is a Snowflake Load Balancers Application Servers Application Database Cache Floating IP? Application Databases
  • 13. Evolving Complexity Load Balancers ApplicationCache Application Servers NoSQL Database Cache Database Slaves Database
  • 15. And it Continues to Evolve Tell me about Chef! http://www.flickr.com/photos/16339684@N00/2681435235/
  • 16. Chef is Infrastructure as Code • Programmatically provision and configure • Treat like any other code base • Reconstruct business from code repository, data backup, and bare metal resources. http://www.flickr.com/photos/louisb/4555295187/
  • 17. Nodes • Chef-Client generates configurations directly on nodes from their run list • Reduce management complexity through abstraction • Store the configuration of your programs in version control http://www.flickr.com/photos/ssoosay/5126146763/
  • 18. Collections of Resources • Networking • Routes • Users • Files • Groups • Directories • Tasks • Symlinks • Packages • Mounts • Software • Services • Configurations • Other Stuff http://www.flickr.com/photos/stevekeys/3123167585/
  • 19. Declarative Interface to Resources • Define policy • Say what, not how • Pull not Push http://www.flickr.com/photos/bixentro/2591838509/
  • 20. Recipes and Cookbooks • Recipes are collections of Resources • Cookbooks contain recipes, templates, files, custom resources, etc • Code re-use and modularity • Hundreds already on Community.opscode.com http://www.flickr.com/photos/shutterhacks/4474421855/
  • 21. Ruby! extra_packages = case node['platform'] when "ubuntu","debian" %w{ ruby1.8 ruby1.8-dev rdoc1.8 ri1.8 libopenssl-ruby } end extra_packages.each do |pkg| package pkg do action :install end end
  • 22. Search • Search for nodes with Roles • Find configuration data • IP addresses • Hostnames • FQDNs http://www.flickr.com/photos/kathycsus/2686772625
  • 23. Pass Results to Templates pool_members = search("node","role:webserver”) template "/etc/haproxy/haproxy.cfg" do source "haproxy-app_lb.cfg.erb" owner "root" group "root" mode 0644 variables :pool_members => pool_members.uniq notifies :restart, "service[haproxy]" end
  • 24. Pass Results to Templates # Set up application listeners here. listen application 0.0.0.0:80 balance roundrobin <% @pool_members.each do |member| -%> server <%= member[:hostname] %> <%= member[:ipaddress] %>:> weight 1 maxconn 1 check <% end -%> <% if node["haproxy"]["enable_admin"] -%> listen admin 0.0.0.0:22002 mode http stats uri / <% end -%>
  • 25. So when this Graphite Nagios Jboss App Memcache Postgres Slaves Postgres Master
  • 26. Becomes this Graphite Nagios Jboss App Memcache Postgres Slaves Postgres Master
  • 27. Updates can be automatic Graphite Nagios Jboss App Memcache Postgres Slaves Postgres Master
  • 28. Count the resources • Load balancer config Graphite Nagios • Nagios host ping • Nagios host ssh Jboss App • Nagios host HTTP • Nagios host app health Memcache • Graphite CPU • Graphite Memory Postgres Slaves • Graphite Disk • Graphite SNMP • Memcache firewall • 12+ resource changes for 1 node addition • Postgres firewall Postgres authZ config
  • 29. 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/
  • 30. 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/
  • 31. The Chef Community • Apache License, Version 2.0 • 900+ Individual contributors • 160+ Corporate contributors • HP, Dell, Rackspace, VMware, Calxeda, SUSE and many more • 600+ cookbooks • http://community.opscode.com
  • 32. What's Out There? Chef for OpenStack Resources
  • 33. Chef for OpenStack: Why • Community for the automated deployment and management of OpenStack • Reduce fragmentation and encourage collaboration • Deploying OpenStack is not "secret sauce" • Project not a product • Apache 2 license
  • 34. Chef for OpenStack: What • Chef Repository for Deploying OpenStack • Documentation for Chef for OpenStack • Cookbooks • Keystone • Glance • Nova • Horizon • Swift • Knife OpenStack
  • 35. Chef for OpenStack: Where • opscode.com/openstack • groups.google.com/group/opscode-chef- openstack • #openstack-chef on irc.freenode.net • github.com/opscode/openstack-chef-repo • github.com/mattray/openstack-chef-docs • github.com/opscode-cookbooks/ • keystone, glance, nova, horizon, swift • github.com/opscode/knife-openstack
  • 37. Rackspace Private Cloud: Alamo • Initial fork of current cookbooks • github.com/rcbops/chef-cookbooks • www.rackspace.com/cloud/private/
  • 38. Chef for OpenStack: When • Essex is working • KVM • Ubuntu 12.04 • Folsom has already started • LXC • Red Hat • Grizzly and forward
  • 39. Chef for OpenStack: How github.com/mattray/openstack-chef-docs
  • 40. Deploying OpenStack • Chef ties it all together automatically • Scaling changes how we deploy • Interchangeable components • Configurations shared, supported & documented • Licensing makes it available to everyone
  • 42. knife openstack $ knife openstack Available openstack subcommands: (for details, knife SUB- COMMAND --help) ** OPENSTACK COMMANDS ** knife openstack flavor list (options) knife openstack image list (options) knife openstack server create (options) knife openstack server delete SERVER [SERVER] (options) knife openstack server list (options)
  • 43. knife openstack flavor list $ knife openstack flavor list ID Name Virtual CPUs RAM Disk 1 m1.tiny 1 512 MB 0 GB 2 m1.small 2 2048 MB 20 GB 3 m1.medium 2 4096 MB 40 GB 4 m1.large 2 8192 MB 80 GB 5 m1.xlarge 4 16384 MB 160 GB
  • 44. knife openstack image list $ knife openstack image list ID Name 13 natty-server-cloudimg-amd64 12 natty-server-cloudimg-amd64-kernel 15 oneiric-server-cloudimg-amd64 14 oneiric-server-cloudimg-amd64-kernel
  • 45. knife openstack server create knife openstack server create --node-name ko1 --flavor 1 --image 13 -S trystack
  • 47. $ ssh -i ~/.ssh/trystack.pem [email protected] The authenticity of host '8.21.28.24 (8.21.28.24)' can't be established. RSA key fingerprint is 0c:d8:3e:34:d1:de:c4:ee:5f:bc:b5:89:11:0d:73:e0. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '8.21.28.24' (RSA) to the list of known hosts. Welcome to Ubuntu 11.04 (GNU/Linux 2.6.38-13-virtual x86_64) * Documentation: https://help.ubuntu.com/ System information as of Thu Feb 16 23:43:29 UTC 2012 System load: 0.08 Processes: 63 Usage of /: 40.8% of 1.35GB Users logged in: 0 Memory usage: 6% IP address for eth0: 8.21.28.24 Swap usage: 0% --------------------------------------------------------------------- <snip> Get cloud support with Ubuntu Advantage Cloud Guest http://www.ubuntu.com/business/services/cloud The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. To run a command as administrator (user "root"), use "sudo <command>". See "man sudo_root" for details. ubuntu@ko1:~$
  • 48. Chef for Infrastructure Portability • knife openstack • knife hp • knife rackspace • knife ec2 • ... and many others
  • 49. Chef for OpenStack Roadmap • Documentation • Hypervisors (LXC, Hyper-V) • Databases (PostgreSQL) • Operating Systems (RHEL, Debian, SUSE) • HA Configurations • Quantum (pluggable) • Cinder (pluggable) • Community Events (NYC Nov 13)
  • 50. Chef for OpenStack Ecosystem • Cookbooks reusable outside of OpenStack • TestKitchen • Librarian • Spiceweasel • pxe_dust • knife-rackspace/hp/dreamhost • Crowbar
  • 51. Chef for OpenStack TL;DL • Opscode.com/openstack • Project, not a product • Lots of contributors with real deployments • Essex works, Folsom started • Features driven by demand (show up for what you want) • Documentation with examples
  • 52. Thanks! Matt Ray [email protected] IRC/Twitter/GitHub: mattray www.opscode.com/openstack