SlideShare a Scribd company logo
Automated Deployment
of OpenStack with Chef
    Texas Linux Fest
      April 2, 2011
                         1
Introductions

            Matt Ray
            Senior Technical Evangelist
            matt@opscode.com
            @mattray
            GitHub:mattray

                                          2
What is OpenStack?



                     3
Founders
 operate at
massive scale
                 NASA



                         4
OpenStack: The Mission

           "To produce the ubiquitous Open
           Source cloud computing platform
           that will meet the needs of public
           and private cloud providers
           regardless of size, by being simple to
           implement and massively scalable."




                                                    5
OpenStack Founding Principles

          Apache 2.0 license (OSI), open development process
          Open design process, 2x year public Design
          Summits
          Publicly available open source code repositories
          Open community processes documented and
          transparent
          Commitment to drive and adopt open standards
          Modular design for deployment flexibility via APIs



                                                               6
Community with Broad Support




                               7
Software to provision virtual machines on
                    standard hardware at massive scale

OpenStack Compute


creating open source software
  to build public and private
            clouds
                    Software to reliably store billions of objects
                    distributed across standard hardware

 OpenStack
Object Storage




                                                                     8
OpenStack Compute Key Features

                                             ReST-based API
       Asynchronous
 eventually consistent
      communication



                                                        Horizontally and
                                                        massively scalable



        Hypervisor agnostic:
      support for Xen ,XenServer, Hyper-V,
            KVM, UML and ESX is coming
                                                 Hardware agnostic:
                                                 standard hardware, RAID not required

                                                                                        9
User Manager




Cloud Controller: Global state of
system, talks to LDAP, OpenStack
Object Storage, and node/storage
workers through a queue
                                                            ATAoE / iSCSI




API: Receives HTTP requests,
converts commands to/from API
format, and sends requests to cloud
controller

                                                              Host Machines: workers
                                                              that spawn instances

                                        Glance: HTTP + OpenStack Object
OpenStack Compute                       Storage for server images


                                                                                   10
Hardware Requirements

           OpenStack is designed to run on industry
           standard hardware, with flexible configurations

         Compute
         x86 Server (Hardware Virt. recommended)
         Storage flexible (Local, SAN, NAS)

         Object Storage
         x86 Server (other architectures possible)
         Do not deploy with RAID (can use controller for cache)




                                                                  11
Why is OpenStack important?


         Open eliminates vendor lock-in
         Working together, we all go faster
         Freedom to federate, or move
          between clouds



                                              12
What is Chef?



                13
Chef enables Infrastructure as Code


           Manage configuration as idempotent
           Resources.
           Put them together in Recipes.
           Track it like Source Code.
           Configure your servers.



                                               14
At a High Level


           Library for configuration management
           Configuration management system
           Systems integration platform
           API for your entire Infrastructure



                                                 15
Fully automated
 Infrastructure


                  16
Principles


             Idempotent
             Data-driven
             Sane defaults
             Hackability
             TMTOWTDI

                             17
Open Source and Community


          Apache 2 licensed
          Large and active community
          Over 300 individual contributors
          (60+ corporate)
          Community is Important!


                                             18
19
How does it Work?



                    20
How does it Work?
    Miracles!

                    21
How does it Work?
    Miracles!
   (no really)
                    22
Chef Client runs on
  your System


                      23
Chef Client runs on
  your System
       ohai!


                      24
Clients talk to the
   Chef Server


                      25
The Opscode Platform
is a hosted Chef Server



                          26
We call each system
 you configure a
        Node

                      27
Nodes have Attributes
{
  "kernel": {
     "machine": "x86_64",
     "name": "Darwin",
                                       Kernel info!
     "os": "Darwin",
     "version": "Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010;
root:xnu-1504.7.4~1/RELEASE_I386",

  },
     "release": "10.4.0"                               Platform info!
  "platform_version": "10.6.4",
  "platform": "mac_os_x",
  "platform_build": "10F569",
  "domain": "local",
  "os": "darwin",
  "current_user": "mray",
  "ohai_time": 1278602661.60043,
  "os_version": "10.4.0",
                                                       Hostname and IP!
  "uptime": "18 days 17 hours 49 minutes 18 seconds",
  "ipaddress": "10.13.37.116",
  "hostname": "morbo",
  "fqdn": "morbomorbo.local",
  "uptime_seconds": 1619358
}


                                                                               28
Nodes have a Run List
  What Roles and Recipes
    to Apply in Order



                           29
Nodes have Roles
webserver, database, monitoring, etc.




                                        30
Roles have a Run List
  What Roles and Recipes
    to Apply in Order



                           31
name "webserver"
description "Systems that serve HTTP traffic"

run_list(
  "role[base]",
  "recipe[apache2]",
  "recipe[apache2::mod_ssl]"
)

default_attributes(
  "apache" => {
    "listen_ports" => [ "80", "443" ]
  }
)

override_attributes(
  "apache" => {
    "max_children" => "50"
  }
)
                                                32
                                                32
name "webserver"
description "Systems that serve HTTP traffic"

run_list(
  "role[base]",
                                 Can include
  "recipe[apache2]",             other roles!
  "recipe[apache2::mod_ssl]"
)

default_attributes(
  "apache" => {
    "listen_ports" => [ "80", "443" ]
  }
)

override_attributes(
  "apache" => {
    "max_children" => "50"
  }
)
                                                32
                                                32
Chef manages
Resources on Nodes


                     33
Resources




   Declare a description of the state a part of the node should be in

                                                                        34
Resources
                               package "apache2" do
                                 version "2.2.11-2ubuntu2.6"
                                 action :install
                               end

                               template "/etc/apache2/apache2.conf" do
                                 source "apache2.conf.erb"
                                 owner "root"
                                 group "root"
                                 mode 0644
                                 action :create
                               end


   Declare a description of the state a part of the node should be in

                                                                         34
Resources

 ‣ Have a type                 package "apache2" do
                                 version "2.2.11-2ubuntu2.6"
                                 action :install
                               end

                               template "/etc/apache2/apache2.conf" do
                                 source "apache2.conf.erb"
                                 owner "root"
                                 group "root"
                                 mode 0644
                                 action :create
                               end


   Declare a description of the state a part of the node should be in

                                                                         34
Resources

 ‣ Have a type                 package "apache2" do
                                 version "2.2.11-2ubuntu2.6"
                                 action :install
 ‣ Have a name                 end

                               template "/etc/apache2/apache2.conf" do
                                 source "apache2.conf.erb"
                                 owner "root"
                                 group "root"
                                 mode 0644
                                 action :create
                               end


   Declare a description of the state a part of the node should be in

                                                                         34
Resources

 ‣ Have a type                 package "apache2" do
                                 version "2.2.11-2ubuntu2.6"
                                 action :install
 ‣ Have a name                 end

                               template "/etc/apache2/apache2.conf" do
 ‣ Have parameters               source "apache2.conf.erb"
                                 owner "root"
                                 group "root"
                                 mode 0644
                                 action :create
                               end


   Declare a description of the state a part of the node should be in

                                                                         34
Resources

 ‣ Have a type                  package "apache2" do
                                  version "2.2.11-2ubuntu2.6"
                                  action :install
 ‣ Have a name                  end

                                template "/etc/apache2/apache2.conf" do
 ‣ Have parameters                source "apache2.conf.erb"
                                  owner "root"
 ‣ Take action to put the         group "root"
                                  mode 0644
   resource in the                action :create
   declared state               end


    Declare a description of the state a part of the node should be in

                                                                          34
Resources take action
  through Providers



                        35
Recipes are lists of
   Resources


                       36
Recipes

                                           1
                           package "apache2" do
                             version "2.2.11-2ubuntu2.6"
                             action :install
                           end

  Evaluate and apply       template "/etc/apache2/apache2.conf" do
  Resources in the order     source "apache2.conf.erb"
                             owner "root"
  they appear                group "root"
                             mode 0644
                             action :create2
                           end




                                                                     37
Order Matters



                38
Recipes are just 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


                                        39
Cookbooks are
packages for Recipes



                       40
Cookbooks

            Distributable, shareable
            comunity.opscode.com
            Infrastructure as Code
            Versioned
            Hundreds

                                       41
Cookbooks

            Recipes
            Files
            Templates
            Attributes
            Metadata

                         42
Data bags store
 arbitrary data


                  43
A user data bag item...
% knife data bag show users mray
{
  "comment": "Matt Ray",
  "groups": "sysadmin",
  "ssh_keys": "ssh-rsa SUPERSEKRATS mray@morbo",
  "files": {
     ".bashrc": {
        "mode": "0644",
        "source": "dot-bashrc"
     },
     ".emacs": {
        "mode": "0644",
        "source": "dot-emacs"
     }
  },
  "id": "mray",
  "uid": 7004,
  "shell": "/usr/bin/bash"
  }

                                                   44
Environments manage
versioned infrastructure



                           45
Command-line API
  utility, Knife


       http://www.flickr.com/photos/myklroventine/3474391066/
     Copyright © 2011 Opscode, Inc - All Rights Reserved       46
                                                               46
Search
                         $ knife search node 'platform:ubuntu'
‣ CLI or in Ruby
                         search(:node, ‘platform:centos’)
‣ Nodes are searchable   $ knife search role 'max_children:50'

‣ Roles are searchable   search(:role, ‘max_children:50’)

‣ Recipes are            $ knife search node ‘role:webserver’

 searchable              search(:node, ‘role:webserver’)

‣ Data bags are          $ knife users ‘shell:/bin/bash’

 searchable              search (:users, ‘group:sysadmins’)




                                                                 47
48
HOW TO: Turn Racks of
Standard Hardware Into a
  Cloud with OpenStack




                           49
What Works Today?




                    50
Compute (Nova)

          Single machine installation
         ‣ Role: nova-single-machine
         ‣ MySQL, RabbitMQ
         ‣ Nova-(api|scheduler|network|objectstore|compute)
          Multi-machine
         ‣ Role: nova-multi-controller (1)
         ‣ Role: nova-multi-compute (N)


                                                              51
Role: nova-single-machine
name "nova-single-machine-install"

description "Installs everything required to run Nova on a single
machine"

run_list(
            "role[nova-multi-controller]",
            "role[nova-multi-compute]"
            )




                                                                    52
Role: nova-multi-controller
name "nova-multi-controller"

description "Installs requirements to run the Controller node in a
Nova cluster"

run_list(
            "role[nova-support-server]",
            "role[nova-head]",
            "role[nova-cloud-controller]",
            "role[nova-super-user-setup]"
            )




                                                                     53
Role: nova-multi-compute
name "nova-multi-compute"

description "Installs requirements to run a Compute node in a Nova
cluster"

run_list(
    "recipe[nova::compute]"
)




                                                                     54
What does this look like?




                            55
Crowbar

‣ Codename for the OpenStack
 installer from Dell
 ‣ Dell is releasing this under the
  Apache 2 license
 ‣ Extension of the Chef server
 ‣ Jointly developed by Dell,
  Rackspace and Opscode



                                      56
Crowbar - What does it Do?
‣ Crowbar is a PXE state machine
‣ starts with bare metal hardware
‣ manages and configures BIOS
 and network settings
‣ network boot and installation
‣ nodes are configured with Chef
‣ deploys OpenStack, could be
 used for anything


                                    57
OpenStack Installation



‣ Cookbooks uploaded   $
                       $
                           knife cookbook upload -a
                           knife cookbook list
                       $   rake roles
‣ Roles uploaded       $   knife role list
                       $   knife node list
‣ Nodes ready




                                                      58
AMIs
name "nova-ami-urls"
description "Feed in a list URLs for AMIs to download"
default_attributes(
  "nova" => {
    "images" =>
["http://192.168.11.7/ubuntu1010-UEC-localuser-image.tar.gz”]
      }
  )

$ knife role from file roles/nova-ami-urls.rb


‣ Use an existing AMI
‣ Update URL to your own

                                                                59
Assign the Roles
$ knife node run_list add crushinator.localdomain "role[nova-ami-
urls]"
{
  "run_list": [
    "role[nova-ami-urls]"
  ]
}

$ knife node run_list add crushinator.localdomain "role[nova-single-
machine-install]"
{
  "run_list": [
    "role[nova-ami-urls]"
    "role[nova-single-machine-install]",
  ]
}



                                                                       60
chef-client
mray@ubuntu1010:~$ sudo chef-client
[Fri, 25 Feb 2011 11:52:59 -0800] INFO:   Starting Chef Run (Version
0.9.12)
...
[Fri, 25 Feb 2011 11:56:05 -0800] INFO:   Chef Run complete in
5.911955 seconds
[Fri, 25 Feb 2011 11:56:05 -0800] INFO:   cleaning the checksum cache
[Fri, 25 Feb 2011 11:56:05 -0800] INFO:   Running report handlers
[Fri, 25 Feb 2011 11:56:05 -0800] INFO:   Report handlers complete




                                                                        61
The Moment of Truth
nova@$ nova-manage service list

nova@$ euca-describe-images

nova@$ euca-run-instances ami-h8wh0j17 -k mykey -t m1.tiny

nova@$ euca-describe-instances

nova@$ ssh -i mykey.priv ubuntu@10.0.0.2

Linux i-00000001 2.6.35-24-virtual #42-Ubuntu SMP Thu Mar 30
05:15:26 UTC 2011 x86_64 GNU/Linux
Ubuntu 10.10

Welcome to Ubuntu!
<SNIP>
See "man sudo_root" for details.

ubuntu@i-00000001:~$
                                                               62
How Did We Get Here?




                       63
Forked from Anso Labs’ Cookbooks



        Bootstrapped by Opscode

        Chef Solo/Vagrant installs for Developers

        http://github.com/ansolabs/openstack-cookbooks




                                                         64
Who’s involved
so far?




                 65
What’s Next?




               66
Nova needed enhancements

         Pluggable/Modular Roles
         ‣ Database
         ‣ ObjectStore
         ‣ Network
         ‣ Virtualization
         Swift and Glance integration


                                        67
68
Dashboard




            69
Knife


        ‣ http://github.com/opscode/knife-openstack
        ‣ Nova has same API as Amazon
        ‣ Fog supports OpenStack already
        ‣ knife openstack server create ‘role
         [base]’ -i ami-a403f6xd -f m1.micro -
         A “OpenStack instance”




                                                      70
Object Storage (Swift)



           ‣ Recipes originated from Anso Labs’ repository
           ‣ Will be managed with Chef and Crowbar
           ‣ Included in the ‘bexar’ branch
           ‣ Untested so far (Cactus will tackle)




                                                             71
Image Registry (Glance)



          ‣ Recipes originated from Anso Labs’ repository
          ‣ Will be managed with Chef and Crowbar
          ‣ Included in the ‘bexar’ branch
          ‣ Untested so far (Cactus!)




                                                            72
Scaling changes how
we deploy OpenStack!



                       73
Deployment Scenarios

         ‣ Single machine is special case of multi-install
         ‣ Controller + Compute nodes is a known quantity
          for small installations

         ‣ Nova + Swift + Glance in large installations
         ‣ Services separated and HA configurations
          supported

         ‣ Documentation and Chef Roles will be the
          solution


                                                             74
Cactus, Diablo, ...


            Development continues...
            Branches for each stable release
            Design Summit later this month
            Design Summit in the Fall




                                               75
Rackspace Cloud Builders

          Commercial support and Training for
          OpenStack
          ‣ Opscode
          ‣ Dell
          ‣ Equinix
          ‣ Cloudscaling
          ‣ Citrix


                                                76
Get Involved!

    https://github.com/mattray/openstack-cookbooks/tree/bexar
    http://lists.openstack.org
    http://lists.opscode.com
    #chef on irc.freenode.net
    #openstack on irc.freenode.net
    matt@opscode.com
    jordan@openstack.com



                                                                77

More Related Content

What's hot (19)

PPTX
Protect your app from Outages
Ron Zavner
 
PDF
OpenStack Deployments with Chef
Matt Ray
 
PDF
Chef 11 Preview/Chef for OpenStack
Matt Ray
 
PDF
Ninja, Choose Your Weapon!
Anton Weiss
 
PDF
OpenStack in Enterprise
Nalee Jang
 
PDF
SCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud Infrastructure
Matt Ray
 
PDF
DevOps Enabling Your Team
GR8Conf
 
PDF
OpenStack 101 Technical Overview
Open Stack
 
ODP
OpenStack DevStack Configuration localrc local.conf Tutorial
Saju Madhavan
 
PDF
Chef for OpenStack - OpenStack Fall 2012 Summit
Matt Ray
 
PDF
24HOP Introduction to Linux for SQL Server DBAs
Kellyn Pot'Vin-Gorman
 
PPTX
DevStack: Learn OpenStack by Running OpenStack
Everett Toews
 
PPTX
Quick overview of Openstack architecture
Toni Ramirez
 
PDF
Managing Complexity at Velocity
Matt Ray
 
PDF
Cloud-native .NET-Microservices mit Kubernetes @BASTAcon
Mario-Leander Reimer
 
PDF
Kayobe_desc
ssuser8fea38
 
PDF
#WeSpeakLinux Session
Kellyn Pot'Vin-Gorman
 
PPTX
Docker, Mesos, Spark
Qiang Wang
 
PDF
Amazon EC2 Container Service in Action
Remotty
 
Protect your app from Outages
Ron Zavner
 
OpenStack Deployments with Chef
Matt Ray
 
Chef 11 Preview/Chef for OpenStack
Matt Ray
 
Ninja, Choose Your Weapon!
Anton Weiss
 
OpenStack in Enterprise
Nalee Jang
 
SCALE12X Build a Cloud Day: Chef: The Swiss Army Knife of Cloud Infrastructure
Matt Ray
 
DevOps Enabling Your Team
GR8Conf
 
OpenStack 101 Technical Overview
Open Stack
 
OpenStack DevStack Configuration localrc local.conf Tutorial
Saju Madhavan
 
Chef for OpenStack - OpenStack Fall 2012 Summit
Matt Ray
 
24HOP Introduction to Linux for SQL Server DBAs
Kellyn Pot'Vin-Gorman
 
DevStack: Learn OpenStack by Running OpenStack
Everett Toews
 
Quick overview of Openstack architecture
Toni Ramirez
 
Managing Complexity at Velocity
Matt Ray
 
Cloud-native .NET-Microservices mit Kubernetes @BASTAcon
Mario-Leander Reimer
 
Kayobe_desc
ssuser8fea38
 
#WeSpeakLinux Session
Kellyn Pot'Vin-Gorman
 
Docker, Mesos, Spark
Qiang Wang
 
Amazon EC2 Container Service in Action
Remotty
 

Viewers also liked (20)

PDF
DevOps and Chef
Jonathan Hitchcock
 
PDF
SCALE 2011 Deploying OpenStack with Chef
Matt Ray
 
PDF
Dell Crowbar and OpenStack at OSCON
Open Stack
 
POTX
Using the Splunk Java SDK
Damien Dallimore
 
PDF
SRE in Startup
Ladislav Prskavec
 
DOCX
Linux Server Hardening - Steps by Steps
Sunil Paudel
 
PDF
Modern Web App Development using ClojureScript & React.js / Baishampayan “BG”...
Ontico
 
PDF
Introduction to Apache Synapse
Hiranya Jayathilaka
 
PPTX
Event Driven Architecture - MeshU - Ilya Grigorik
Ilya Grigorik
 
PDF
Best Practice for Deploying Application with Heat
Ethan Lynn
 
PDF
Are We Done Yet ? Testing Your OpenStack Deployment
Ken Pepple
 
PDF
React.jsでHowManyPizza
松田 千尋
 
PPTX
Mirantis open stack deployment automation
WooKyun Jeon
 
PDF
Patterns and Practices of a Successful DevOps Transformation
Chef
 
PPTX
REST Coder: Auto Generating Client Stubs and Documentation for REST APIs
Hiranya Jayathilaka
 
PDF
Rest in flask
Yehor Nazarkin
 
PDF
Reliable Python REST API (by Volodymyr Hotsyk) - Web Back-End Tech Hangout - ...
Innovecs
 
PDF
An introduction to React.js
Emanuele DelBono
 
PDF
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
Rob Tweed
 
PDF
OpenStack Architecture: Past and Future
Ken Pepple
 
DevOps and Chef
Jonathan Hitchcock
 
SCALE 2011 Deploying OpenStack with Chef
Matt Ray
 
Dell Crowbar and OpenStack at OSCON
Open Stack
 
Using the Splunk Java SDK
Damien Dallimore
 
SRE in Startup
Ladislav Prskavec
 
Linux Server Hardening - Steps by Steps
Sunil Paudel
 
Modern Web App Development using ClojureScript & React.js / Baishampayan “BG”...
Ontico
 
Introduction to Apache Synapse
Hiranya Jayathilaka
 
Event Driven Architecture - MeshU - Ilya Grigorik
Ilya Grigorik
 
Best Practice for Deploying Application with Heat
Ethan Lynn
 
Are We Done Yet ? Testing Your OpenStack Deployment
Ken Pepple
 
React.jsでHowManyPizza
松田 千尋
 
Mirantis open stack deployment automation
WooKyun Jeon
 
Patterns and Practices of a Successful DevOps Transformation
Chef
 
REST Coder: Auto Generating Client Stubs and Documentation for REST APIs
Hiranya Jayathilaka
 
Rest in flask
Yehor Nazarkin
 
Reliable Python REST API (by Volodymyr Hotsyk) - Web Back-End Tech Hangout - ...
Innovecs
 
An introduction to React.js
Emanuele DelBono
 
EWD 3 Training Course Part 41: Building a React.js application with QEWD, Part 5
Rob Tweed
 
OpenStack Architecture: Past and Future
Ken Pepple
 
Ad

Similar to TXLF: Automated Deployment of OpenStack with Chef (20)

PDF
Chef For OpenStack Overview
OpenStack Foundation
 
PDF
Australian OpenStack User Group August 2012: Chef for OpenStack
Matt Ray
 
PDF
Chef for OpenStack- Fall 2012.pdf
OpenStack Foundation
 
PDF
Achieving Infrastructure Portability with Chef
Matt Ray
 
PDF
Velocity 2011 Chef OpenStack Workshop
Chef Software, Inc.
 
KEY
Using Nagios with Chef
Bryan McLellan
 
PDF
Automated infrastructure is on the menu
jtimberman
 
PDF
GeekAustin DevOps
Matt Ray
 
PDF
OSCON 2012 OpenStack Automation and DevOps Best Practices
Matt Ray
 
PDF
Build your own clouds with Chef and MCollective
Jonathan Weiss
 
PPTX
Overview: Building Open Source Cloud Computing Environments
Mark Hinkle
 
PDF
Open stack design 2012 applications targeting openstack-final
rhirschfeld
 
PDF
Let's Code our Infrastructure!
continuousphp
 
PPTX
vBACD - Crash Course in Open Source Cloud Computing - 2/28
CloudStack - Open Source Cloud Computing Project
 
KEY
SELF 2011: Deploying Django Application Stacks with Chef
Chef Software, Inc.
 
PDF
OpenStack Tutorial
Bret Piatt
 
PPTX
Sanger, upcoming Openstack for Bio-informaticians
Peter Clapham
 
PPTX
Flexible compute
Peter Clapham
 
PDF
Open nebula froscon
OpenNebula Project
 
PDF
Chef and OpenStack Workshop from ChefConf 2013
Matt Ray
 
Chef For OpenStack Overview
OpenStack Foundation
 
Australian OpenStack User Group August 2012: Chef for OpenStack
Matt Ray
 
Chef for OpenStack- Fall 2012.pdf
OpenStack Foundation
 
Achieving Infrastructure Portability with Chef
Matt Ray
 
Velocity 2011 Chef OpenStack Workshop
Chef Software, Inc.
 
Using Nagios with Chef
Bryan McLellan
 
Automated infrastructure is on the menu
jtimberman
 
GeekAustin DevOps
Matt Ray
 
OSCON 2012 OpenStack Automation and DevOps Best Practices
Matt Ray
 
Build your own clouds with Chef and MCollective
Jonathan Weiss
 
Overview: Building Open Source Cloud Computing Environments
Mark Hinkle
 
Open stack design 2012 applications targeting openstack-final
rhirschfeld
 
Let's Code our Infrastructure!
continuousphp
 
vBACD - Crash Course in Open Source Cloud Computing - 2/28
CloudStack - Open Source Cloud Computing Project
 
SELF 2011: Deploying Django Application Stacks with Chef
Chef Software, Inc.
 
OpenStack Tutorial
Bret Piatt
 
Sanger, upcoming Openstack for Bio-informaticians
Peter Clapham
 
Flexible compute
Peter Clapham
 
Open nebula froscon
OpenNebula Project
 
Chef and OpenStack Workshop from ChefConf 2013
Matt Ray
 
Ad

More from Matt Ray (20)

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

Recently uploaded (20)

PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PDF
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PPTX
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
“Computer Vision at Sea: Automated Fish Tracking for Sustainable Fishing,” a ...
Edge AI and Vision Alliance
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
Digital Circuits, important subject in CS
contactparinay1
 
AI Agents in the Cloud: The Rise of Agentic Cloud Architecture
Lilly Gracia
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
Designing_the_Future_AI_Driven_Product_Experiences_Across_Devices.pptx
presentifyai
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Transcript: Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 

TXLF: Automated Deployment of OpenStack with Chef

  • 1. Automated Deployment of OpenStack with Chef Texas Linux Fest April 2, 2011 1
  • 2. Introductions Matt Ray Senior Technical Evangelist [email protected] @mattray GitHub:mattray 2
  • 5. OpenStack: The Mission "To produce the ubiquitous Open Source cloud computing platform that will meet the needs of public and private cloud providers regardless of size, by being simple to implement and massively scalable." 5
  • 6. OpenStack Founding Principles Apache 2.0 license (OSI), open development process Open design process, 2x year public Design Summits Publicly available open source code repositories Open community processes documented and transparent Commitment to drive and adopt open standards Modular design for deployment flexibility via APIs 6
  • 8. Software to provision virtual machines on standard hardware at massive scale OpenStack Compute creating open source software to build public and private clouds Software to reliably store billions of objects distributed across standard hardware OpenStack Object Storage 8
  • 9. OpenStack Compute Key Features ReST-based API Asynchronous eventually consistent communication Horizontally and massively scalable Hypervisor agnostic: support for Xen ,XenServer, Hyper-V, KVM, UML and ESX is coming Hardware agnostic: standard hardware, RAID not required 9
  • 10. User Manager Cloud Controller: Global state of system, talks to LDAP, OpenStack Object Storage, and node/storage workers through a queue ATAoE / iSCSI API: Receives HTTP requests, converts commands to/from API format, and sends requests to cloud controller Host Machines: workers that spawn instances Glance: HTTP + OpenStack Object OpenStack Compute Storage for server images 10
  • 11. Hardware Requirements OpenStack is designed to run on industry standard hardware, with flexible configurations Compute x86 Server (Hardware Virt. recommended) Storage flexible (Local, SAN, NAS) Object Storage x86 Server (other architectures possible) Do not deploy with RAID (can use controller for cache) 11
  • 12. Why is OpenStack important? Open eliminates vendor lock-in Working together, we all go faster Freedom to federate, or move between clouds 12
  • 14. Chef enables Infrastructure as Code Manage configuration as idempotent Resources. Put them together in Recipes. Track it like Source Code. Configure your servers. 14
  • 15. At a High Level Library for configuration management Configuration management system Systems integration platform API for your entire Infrastructure 15
  • 17. Principles Idempotent Data-driven Sane defaults Hackability TMTOWTDI 17
  • 18. Open Source and Community Apache 2 licensed Large and active community Over 300 individual contributors (60+ corporate) Community is Important! 18
  • 19. 19
  • 20. How does it Work? 20
  • 21. How does it Work? Miracles! 21
  • 22. How does it Work? Miracles! (no really) 22
  • 23. Chef Client runs on your System 23
  • 24. Chef Client runs on your System ohai! 24
  • 25. Clients talk to the Chef Server 25
  • 26. The Opscode Platform is a hosted Chef Server 26
  • 27. We call each system you configure a Node 27
  • 28. Nodes have Attributes { "kernel": { "machine": "x86_64", "name": "Darwin", Kernel info! "os": "Darwin", "version": "Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386", }, "release": "10.4.0" Platform info! "platform_version": "10.6.4", "platform": "mac_os_x", "platform_build": "10F569", "domain": "local", "os": "darwin", "current_user": "mray", "ohai_time": 1278602661.60043, "os_version": "10.4.0", Hostname and IP! "uptime": "18 days 17 hours 49 minutes 18 seconds", "ipaddress": "10.13.37.116", "hostname": "morbo", "fqdn": "morbomorbo.local", "uptime_seconds": 1619358 } 28
  • 29. Nodes have a Run List What Roles and Recipes to Apply in Order 29
  • 30. Nodes have Roles webserver, database, monitoring, etc. 30
  • 31. Roles have a Run List What Roles and Recipes to Apply in Order 31
  • 32. name "webserver" description "Systems that serve HTTP traffic" run_list( "role[base]", "recipe[apache2]", "recipe[apache2::mod_ssl]" ) default_attributes( "apache" => { "listen_ports" => [ "80", "443" ] } ) override_attributes( "apache" => { "max_children" => "50" } ) 32 32
  • 33. name "webserver" description "Systems that serve HTTP traffic" run_list( "role[base]", Can include "recipe[apache2]", other roles! "recipe[apache2::mod_ssl]" ) default_attributes( "apache" => { "listen_ports" => [ "80", "443" ] } ) override_attributes( "apache" => { "max_children" => "50" } ) 32 32
  • 35. Resources Declare a description of the state a part of the node should be in 34
  • 36. Resources package "apache2" do version "2.2.11-2ubuntu2.6" action :install end template "/etc/apache2/apache2.conf" do source "apache2.conf.erb" owner "root" group "root" mode 0644 action :create end Declare a description of the state a part of the node should be in 34
  • 37. Resources ‣ Have a type package "apache2" do version "2.2.11-2ubuntu2.6" action :install end template "/etc/apache2/apache2.conf" do source "apache2.conf.erb" owner "root" group "root" mode 0644 action :create end Declare a description of the state a part of the node should be in 34
  • 38. Resources ‣ Have a type package "apache2" do version "2.2.11-2ubuntu2.6" action :install ‣ Have a name end template "/etc/apache2/apache2.conf" do source "apache2.conf.erb" owner "root" group "root" mode 0644 action :create end Declare a description of the state a part of the node should be in 34
  • 39. Resources ‣ Have a type package "apache2" do version "2.2.11-2ubuntu2.6" action :install ‣ Have a name end template "/etc/apache2/apache2.conf" do ‣ Have parameters source "apache2.conf.erb" owner "root" group "root" mode 0644 action :create end Declare a description of the state a part of the node should be in 34
  • 40. Resources ‣ Have a type package "apache2" do version "2.2.11-2ubuntu2.6" action :install ‣ Have a name end template "/etc/apache2/apache2.conf" do ‣ Have parameters source "apache2.conf.erb" owner "root" ‣ Take action to put the group "root" mode 0644 resource in the action :create declared state end Declare a description of the state a part of the node should be in 34
  • 41. Resources take action through Providers 35
  • 42. Recipes are lists of Resources 36
  • 43. Recipes 1 package "apache2" do version "2.2.11-2ubuntu2.6" action :install end Evaluate and apply template "/etc/apache2/apache2.conf" do Resources in the order source "apache2.conf.erb" owner "root" they appear group "root" mode 0644 action :create2 end 37
  • 45. Recipes are just 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 39
  • 47. Cookbooks Distributable, shareable comunity.opscode.com Infrastructure as Code Versioned Hundreds 41
  • 48. Cookbooks Recipes Files Templates Attributes Metadata 42
  • 49. Data bags store arbitrary data 43
  • 50. A user data bag item... % knife data bag show users mray { "comment": "Matt Ray", "groups": "sysadmin", "ssh_keys": "ssh-rsa SUPERSEKRATS mray@morbo", "files": { ".bashrc": { "mode": "0644", "source": "dot-bashrc" }, ".emacs": { "mode": "0644", "source": "dot-emacs" } }, "id": "mray", "uid": 7004, "shell": "/usr/bin/bash" } 44
  • 52. Command-line API utility, Knife http://www.flickr.com/photos/myklroventine/3474391066/ Copyright © 2011 Opscode, Inc - All Rights Reserved 46 46
  • 53. Search $ knife search node 'platform:ubuntu' ‣ CLI or in Ruby search(:node, ‘platform:centos’) ‣ Nodes are searchable $ knife search role 'max_children:50' ‣ Roles are searchable search(:role, ‘max_children:50’) ‣ Recipes are $ knife search node ‘role:webserver’ searchable search(:node, ‘role:webserver’) ‣ Data bags are $ knife users ‘shell:/bin/bash’ searchable search (:users, ‘group:sysadmins’) 47
  • 54. 48
  • 55. HOW TO: Turn Racks of Standard Hardware Into a Cloud with OpenStack 49
  • 57. Compute (Nova) Single machine installation ‣ Role: nova-single-machine ‣ MySQL, RabbitMQ ‣ Nova-(api|scheduler|network|objectstore|compute) Multi-machine ‣ Role: nova-multi-controller (1) ‣ Role: nova-multi-compute (N) 51
  • 58. Role: nova-single-machine name "nova-single-machine-install" description "Installs everything required to run Nova on a single machine" run_list( "role[nova-multi-controller]", "role[nova-multi-compute]" ) 52
  • 59. Role: nova-multi-controller name "nova-multi-controller" description "Installs requirements to run the Controller node in a Nova cluster" run_list( "role[nova-support-server]", "role[nova-head]", "role[nova-cloud-controller]", "role[nova-super-user-setup]" ) 53
  • 60. Role: nova-multi-compute name "nova-multi-compute" description "Installs requirements to run a Compute node in a Nova cluster" run_list( "recipe[nova::compute]" ) 54
  • 61. What does this look like? 55
  • 62. Crowbar ‣ Codename for the OpenStack installer from Dell ‣ Dell is releasing this under the Apache 2 license ‣ Extension of the Chef server ‣ Jointly developed by Dell, Rackspace and Opscode 56
  • 63. Crowbar - What does it Do? ‣ Crowbar is a PXE state machine ‣ starts with bare metal hardware ‣ manages and configures BIOS and network settings ‣ network boot and installation ‣ nodes are configured with Chef ‣ deploys OpenStack, could be used for anything 57
  • 64. OpenStack Installation ‣ Cookbooks uploaded $ $ knife cookbook upload -a knife cookbook list $ rake roles ‣ Roles uploaded $ knife role list $ knife node list ‣ Nodes ready 58
  • 65. AMIs name "nova-ami-urls" description "Feed in a list URLs for AMIs to download" default_attributes( "nova" => { "images" => ["http://192.168.11.7/ubuntu1010-UEC-localuser-image.tar.gz”] } ) $ knife role from file roles/nova-ami-urls.rb ‣ Use an existing AMI ‣ Update URL to your own 59
  • 66. Assign the Roles $ knife node run_list add crushinator.localdomain "role[nova-ami- urls]" { "run_list": [ "role[nova-ami-urls]" ] } $ knife node run_list add crushinator.localdomain "role[nova-single- machine-install]" { "run_list": [ "role[nova-ami-urls]" "role[nova-single-machine-install]", ] } 60
  • 67. chef-client mray@ubuntu1010:~$ sudo chef-client [Fri, 25 Feb 2011 11:52:59 -0800] INFO: Starting Chef Run (Version 0.9.12) ... [Fri, 25 Feb 2011 11:56:05 -0800] INFO: Chef Run complete in 5.911955 seconds [Fri, 25 Feb 2011 11:56:05 -0800] INFO: cleaning the checksum cache [Fri, 25 Feb 2011 11:56:05 -0800] INFO: Running report handlers [Fri, 25 Feb 2011 11:56:05 -0800] INFO: Report handlers complete 61
  • 68. The Moment of Truth nova@$ nova-manage service list nova@$ euca-describe-images nova@$ euca-run-instances ami-h8wh0j17 -k mykey -t m1.tiny nova@$ euca-describe-instances nova@$ ssh -i mykey.priv [email protected] Linux i-00000001 2.6.35-24-virtual #42-Ubuntu SMP Thu Mar 30 05:15:26 UTC 2011 x86_64 GNU/Linux Ubuntu 10.10 Welcome to Ubuntu! <SNIP> See "man sudo_root" for details. ubuntu@i-00000001:~$ 62
  • 69. How Did We Get Here? 63
  • 70. Forked from Anso Labs’ Cookbooks Bootstrapped by Opscode Chef Solo/Vagrant installs for Developers http://github.com/ansolabs/openstack-cookbooks 64
  • 73. Nova needed enhancements Pluggable/Modular Roles ‣ Database ‣ ObjectStore ‣ Network ‣ Virtualization Swift and Glance integration 67
  • 74. 68
  • 75. Dashboard 69
  • 76. Knife ‣ http://github.com/opscode/knife-openstack ‣ Nova has same API as Amazon ‣ Fog supports OpenStack already ‣ knife openstack server create ‘role [base]’ -i ami-a403f6xd -f m1.micro - A “OpenStack instance” 70
  • 77. Object Storage (Swift) ‣ Recipes originated from Anso Labs’ repository ‣ Will be managed with Chef and Crowbar ‣ Included in the ‘bexar’ branch ‣ Untested so far (Cactus will tackle) 71
  • 78. Image Registry (Glance) ‣ Recipes originated from Anso Labs’ repository ‣ Will be managed with Chef and Crowbar ‣ Included in the ‘bexar’ branch ‣ Untested so far (Cactus!) 72
  • 79. Scaling changes how we deploy OpenStack! 73
  • 80. Deployment Scenarios ‣ Single machine is special case of multi-install ‣ Controller + Compute nodes is a known quantity for small installations ‣ Nova + Swift + Glance in large installations ‣ Services separated and HA configurations supported ‣ Documentation and Chef Roles will be the solution 74
  • 81. Cactus, Diablo, ... Development continues... Branches for each stable release Design Summit later this month Design Summit in the Fall 75
  • 82. Rackspace Cloud Builders Commercial support and Training for OpenStack ‣ Opscode ‣ Dell ‣ Equinix ‣ Cloudscaling ‣ Citrix 76
  • 83. Get Involved! https://github.com/mattray/openstack-cookbooks/tree/bexar http://lists.openstack.org http://lists.opscode.com #chef on irc.freenode.net #openstack on irc.freenode.net [email protected] [email protected] 77