SlideShare a Scribd company logo
1 of 128
Deploying Fully Automated, Highly Available
Django Application Stacks with Chef




       schisamo@opscode.com
          www.opscode.com
Who am I?
Who am I?


•   Seth Chisamore
    Senior Technical Consultant/Evangelist
    Opscode, Inc.
Who am I?


•   Seth Chisamore
    Senior Technical Consultant/Evangelist
    Opscode, Inc.


•   Project lead for many Opscode sponsored
    open source projects:
    •   Opscode Cookbooks
    •   Knife cloud provisioning plugins (ec2,
        rackspace & openstack)
    •   Knife Windows plugin (knife-windows)
Who are you?




 http://www.flickr.com/photos/timyates/2854357446/sizes/l/
Who are you?




•   System administrators?




                              http://www.flickr.com/photos/timyates/2854357446/sizes/l/
Who are you?




•   System administrators?
•   Developers?




                              http://www.flickr.com/photos/timyates/2854357446/sizes/l/
Who are you?




•   System administrators?
•   Developers?
•   “Business” People?




                              http://www.flickr.com/photos/timyates/2854357446/sizes/l/
What are we talking
      about?

     http://www.flickr.com/photos/peterkaminski/2174679908/
Agenda




http://www.flickr.com/photos/koalazymonkey/3590953001/
Agenda




•   How’s and Why’s




                      http://www.flickr.com/photos/koalazymonkey/3590953001/
Agenda




•   How’s and Why’s
•   Chef 101




                      http://www.flickr.com/photos/koalazymonkey/3590953001/
Agenda




•   How’s and Why’s
•   Chef 101
•   Deploying n-tier Django app stacks
    with Chef




                                         http://www.flickr.com/photos/koalazymonkey/3590953001/
Agenda




•   How’s and Why’s
•   Chef 101
•   Deploying n-tier Django app stacks
    with Chef
•   Leveraging the same Chef code to
    deploy different configurations of
    our stack


                                         http://www.flickr.com/photos/koalazymonkey/3590953001/
Infrastructure as Code
A technical domain
revolving around
building and
managing
infrastructure
programmatically
Enable the reconstruction
   of the business from
nothing but a source code
repository, an application
  data backup, and bare
     metal resources.
Configuration
Management
Configuration
Management
System Integration


     http://www.flickr.com/photos/opalsson/3773629074/
The Chef Framework


   With thanks (and apologies) to Stephen Nelson-Smith
The Chef Framework
The Chef Framework




•   Idempotent
The Chef Framework




•   Idempotent
•   Library & Primitives
The Chef Framework




•   Idempotent
•   Library & Primitives
•   Flexibility
The Chef Framework




•   Idempotent
•   Library & Primitives
•   Flexibility
•   Reasonability
The Chef Framework




•   Idempotent
•   Library & Primitives
•   Flexibility
•   Reasonability
•   TIMTOWTDI
Multiple applications of
 an operation do not
  change the result
We start with APIs, you
     supply data
Defaults are sane, but
  easily changed
There is more than one
     way to do it
The Chef Tool(s)


 With thanks (and apologies) to Stephen Nelson-Smith
The Chef Tool(s)
The Chef Tool(s)




•   ohai
The Chef Tool(s)




•   ohai
•   chef-client
The Chef Tool(s)




•   ohai
•   chef-client
•   knife
The Chef Tool(s)




•   ohai
•   chef-client
•   knife
•   shef
The Chef API


With thanks (and apologies) to Stephen Nelson-Smith
The Chef API
The Chef API




•   Fat Client/Thin Server
The Chef API




•   Fat Client/Thin Server
•   RESTful API w/ JSON
The Chef API




•   Fat Client/Thin Server
•   RESTful API w/ JSON
•   Search Service
The Chef API




•   Fat Client/Thin Server
•   RESTful API w/ JSON
•   Search Service
•   Derivative Services (mash-up your
    infrastructure)
The Chef Community


   With thanks (and apologies) to Stephen Nelson-Smith
The Chef Community
The Chef Community




•   Apache License, Version 2.0
The Chef Community




•   Apache License, Version 2.0
•   360+ Individual contributors
The Chef Community




•   Apache License, Version 2.0
•   360+ Individual contributors
•   70+ Corporate contributors
The Chef Community




•   Apache License, Version 2.0
•   360+ Individual contributors
•   70+ Corporate contributors
    •   Dell, Rackspace,VMware, RightScale,
        Heroku, and more
The Chef Community




•   Apache License, Version 2.0
•   360+ Individual contributors
•   70+ Corporate contributors
    •   Dell, Rackspace,VMware, RightScale,
        Heroku, and more
•   240+ cookbooks
The Chef Community




•   Apache License, Version 2.0
•   360+ Individual contributors
•   70+ Corporate contributors
    •   Dell, Rackspace,VMware, RightScale,
        Heroku, and more
•   240+ cookbooks
•   http://community.opscode.com
Chef client runs on your
        systems
Clients talk to a Chef
       server
Clients authenticate with
        RSA keys
Each system you
configure is a managed
         node
Nodes have attributes

{
  "kernel": {
    "machine": "x86_64",
    "name": "Darwin",
    "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_version": "10.6.4",
  "platform": "mac_os_x",
  "platform_build": "10F569",
  "domain": "local",
  "os": "darwin",
  "current_user": "schisamo",
  "ohai_time": 1278602661.60043,
  "os_version": "10.4.0",
  "uptime": "18 days 17 hours 49 minutes 18 seconds",
  "ipaddress": "10.13.37.116",
  "hostname": "helsinki",
  "fqdn": "helsinki.local",
  "uptime_seconds": 1619358
}
Nodes are Searchable


knife search node ‘platform:mac_os_x’

 search(:node, ‘platform:mac_os_x’)
Chef Enables Infrastructure as Code

                       package "haproxy" do
                        action :install
                       end


•   Resources          template "/etc/haproxy/haproxy.cfg" do
                        source "haproxy.cfg.erb"
•   Recipes             owner "root"
                        group "root"
•   Cookbooks           mode 0644

•
                        notifies :restart, "service[haproxy]"
    Roles              end

•   Data Bags          service "haproxy" do

•   Source Code         supports :restart => true
                        action [:enable, :start]
                       end
Chef manages
Resources on Nodes
Chef Resources

package "haproxy" do
 action :install
end

template "/etc/haproxy/haproxy.cfg" do
 source "haproxy.cfg.erb"
 owner "root"
 group "root"
 mode 0644
 notifies :restart, "service[haproxy]"
end

service "haproxy" do
 supports :restart => true
 action [:enable, :start]
end
Chef Resources

                   package "haproxy" do
                    action :install
                   end

•   Have a type.   template "/etc/haproxy/haproxy.cfg" do
                    source "haproxy.cfg.erb"
                    owner "root"
                    group "root"
                    mode 0644
                    notifies :restart, "service[haproxy]"
                   end

                   service "haproxy" do
                    supports :restart => true
                    action [:enable, :start]
                   end
Chef Resources

                   package "haproxy" do
                    action :install
                   end

•   Have a type.   template "/etc/haproxy/haproxy.cfg" do

•
                    source "haproxy.cfg.erb"
    Have a name.    owner "root"
                    group "root"
                    mode 0644
                    notifies :restart, "service[haproxy]"
                   end

                   service "haproxy" do
                    supports :restart => true
                    action [:enable, :start]
                   end
Chef Resources

                       package "haproxy" do
                        action :install
                       end

•   Have a type.       template "/etc/haproxy/haproxy.cfg" do

•
                        source "haproxy.cfg.erb"
    Have a name.        owner "root"

•   Have parameters.    group "root"
                        mode 0644
                        notifies :restart, "service[haproxy]"
                       end

                       service "haproxy" do
                        supports :restart => true
                        action [:enable, :start]
                       end
Chef Resources

                                      package "haproxy" do
                                       action :install
                                      end

•   Have a type.                      template "/etc/haproxy/haproxy.cfg" do

•
                                       source "haproxy.cfg.erb"
    Have a name.                       owner "root"

•   Have parameters.                   group "root"
                                       mode 0644

•   Take action to put the resource    notifies :restart, "service[haproxy]"
                                      end
    in the declared state.
                                      service "haproxy" do
                                       supports :restart => true
                                       action [:enable, :start]
                                      end
Chef Resources

                                      package "haproxy" do
                                       action :install
                                      end

•   Have a type.                      template "/etc/haproxy/haproxy.cfg" do

•
                                       source "haproxy.cfg.erb"
    Have a name.                       owner "root"

•   Have parameters.                   group "root"
                                       mode 0644

•   Take action to put the resource    notifies :restart, "service[haproxy]"
                                      end
    in the declared state.
•   Can send notifications to other   service "haproxy" do
                                       supports :restart => true
    resources.                         action [:enable, :start]
                                      end
Resources take action
 through Providers
Chef Providers




•   Multiple providers per resource type.
•   For example the `package` resource
    has providers for: Apt, Yum, Rubygems,
    Portage, Macports, FreeBSD Ports, etc.
•   If you are developer think of it as an
    interface and an implementation.
Recipes are collections
     of Resources
Chef Recipes

                                    package "haproxy" do
                                     action :install
                                    end

                                    template "/etc/haproxy/haproxy.cfg" do
                                     source "haproxy.cfg.erb"
•   Recipes are evaluated for        owner "root"
    resources in the order they      group "root"
                                     mode 0644
    appear.                          notifies :restart, "service[haproxy]"

•   Each resource object is added   end

    to the Resource Collection.     service "haproxy" do
                                     supports :restart => true
                                     action [:enable, :start]
                                    end
Chef Recipes




•   Recipes can include other   include_recipe
                                include_recipe
                                                 "apache2"
                                                 "apache2::mod_rewrite"
    recipes.                    include_recipe   "apache2::mod_deflate"

•   Included recipes are
                                include_recipe
                                include_recipe
                                                 "apache2::mod_headers"
                                                 "apache2::mod_php5"
    processed in order.
Chef Recipes

%w{ python python-dev }.each do |pkg|

 package pkg do
  action :install
 end

end

pool_members = search("node", "role:django_cms")

template "/etc/haproxy/haproxy.cfg" do
 source "haproxy.cfg.erb"
 owner "root"
 group "root"
 mode 0644
 variables :pool_members => pool_members
 notifies :restart, "service[haproxy]"
end
Chef Recipes

                          %w{ python python-dev }.each do |pkg|

                           package pkg do
                            action :install
                           end

                          end
•   Extend recipes with
                          pool_members = search("node", "role:django_cms")
    Ruby.
                          template "/etc/haproxy/haproxy.cfg" do
                           source "haproxy.cfg.erb"
                           owner "root"
                           group "root"
                           mode 0644
                           variables :pool_members => pool_members
                           notifies :restart, "service[haproxy]"
                          end
Chef Recipes

                            %w{ python python-dev }.each do |pkg|

                             package pkg do
                              action :install
                             end

                            end
•   Extend recipes with
                            pool_members = search("node", "role:django_cms")
    Ruby.
•   Dynamic configuration   template "/etc/haproxy/haproxy.cfg" do
                             source "haproxy.cfg.erb"
    through search.          owner "root"
                             group "root"
                             mode 0644
                             variables :pool_members => pool_members
                             notifies :restart, "service[haproxy]"
                            end
Cookbooks are
packages for recipes
Cookbook Metadata




•   Cookbooks are like packages.
•   Cookbooks have dependencies.
Cookbooks are easy to share.

   community.opscode.com
Chef Roles

name "django_cms"
description "django cms app server"
run_list(
  "recipe[mysql::client]",
  "recipe[application]"
)

name "django_cms_load_balancer"
description "Django CMS load balancer"
run_list(
  "recipe[haproxy::app_lb]"
)
override_attributes(
  "haproxy" => {
    "app_server_role" => "django_cms"
  }
)
Chef Roles

                            name "django_cms"
                            description "django cms app server"
                            run_list(
                              "recipe[mysql::client]",
                              "recipe[application]"
                            )

•   Roles describe nodes.   name "django_cms_load_balancer"
                            description "Django CMS load balancer"
                            run_list(
                              "recipe[haproxy::app_lb]"
                            )
                            override_attributes(
                              "haproxy" => {
                                "app_server_role" => "django_cms"
                              }
                            )
Chef Roles

                             name "django_cms"
                             description "django cms app server"
                             run_list(
                               "recipe[mysql::client]",
                               "recipe[application]"
                             )

•   Roles describe nodes.    name "django_cms_load_balancer"

•   Roles have a run list.
                             description "Django CMS load balancer"
                             run_list(
                               "recipe[haproxy::app_lb]"
                             )
                             override_attributes(
                               "haproxy" => {
                                 "app_server_role" => "django_cms"
                               }
                             )
Chef Roles

                                 name "django_cms"
                                 description "django cms app server"
                                 run_list(
                                   "recipe[mysql::client]",
                                   "recipe[application]"
                                 )

•   Roles describe nodes.        name "django_cms_load_balancer"

•   Roles have a run list.
                                 description "Django CMS load balancer"
                                 run_list(

•   Roles can have attributes.   )
                                   "recipe[haproxy::app_lb]"

                                 override_attributes(
                                   "haproxy" => {
                                     "app_server_role" => "django_cms"
                                   }
                                 )
Data bags store
 arbitrary data
Data Bags

% knife data bag show apps django_cms
database_master_role: ["django_cms_database_master"]
databases:
  production:
    adapter: mysql
    database: django_cms_production
    encoding: utf8
    password: awesome_password
    port:   3306
    username: django_cms
deploy_to:          /srv/django_cms
group:             nogroup
id:              django_cms
local_settings_file: local_settings.py
mysql_root_password:
  production: mysql_root
owner:             nobody
packages:
  curl:
pips:
  django: 1.2.5
repository:         https://github.com/opscode/django-quick-start-cms.git
revision:
  production: master
server_roles:       ["django_cms"]
type:
  django_cms:
     django
     gunicorn
Track it like source code...

% git log
commit d640a8c6b370134d7043991894107d806595cc35
Author: jtimberman <joshua@opscode.com>

  Import nagios version 1.0.0

commit c40c818498710e78cf73c7f71e722e971fa574e7
Author: jtimberman <joshua@opscode.com>

  installation and usage instruction docs

commit 99d0efb024314de17888f6b359c14414fda7bb91
Author: jtimberman <joshua@opscode.com>

  Import haproxy version 1.0.1

commit c89d0975ad3f4b152426df219fee0bfb8eafb7e4
Author: jtimberman <joshua@opscode.com>

  add mediawiki cookbook

commit 89c0545cc03b9be26f1db246c9ba4ce9d58a6700
Author: jtimberman <joshua@opscode.com>

  multiple environments in data bag for mediawiki
Ponies ,
(green )Unicorns and
    n-tier oh my!
N-Tier FTW




•   Provision
N-Tier FTW



              Load Balancer




App Server                     App Server
                                            •   Provision
                                            •   Configure



             Database Master
N-Tier FTW



              Load Balancer




                                            •   Provision
App Server                     App Server
                                            •   Configure
                                            •   Integrate


             Database Master
Chef Enables Systems Integration
Chef Enables Systems Integration




•   Chef searches allow nodes to be aware of
    each other and self configure
Chef Enables Systems Integration




•   Chef searches allow nodes to be aware of
    each other and self configure
•   A shared application data bag allows:
Chef Enables Systems Integration




•   Chef searches allow nodes to be aware of
    each other and self configure
•   A shared application data bag allows:
    •   many app servers to checkout the same
        application code during initial
        bootstrapping
Chef Enables Systems Integration




•   Chef searches allow nodes to be aware of
    each other and self configure
•   A shared application data bag allows:
    •   many app servers to checkout the same
        application code during initial
        bootstrapping
    •   app server and database servers to
        initialize off of the same database config
Database Master
Database Master




% knife role show django_cms_database_master
default_attributes: {}
description:       db master for the django_cms app.
env_run_lists:      {}
json_class:        Chef::Role
name:             django_cms_database_master
override_attributes: {}
run_list:        recipe[database::master]
Database Master
Database Master




•   Install and configure MySQL
Database Master




•   Install and configure MySQL
•   Create the application database
Database Master




•   Install and configure MySQL
•   Create the application database
•   Grant the application user access
Django App Servers
      (1..n)
Django App Servers




% knife role show django_cms
chef_type:         role
default_attributes: {}
description:       django_cms front end application server.
env_run_lists:      {}
json_class:        Chef::Role
name:             django_cms
override_attributes: {}
run_list:        recipe[mysql::client], recipe[application]
Django App Servers
Django App Servers




•   Deploy the Code
Django App Servers




•   Deploy the Code
    •   checkout the code with git
Django App Servers




•   Deploy the Code
    •   checkout the code with git
    •   install required packages (os and python)
Django App Servers




•   Deploy the Code
    •   checkout the code with git
    •   install required packages (os and python)
    •   create environment specific config files
Django App Servers




•   Deploy the Code
    •   checkout the code with git
    •   install required packages (os and python)
    •   create environment specific config files
•   Serve the Code
Django App Servers




•   Deploy the Code
    •   checkout the code with git
    •   install required packages (os and python)
    •   create environment specific config files
•   Serve the Code
    •   install Gunicorn (or apache2/mod_wsgi)
Django App Servers




•   Deploy the Code
    •   checkout the code with git
    •   install required packages (os and python)
    •   create environment specific config files
•   Serve the Code
    •   install Gunicorn (or apache2/mod_wsgi)
    •   create an app specific config file (vhost)
Search for Database Master




results = search(:node, "role:django_cms_database_master")

template "/srv/django_cms/shared/local_settings.py" do
 source "settings.py.erb"
 mode "644"
 variables(
   :host => results[0]['fqdn']
 )
end
Load Balancer
Load Balancer




% knife role show django_cms_load_balancer
chef_type:         role
default_attributes: {}
description:       Django CMS load balancer
env_run_lists:      {}
json_class:        Chef::Role
name:             django_cms_load_balancer
override_attributes:
  haproxy:
   app_server_role: django_cms
run_list:        recipe[haproxy::app_lb]
Load Balancer




•   The balancing pool should grow as more
    application servers are brought online
Search for App Servers




pool_members = search(:node, "role:django_cms")

template "/etc/haproxy/haproxy.cfg" do
 source "haproxy-app_lb.cfg.erb"
 owner "root"
 group "root"
 mode 0644
  variables :pool_members => pool_members
 notifies :restart, "service[haproxy]"
end
One set of codez....
 ...to rule them all
Same Code Different Configurations
Same Code Different Configurations




•   We can deploy the same app stack on:
Same Code Different Configurations




•   We can deploy the same app stack on:
    •   a single node or a fully redundant
        cluster of nodes.
Same Code Different Configurations




•   We can deploy the same app stack on:
    •   a single node or a fully redundant
        cluster of nodes.
    •   physical hardware or any number of
        public/private cloud providers.
Same Code Different Configurations




•   We can deploy the same app stack on:
    •   a single node or a fully redundant
        cluster of nodes.
    •   physical hardware or any number of
        public/private cloud providers.
    •   a developer workstation fully virtualized
        with Vagrant + VirtualBox
Staging/QA - Single Node


# launch stack in your data center
% knife bootstrap 123.123.3.3 
  -r ‘role[django_cms_database_master]’, 
    ‘role[django_cms]’, 
    ‘role[django_cms_load_balancer]’

# launch stack in EC2
% knife ec2 server create 
  -r ‘role[django_cms_database_master]’, 
    ‘role[django_cms]’, 
    ‘role[django_cms_load_balancer]’

# launch stack in Rackspace
% knife rackspace server create 
  -r ‘role[django_cms_database_master]’, 
    ‘role[django_cms]’, 
    ‘role[django_cms_load_balancer]’
Production - Multi-Machine Cluster




% knife ec2 server create 
  -r ‘role[django_cms_database_master]’

% knife ec2 server create 
  -r ‘role[django_cms]’

% knife ec2 server create 
  -r ‘role[django_cms]’

% knife ec2 server create 
  -r ‘role[django_cms_load_balancer]’
Developer Workstation

% cat Vagrantfile
Vagrant::Config.run do |config|
 config.vm.box = base_box

 config.vm.provision :chef_server do |chef|

  chef.chef_server_url = "https://api.opscode.com/organizations/foo"
  chef.validation_key_path = "~/.chef/private-pems/foo-validator.pem"
  chef.validation_client_name = "#{ENV['ORGNAME']}-validator"

  chef.provisioning_path = "/etc/chef"

  chef.run_list = [
    'role[django_cms_database_master]',
    'role[django_cms]',
    'role[django_cms_load_balancer]'
  ]
 end
end


% vagrant up
BONUS: deploy [insert
   your favorite web
framework here] stacks
Application Cookbook




•   Supports the following web stacks:
    •   Django
    •   Java Webapps
    •   Php
    •   Rails
    •   Node.js (coming soon)
•   Opscode contributed quick starts walk you
    through example deployments
Further Resources & Closing




•   www.opscode.com
•   wiki.opscode.com
•   @opscode, #opschef
•   irc.freenode.net, #chef, #chef-hacking
•   lists.opscode.com
Questions?


 http://www.flickr.com/photos/oberazzi/318947873/
Thanks!


   schisamo@opscode.com
      www.opscode.com

More Related Content

What's hot

PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopWalter Heck
 
Community Cookbooks & further resources - Fundamentals Webinar Series Part 6
Community Cookbooks & further resources - Fundamentals Webinar Series Part 6Community Cookbooks & further resources - Fundamentals Webinar Series Part 6
Community Cookbooks & further resources - Fundamentals Webinar Series Part 6Chef
 
Chef for OpenStack - OpenStack Fall 2012 Summit
Chef for OpenStack  - OpenStack Fall 2012 SummitChef for OpenStack  - OpenStack Fall 2012 Summit
Chef for OpenStack - OpenStack Fall 2012 SummitMatt Ray
 
Atmosphere 2014: Really large scale systems configuration - Phil Dibowitz
Atmosphere 2014: Really large scale systems configuration - Phil DibowitzAtmosphere 2014: Really large scale systems configuration - Phil Dibowitz
Atmosphere 2014: Really large scale systems configuration - Phil DibowitzPROIDEA
 
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 chefLeanDog
 
Apache Hive micro guide - ConfusedCoders
Apache Hive micro guide - ConfusedCodersApache Hive micro guide - ConfusedCoders
Apache Hive micro guide - ConfusedCodersYash Sharma
 
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 HawkinsNETWAYS
 
Using Nagios with Chef
Using Nagios with ChefUsing Nagios with Chef
Using Nagios with ChefBryan McLellan
 
AWS ElasticBeanstalk Advanced configuration
AWS ElasticBeanstalk Advanced configurationAWS ElasticBeanstalk Advanced configuration
AWS ElasticBeanstalk Advanced configurationLionel LONKAP TSAMBA
 
Chef for OpenStack: OpenStack Spring Summit 2013
Chef for OpenStack: OpenStack Spring Summit 2013Chef for OpenStack: OpenStack Spring Summit 2013
Chef for OpenStack: OpenStack Spring Summit 2013Matt Ray
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chefkevsmith
 
Network Automation Tools
Network Automation ToolsNetwork Automation Tools
Network Automation ToolsEdwin Beekman
 
Atlanta OpenStack 2014 Chef for OpenStack Deployment Workshop
Atlanta OpenStack 2014 Chef for OpenStack Deployment WorkshopAtlanta OpenStack 2014 Chef for OpenStack Deployment Workshop
Atlanta OpenStack 2014 Chef for OpenStack Deployment WorkshopMatt Ray
 
Preppingthekitchen 1.0.3
Preppingthekitchen 1.0.3Preppingthekitchen 1.0.3
Preppingthekitchen 1.0.3Sean OMeara
 
Debugging Hive with Hadoop-in-the-Cloud by David Chaiken of Altiscale
Debugging Hive with Hadoop-in-the-Cloud by David Chaiken of AltiscaleDebugging Hive with Hadoop-in-the-Cloud by David Chaiken of Altiscale
Debugging Hive with Hadoop-in-the-Cloud by David Chaiken of AltiscaleData Con LA
 
GIT, RVM, FIRST HEROKU APP
GIT, RVM, FIRST HEROKU APPGIT, RVM, FIRST HEROKU APP
GIT, RVM, FIRST HEROKU APPPavel Tyk
 

What's hot (19)

PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & HadoopPuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
PuppetCamp SEA 1 - Using Vagrant, Puppet, Testing & Hadoop
 
Community Cookbooks & further resources - Fundamentals Webinar Series Part 6
Community Cookbooks & further resources - Fundamentals Webinar Series Part 6Community Cookbooks & further resources - Fundamentals Webinar Series Part 6
Community Cookbooks & further resources - Fundamentals Webinar Series Part 6
 
Chef for OpenStack - OpenStack Fall 2012 Summit
Chef for OpenStack  - OpenStack Fall 2012 SummitChef for OpenStack  - OpenStack Fall 2012 Summit
Chef for OpenStack - OpenStack Fall 2012 Summit
 
Atmosphere 2014: Really large scale systems configuration - Phil Dibowitz
Atmosphere 2014: Really large scale systems configuration - Phil DibowitzAtmosphere 2014: Really large scale systems configuration - Phil Dibowitz
Atmosphere 2014: Really large scale systems configuration - Phil Dibowitz
 
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
 
Apache Hive micro guide - ConfusedCoders
Apache Hive micro guide - ConfusedCodersApache Hive micro guide - ConfusedCoders
Apache Hive micro guide - ConfusedCoders
 
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
 
Using Nagios with Chef
Using Nagios with ChefUsing Nagios with Chef
Using Nagios with Chef
 
AWS ElasticBeanstalk Advanced configuration
AWS ElasticBeanstalk Advanced configurationAWS ElasticBeanstalk Advanced configuration
AWS ElasticBeanstalk Advanced configuration
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
 
Hdfs java api
Hdfs java apiHdfs java api
Hdfs java api
 
Chef for OpenStack: OpenStack Spring Summit 2013
Chef for OpenStack: OpenStack Spring Summit 2013Chef for OpenStack: OpenStack Spring Summit 2013
Chef for OpenStack: OpenStack Spring Summit 2013
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
 
Network Automation Tools
Network Automation ToolsNetwork Automation Tools
Network Automation Tools
 
Atlanta OpenStack 2014 Chef for OpenStack Deployment Workshop
Atlanta OpenStack 2014 Chef for OpenStack Deployment WorkshopAtlanta OpenStack 2014 Chef for OpenStack Deployment Workshop
Atlanta OpenStack 2014 Chef for OpenStack Deployment Workshop
 
Preppingthekitchen 1.0.3
Preppingthekitchen 1.0.3Preppingthekitchen 1.0.3
Preppingthekitchen 1.0.3
 
Debugging Hive with Hadoop-in-the-Cloud by David Chaiken of Altiscale
Debugging Hive with Hadoop-in-the-Cloud by David Chaiken of AltiscaleDebugging Hive with Hadoop-in-the-Cloud by David Chaiken of Altiscale
Debugging Hive with Hadoop-in-the-Cloud by David Chaiken of Altiscale
 
GIT, RVM, FIRST HEROKU APP
GIT, RVM, FIRST HEROKU APPGIT, RVM, FIRST HEROKU APP
GIT, RVM, FIRST HEROKU APP
 
Cooking with Chef
Cooking with ChefCooking with Chef
Cooking with Chef
 

Viewers also liked

Repeatable Deployments and Installations
Repeatable Deployments and InstallationsRepeatable Deployments and Installations
Repeatable Deployments and InstallationsIdan Gazit
 
Vagrant in 15 minutes
Vagrant in 15 minutesVagrant in 15 minutes
Vagrant in 15 minutesAnton Weiss
 
Real world Django deployment using Chef
Real world Django deployment using ChefReal world Django deployment using Chef
Real world Django deployment using Chefcoderanger
 
Automated Deployment with Fabric
Automated Deployment with FabricAutomated Deployment with Fabric
Automated Deployment with Fabrictanihito
 
Lighting talk on django-social-auth
Lighting talk on django-social-authLighting talk on django-social-auth
Lighting talk on django-social-authDaniel Greenfeld
 

Viewers also liked (7)

Repeatable Deployments and Installations
Repeatable Deployments and InstallationsRepeatable Deployments and Installations
Repeatable Deployments and Installations
 
Vagrant in 15 minutes
Vagrant in 15 minutesVagrant in 15 minutes
Vagrant in 15 minutes
 
The One Way
The One WayThe One Way
The One Way
 
Real world Django deployment using Chef
Real world Django deployment using ChefReal world Django deployment using Chef
Real world Django deployment using Chef
 
Automated Deployment with Fabric
Automated Deployment with FabricAutomated Deployment with Fabric
Automated Deployment with Fabric
 
Django Uni-Form
Django Uni-FormDjango Uni-Form
Django Uni-Form
 
Lighting talk on django-social-auth
Lighting talk on django-social-authLighting talk on django-social-auth
Lighting talk on django-social-auth
 

Similar to SELF 2011: Deploying Django Application Stacks with Chef

Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Software, Inc.
 
Introduction to Cooking with Chef
Introduction to Cooking with ChefIntroduction to Cooking with Chef
Introduction to Cooking with ChefJohn Osborne
 
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Software, Inc.
 
Introduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefIntroduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefAll Things Open
 
Master Chef class: learn how to quickly cook delightful CQ/AEM infrastructures
Master Chef class: learn how to quickly cook delightful CQ/AEM infrastructuresMaster Chef class: learn how to quickly cook delightful CQ/AEM infrastructures
Master Chef class: learn how to quickly cook delightful CQ/AEM infrastructuresFrançois Le Droff
 
Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Jennifer Davis
 
Introduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitIntroduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitJennifer Davis
 
LA Chef for OpenStack Hackday
LA Chef for OpenStack HackdayLA Chef for OpenStack Hackday
LA Chef for OpenStack HackdayMatt Ray
 
Taking Spinnaker for a spin @ London DevOps Meetup 36
Taking Spinnaker for a spin @ London DevOps Meetup 36Taking Spinnaker for a spin @ London DevOps Meetup 36
Taking Spinnaker for a spin @ London DevOps Meetup 36aleonhardt
 
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 SetupChef Software, Inc.
 
Agiles Peru 2019 - Infrastructure As Code
Agiles Peru 2019 - Infrastructure As CodeAgiles Peru 2019 - Infrastructure As Code
Agiles Peru 2019 - Infrastructure As CodeMario IC
 
Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1Chef
 
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
TXLF: Chef- Software Defined Infrastructure Today & TomorrowTXLF: Chef- Software Defined Infrastructure Today & Tomorrow
TXLF: Chef- Software Defined Infrastructure Today & TomorrowMatt Ray
 
Introduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefIntroduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefNathen Harvey
 

Similar to SELF 2011: Deploying Django Application Stacks with Chef (20)

Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
 
Configuration management with Chef
Configuration management with ChefConfiguration management with Chef
Configuration management with Chef
 
Full-Stack CakePHP Deployment
Full-Stack CakePHP DeploymentFull-Stack CakePHP Deployment
Full-Stack CakePHP Deployment
 
Introduction to Cooking with Chef
Introduction to Cooking with ChefIntroduction to Cooking with Chef
Introduction to Cooking 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
 
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
 
Master Chef class: learn how to quickly cook delightful CQ/AEM infrastructures
Master Chef class: learn how to quickly cook delightful CQ/AEM infrastructuresMaster Chef class: learn how to quickly cook delightful CQ/AEM infrastructures
Master Chef class: learn how to quickly cook delightful CQ/AEM infrastructures
 
Chef For OpenStack Overview
Chef For OpenStack OverviewChef For OpenStack Overview
Chef For OpenStack Overview
 
Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015
 
Introduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitIntroduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen Summit
 
LA Chef for OpenStack Hackday
LA Chef for OpenStack HackdayLA Chef for OpenStack Hackday
LA Chef for OpenStack Hackday
 
Ansible and AWS
Ansible and AWSAnsible and AWS
Ansible and AWS
 
Taking Spinnaker for a spin @ London DevOps Meetup 36
Taking Spinnaker for a spin @ London DevOps Meetup 36Taking Spinnaker for a spin @ London DevOps Meetup 36
Taking Spinnaker for a spin @ London DevOps Meetup 36
 
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
 
Agiles Peru 2019 - Infrastructure As Code
Agiles Peru 2019 - Infrastructure As CodeAgiles Peru 2019 - Infrastructure As Code
Agiles Peru 2019 - Infrastructure As Code
 
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
 
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
TXLF: Chef- Software Defined Infrastructure Today & TomorrowTXLF: Chef- Software Defined Infrastructure Today & Tomorrow
TXLF: Chef- Software Defined Infrastructure Today & Tomorrow
 
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
 
Chef for OpenStack- Fall 2012.pdf
Chef for OpenStack- Fall 2012.pdfChef for OpenStack- Fall 2012.pdf
Chef for OpenStack- Fall 2012.pdf
 
Refactoring Infrastructure Code
Refactoring Infrastructure CodeRefactoring Infrastructure Code
Refactoring Infrastructure Code
 

More from Chef Software, Inc.

Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Software, Inc.
 
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...Chef Software, Inc.
 
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 ChefChef Software, Inc.
 
Opscode Webinar: Cooking with Chef on Microsoft Windows
Opscode Webinar: Cooking with Chef on Microsoft WindowsOpscode Webinar: Cooking with Chef on Microsoft Windows
Opscode Webinar: Cooking with Chef on Microsoft WindowsChef Software, Inc.
 
Opscode Webinar: Automation for Education May 08-2013
Opscode Webinar: Automation for Education May 08-2013Opscode Webinar: Automation for Education May 08-2013
Opscode Webinar: Automation for Education May 08-2013Chef Software, Inc.
 
Utility HPC: Right Systems, Right Scale, Right Science
Utility HPC: Right Systems, Right Scale, Right ScienceUtility HPC: Right Systems, Right Scale, Right Science
Utility HPC: Right Systems, Right Scale, Right ScienceChef Software, Inc.
 
Using Kanban and Chef: A Case Study – Jeffrey Hulten
Using Kanban and Chef: A Case Study – Jeffrey HultenUsing Kanban and Chef: A Case Study – Jeffrey Hulten
Using Kanban and Chef: A Case Study – Jeffrey HultenChef Software, Inc.
 
SDN, Network Virtualization and the Software Defined Data Center – Brad Hedlund
SDN, Network Virtualization and the Software Defined Data Center – Brad HedlundSDN, Network Virtualization and the Software Defined Data Center – Brad Hedlund
SDN, Network Virtualization and the Software Defined Data Center – Brad HedlundChef Software, Inc.
 
ChefConf 2013 Keynote Session – Opscode – Adam Jacob
ChefConf 2013 Keynote Session – Opscode – Adam JacobChefConf 2013 Keynote Session – Opscode – Adam Jacob
ChefConf 2013 Keynote Session – Opscode – Adam JacobChef Software, Inc.
 
Using Chef and AppFirst to Automate Scale-out/Scale-down of Web Applications ...
Using Chef and AppFirst to Automate Scale-out/Scale-down of Web Applications ...Using Chef and AppFirst to Automate Scale-out/Scale-down of Web Applications ...
Using Chef and AppFirst to Automate Scale-out/Scale-down of Web Applications ...Chef Software, Inc.
 
The InstallShield of the 21st Century – Theo Schlossnagle
The InstallShield of the 21st Century – Theo SchlossnagleThe InstallShield of the 21st Century – Theo Schlossnagle
The InstallShield of the 21st Century – Theo SchlossnagleChef Software, Inc.
 
Chef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK BoxChef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK BoxChef Software, Inc.
 
Push jobs: an orchestration building block for private Chef
Push jobs: an orchestration building block for private ChefPush jobs: an orchestration building block for private Chef
Push jobs: an orchestration building block for private ChefChef Software, Inc.
 
Multi-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and moreMulti-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and moreChef Software, Inc.
 
Welcome to the IT Industrial Revolution! Are you ready?
Welcome to the IT Industrial Revolution! Are you ready?Welcome to the IT Industrial Revolution! Are you ready?
Welcome to the IT Industrial Revolution! Are you ready?Chef Software, Inc.
 
Who Says Elephants Can’t Cook? How IBM and Opscode are changing the role of c...
Who Says Elephants Can’t Cook? How IBM and Opscode are changing the role of c...Who Says Elephants Can’t Cook? How IBM and Opscode are changing the role of c...
Who Says Elephants Can’t Cook? How IBM and Opscode are changing the role of c...Chef Software, Inc.
 
Growing Pains with Chef – a Tale of DevOps in a Large Organization
Growing Pains with Chef – a Tale of DevOps in a Large OrganizationGrowing Pains with Chef – a Tale of DevOps in a Large Organization
Growing Pains with Chef – a Tale of DevOps in a Large OrganizationChef Software, Inc.
 

More from Chef Software, Inc. (20)

Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
 
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
 
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
 
Opscode Webinar: Cooking with Chef on Microsoft Windows
Opscode Webinar: Cooking with Chef on Microsoft WindowsOpscode Webinar: Cooking with Chef on Microsoft Windows
Opscode Webinar: Cooking with Chef on Microsoft Windows
 
Opscode tech festa july 2013
Opscode tech festa   july 2013Opscode tech festa   july 2013
Opscode tech festa july 2013
 
Opscode Webinar: Automation for Education May 08-2013
Opscode Webinar: Automation for Education May 08-2013Opscode Webinar: Automation for Education May 08-2013
Opscode Webinar: Automation for Education May 08-2013
 
Utility HPC: Right Systems, Right Scale, Right Science
Utility HPC: Right Systems, Right Scale, Right ScienceUtility HPC: Right Systems, Right Scale, Right Science
Utility HPC: Right Systems, Right Scale, Right Science
 
The Berkshelf Way
The Berkshelf WayThe Berkshelf Way
The Berkshelf Way
 
Using Kanban and Chef: A Case Study – Jeffrey Hulten
Using Kanban and Chef: A Case Study – Jeffrey HultenUsing Kanban and Chef: A Case Study – Jeffrey Hulten
Using Kanban and Chef: A Case Study – Jeffrey Hulten
 
SDN, Network Virtualization and the Software Defined Data Center – Brad Hedlund
SDN, Network Virtualization and the Software Defined Data Center – Brad HedlundSDN, Network Virtualization and the Software Defined Data Center – Brad Hedlund
SDN, Network Virtualization and the Software Defined Data Center – Brad Hedlund
 
ChefConf 2013 Keynote Session – Opscode – Adam Jacob
ChefConf 2013 Keynote Session – Opscode – Adam JacobChefConf 2013 Keynote Session – Opscode – Adam Jacob
ChefConf 2013 Keynote Session – Opscode – Adam Jacob
 
Using Chef and AppFirst to Automate Scale-out/Scale-down of Web Applications ...
Using Chef and AppFirst to Automate Scale-out/Scale-down of Web Applications ...Using Chef and AppFirst to Automate Scale-out/Scale-down of Web Applications ...
Using Chef and AppFirst to Automate Scale-out/Scale-down of Web Applications ...
 
The InstallShield of the 21st Century – Theo Schlossnagle
The InstallShield of the 21st Century – Theo SchlossnagleThe InstallShield of the 21st Century – Theo Schlossnagle
The InstallShield of the 21st Century – Theo Schlossnagle
 
Chef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK BoxChef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK Box
 
The unintended benefits of Chef
The unintended benefits of ChefThe unintended benefits of Chef
The unintended benefits of Chef
 
Push jobs: an orchestration building block for private Chef
Push jobs: an orchestration building block for private ChefPush jobs: an orchestration building block for private Chef
Push jobs: an orchestration building block for private Chef
 
Multi-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and moreMulti-provider Vagrant and Chef: AWS, VMware, and more
Multi-provider Vagrant and Chef: AWS, VMware, and more
 
Welcome to the IT Industrial Revolution! Are you ready?
Welcome to the IT Industrial Revolution! Are you ready?Welcome to the IT Industrial Revolution! Are you ready?
Welcome to the IT Industrial Revolution! Are you ready?
 
Who Says Elephants Can’t Cook? How IBM and Opscode are changing the role of c...
Who Says Elephants Can’t Cook? How IBM and Opscode are changing the role of c...Who Says Elephants Can’t Cook? How IBM and Opscode are changing the role of c...
Who Says Elephants Can’t Cook? How IBM and Opscode are changing the role of c...
 
Growing Pains with Chef – a Tale of DevOps in a Large Organization
Growing Pains with Chef – a Tale of DevOps in a Large OrganizationGrowing Pains with Chef – a Tale of DevOps in a Large Organization
Growing Pains with Chef – a Tale of DevOps in a Large Organization
 

Recently uploaded

Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch TuesdayIvanti
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data SciencePaolo Missier
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringWSO2
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseWSO2
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...FIDO Alliance
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxFIDO Alliance
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformWSO2
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxFIDO Alliance
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaWSO2
 
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...SOFTTECHHUB
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform EngineeringMarcus Vechiato
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....rightmanforbloodline
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptxFIDO Alliance
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Paige Cruz
 

Recently uploaded (20)

Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
2024 May Patch Tuesday
2024 May Patch Tuesday2024 May Patch Tuesday
2024 May Patch Tuesday
 
Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Navigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern EnterpriseNavigating Identity and Access Management in the Modern Enterprise
Navigating Identity and Access Management in the Modern Enterprise
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...Hyatt driving innovation and exceptional customer experiences with FIDO passw...
Hyatt driving innovation and exceptional customer experiences with FIDO passw...
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
The Ultimate Prompt Engineering Guide for Generative AI: Get the Most Out of ...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
Observability Concepts EVERY Developer Should Know (DevOpsDays Seattle)
 

SELF 2011: Deploying Django Application Stacks with Chef

  • 1. Deploying Fully Automated, Highly Available Django Application Stacks with Chef schisamo@opscode.com www.opscode.com
  • 3. Who am I? • Seth Chisamore Senior Technical Consultant/Evangelist Opscode, Inc.
  • 4. Who am I? • Seth Chisamore Senior Technical Consultant/Evangelist Opscode, Inc. • Project lead for many Opscode sponsored open source projects: • Opscode Cookbooks • Knife cloud provisioning plugins (ec2, rackspace & openstack) • Knife Windows plugin (knife-windows)
  • 5. Who are you? http://www.flickr.com/photos/timyates/2854357446/sizes/l/
  • 6. Who are you? • System administrators? http://www.flickr.com/photos/timyates/2854357446/sizes/l/
  • 7. Who are you? • System administrators? • Developers? http://www.flickr.com/photos/timyates/2854357446/sizes/l/
  • 8. Who are you? • System administrators? • Developers? • “Business” People? http://www.flickr.com/photos/timyates/2854357446/sizes/l/
  • 9. What are we talking about? http://www.flickr.com/photos/peterkaminski/2174679908/
  • 11. Agenda • How’s and Why’s http://www.flickr.com/photos/koalazymonkey/3590953001/
  • 12. Agenda • How’s and Why’s • Chef 101 http://www.flickr.com/photos/koalazymonkey/3590953001/
  • 13. Agenda • How’s and Why’s • Chef 101 • Deploying n-tier Django app stacks with Chef http://www.flickr.com/photos/koalazymonkey/3590953001/
  • 14. Agenda • How’s and Why’s • Chef 101 • Deploying n-tier Django app stacks with Chef • Leveraging the same Chef code to deploy different configurations of our stack http://www.flickr.com/photos/koalazymonkey/3590953001/
  • 16. A technical domain revolving around building and managing infrastructure programmatically
  • 17. Enable the reconstruction of the business from nothing but a source code repository, an application data backup, and bare metal resources.
  • 20. System Integration http://www.flickr.com/photos/opalsson/3773629074/
  • 21.
  • 22. The Chef Framework With thanks (and apologies) to Stephen Nelson-Smith
  • 25. The Chef Framework • Idempotent • Library & Primitives
  • 26. The Chef Framework • Idempotent • Library & Primitives • Flexibility
  • 27. The Chef Framework • Idempotent • Library & Primitives • Flexibility • Reasonability
  • 28. The Chef Framework • Idempotent • Library & Primitives • Flexibility • Reasonability • TIMTOWTDI
  • 29. Multiple applications of an operation do not change the result
  • 30. We start with APIs, you supply data
  • 31. Defaults are sane, but easily changed
  • 32. There is more than one way to do it
  • 33. The Chef Tool(s) With thanks (and apologies) to Stephen Nelson-Smith
  • 36. The Chef Tool(s) • ohai • chef-client
  • 37. The Chef Tool(s) • ohai • chef-client • knife
  • 38. The Chef Tool(s) • ohai • chef-client • knife • shef
  • 39. The Chef API With thanks (and apologies) to Stephen Nelson-Smith
  • 41. The Chef API • Fat Client/Thin Server
  • 42. The Chef API • Fat Client/Thin Server • RESTful API w/ JSON
  • 43. The Chef API • Fat Client/Thin Server • RESTful API w/ JSON • Search Service
  • 44. The Chef API • Fat Client/Thin Server • RESTful API w/ JSON • Search Service • Derivative Services (mash-up your infrastructure)
  • 45. The Chef Community With thanks (and apologies) to Stephen Nelson-Smith
  • 47. The Chef Community • Apache License, Version 2.0
  • 48. The Chef Community • Apache License, Version 2.0 • 360+ Individual contributors
  • 49. The Chef Community • Apache License, Version 2.0 • 360+ Individual contributors • 70+ Corporate contributors
  • 50. The Chef Community • Apache License, Version 2.0 • 360+ Individual contributors • 70+ Corporate contributors • Dell, Rackspace,VMware, RightScale, Heroku, and more
  • 51. The Chef Community • Apache License, Version 2.0 • 360+ Individual contributors • 70+ Corporate contributors • Dell, Rackspace,VMware, RightScale, Heroku, and more • 240+ cookbooks
  • 52. The Chef Community • Apache License, Version 2.0 • 360+ Individual contributors • 70+ Corporate contributors • Dell, Rackspace,VMware, RightScale, Heroku, and more • 240+ cookbooks • http://community.opscode.com
  • 53. Chef client runs on your systems
  • 54. Clients talk to a Chef server
  • 56. Each system you configure is a managed node
  • 57. Nodes have attributes { "kernel": { "machine": "x86_64", "name": "Darwin", "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_version": "10.6.4", "platform": "mac_os_x", "platform_build": "10F569", "domain": "local", "os": "darwin", "current_user": "schisamo", "ohai_time": 1278602661.60043, "os_version": "10.4.0", "uptime": "18 days 17 hours 49 minutes 18 seconds", "ipaddress": "10.13.37.116", "hostname": "helsinki", "fqdn": "helsinki.local", "uptime_seconds": 1619358 }
  • 58. Nodes are Searchable knife search node ‘platform:mac_os_x’ search(:node, ‘platform:mac_os_x’)
  • 59. Chef Enables Infrastructure as Code package "haproxy" do action :install end • Resources template "/etc/haproxy/haproxy.cfg" do source "haproxy.cfg.erb" • Recipes owner "root" group "root" • Cookbooks mode 0644 • notifies :restart, "service[haproxy]" Roles end • Data Bags service "haproxy" do • Source Code supports :restart => true action [:enable, :start] end
  • 61. Chef Resources package "haproxy" do action :install end template "/etc/haproxy/haproxy.cfg" do source "haproxy.cfg.erb" owner "root" group "root" mode 0644 notifies :restart, "service[haproxy]" end service "haproxy" do supports :restart => true action [:enable, :start] end
  • 62. Chef Resources package "haproxy" do action :install end • Have a type. template "/etc/haproxy/haproxy.cfg" do source "haproxy.cfg.erb" owner "root" group "root" mode 0644 notifies :restart, "service[haproxy]" end service "haproxy" do supports :restart => true action [:enable, :start] end
  • 63. Chef Resources package "haproxy" do action :install end • Have a type. template "/etc/haproxy/haproxy.cfg" do • source "haproxy.cfg.erb" Have a name. owner "root" group "root" mode 0644 notifies :restart, "service[haproxy]" end service "haproxy" do supports :restart => true action [:enable, :start] end
  • 64. Chef Resources package "haproxy" do action :install end • Have a type. template "/etc/haproxy/haproxy.cfg" do • source "haproxy.cfg.erb" Have a name. owner "root" • Have parameters. group "root" mode 0644 notifies :restart, "service[haproxy]" end service "haproxy" do supports :restart => true action [:enable, :start] end
  • 65. Chef Resources package "haproxy" do action :install end • Have a type. template "/etc/haproxy/haproxy.cfg" do • source "haproxy.cfg.erb" Have a name. owner "root" • Have parameters. group "root" mode 0644 • Take action to put the resource notifies :restart, "service[haproxy]" end in the declared state. service "haproxy" do supports :restart => true action [:enable, :start] end
  • 66. Chef Resources package "haproxy" do action :install end • Have a type. template "/etc/haproxy/haproxy.cfg" do • source "haproxy.cfg.erb" Have a name. owner "root" • Have parameters. group "root" mode 0644 • Take action to put the resource notifies :restart, "service[haproxy]" end in the declared state. • Can send notifications to other service "haproxy" do supports :restart => true resources. action [:enable, :start] end
  • 67. Resources take action through Providers
  • 68. Chef Providers • Multiple providers per resource type. • For example the `package` resource has providers for: Apt, Yum, Rubygems, Portage, Macports, FreeBSD Ports, etc. • If you are developer think of it as an interface and an implementation.
  • 69. Recipes are collections of Resources
  • 70. Chef Recipes package "haproxy" do action :install end template "/etc/haproxy/haproxy.cfg" do source "haproxy.cfg.erb" • Recipes are evaluated for owner "root" resources in the order they group "root" mode 0644 appear. notifies :restart, "service[haproxy]" • Each resource object is added end to the Resource Collection. service "haproxy" do supports :restart => true action [:enable, :start] end
  • 71. Chef Recipes • Recipes can include other include_recipe include_recipe "apache2" "apache2::mod_rewrite" recipes. include_recipe "apache2::mod_deflate" • Included recipes are include_recipe include_recipe "apache2::mod_headers" "apache2::mod_php5" processed in order.
  • 72. Chef Recipes %w{ python python-dev }.each do |pkg| package pkg do action :install end end pool_members = search("node", "role:django_cms") template "/etc/haproxy/haproxy.cfg" do source "haproxy.cfg.erb" owner "root" group "root" mode 0644 variables :pool_members => pool_members notifies :restart, "service[haproxy]" end
  • 73. Chef Recipes %w{ python python-dev }.each do |pkg| package pkg do action :install end end • Extend recipes with pool_members = search("node", "role:django_cms") Ruby. template "/etc/haproxy/haproxy.cfg" do source "haproxy.cfg.erb" owner "root" group "root" mode 0644 variables :pool_members => pool_members notifies :restart, "service[haproxy]" end
  • 74. Chef Recipes %w{ python python-dev }.each do |pkg| package pkg do action :install end end • Extend recipes with pool_members = search("node", "role:django_cms") Ruby. • Dynamic configuration template "/etc/haproxy/haproxy.cfg" do source "haproxy.cfg.erb" through search. owner "root" group "root" mode 0644 variables :pool_members => pool_members notifies :restart, "service[haproxy]" end
  • 76. Cookbook Metadata • Cookbooks are like packages. • Cookbooks have dependencies.
  • 77. Cookbooks are easy to share. community.opscode.com
  • 78. Chef Roles name "django_cms" description "django cms app server" run_list( "recipe[mysql::client]", "recipe[application]" ) name "django_cms_load_balancer" description "Django CMS load balancer" run_list( "recipe[haproxy::app_lb]" ) override_attributes( "haproxy" => { "app_server_role" => "django_cms" } )
  • 79. Chef Roles name "django_cms" description "django cms app server" run_list( "recipe[mysql::client]", "recipe[application]" ) • Roles describe nodes. name "django_cms_load_balancer" description "Django CMS load balancer" run_list( "recipe[haproxy::app_lb]" ) override_attributes( "haproxy" => { "app_server_role" => "django_cms" } )
  • 80. Chef Roles name "django_cms" description "django cms app server" run_list( "recipe[mysql::client]", "recipe[application]" ) • Roles describe nodes. name "django_cms_load_balancer" • Roles have a run list. description "Django CMS load balancer" run_list( "recipe[haproxy::app_lb]" ) override_attributes( "haproxy" => { "app_server_role" => "django_cms" } )
  • 81. Chef Roles name "django_cms" description "django cms app server" run_list( "recipe[mysql::client]", "recipe[application]" ) • Roles describe nodes. name "django_cms_load_balancer" • Roles have a run list. description "Django CMS load balancer" run_list( • Roles can have attributes. ) "recipe[haproxy::app_lb]" override_attributes( "haproxy" => { "app_server_role" => "django_cms" } )
  • 82. Data bags store arbitrary data
  • 83. Data Bags % knife data bag show apps django_cms database_master_role: ["django_cms_database_master"] databases: production: adapter: mysql database: django_cms_production encoding: utf8 password: awesome_password port: 3306 username: django_cms deploy_to: /srv/django_cms group: nogroup id: django_cms local_settings_file: local_settings.py mysql_root_password: production: mysql_root owner: nobody packages: curl: pips: django: 1.2.5 repository: https://github.com/opscode/django-quick-start-cms.git revision: production: master server_roles: ["django_cms"] type: django_cms: django gunicorn
  • 84. Track it like source code... % git log commit d640a8c6b370134d7043991894107d806595cc35 Author: jtimberman <joshua@opscode.com> Import nagios version 1.0.0 commit c40c818498710e78cf73c7f71e722e971fa574e7 Author: jtimberman <joshua@opscode.com> installation and usage instruction docs commit 99d0efb024314de17888f6b359c14414fda7bb91 Author: jtimberman <joshua@opscode.com> Import haproxy version 1.0.1 commit c89d0975ad3f4b152426df219fee0bfb8eafb7e4 Author: jtimberman <joshua@opscode.com> add mediawiki cookbook commit 89c0545cc03b9be26f1db246c9ba4ce9d58a6700 Author: jtimberman <joshua@opscode.com> multiple environments in data bag for mediawiki
  • 85. Ponies , (green )Unicorns and n-tier oh my!
  • 86. N-Tier FTW • Provision
  • 87. N-Tier FTW Load Balancer App Server App Server • Provision • Configure Database Master
  • 88. N-Tier FTW Load Balancer • Provision App Server App Server • Configure • Integrate Database Master
  • 89. Chef Enables Systems Integration
  • 90. Chef Enables Systems Integration • Chef searches allow nodes to be aware of each other and self configure
  • 91. Chef Enables Systems Integration • Chef searches allow nodes to be aware of each other and self configure • A shared application data bag allows:
  • 92. Chef Enables Systems Integration • Chef searches allow nodes to be aware of each other and self configure • A shared application data bag allows: • many app servers to checkout the same application code during initial bootstrapping
  • 93. Chef Enables Systems Integration • Chef searches allow nodes to be aware of each other and self configure • A shared application data bag allows: • many app servers to checkout the same application code during initial bootstrapping • app server and database servers to initialize off of the same database config
  • 95. Database Master % knife role show django_cms_database_master default_attributes: {} description: db master for the django_cms app. env_run_lists: {} json_class: Chef::Role name: django_cms_database_master override_attributes: {} run_list: recipe[database::master]
  • 97. Database Master • Install and configure MySQL
  • 98. Database Master • Install and configure MySQL • Create the application database
  • 99. Database Master • Install and configure MySQL • Create the application database • Grant the application user access
  • 101. Django App Servers % knife role show django_cms chef_type: role default_attributes: {} description: django_cms front end application server. env_run_lists: {} json_class: Chef::Role name: django_cms override_attributes: {} run_list: recipe[mysql::client], recipe[application]
  • 103. Django App Servers • Deploy the Code
  • 104. Django App Servers • Deploy the Code • checkout the code with git
  • 105. Django App Servers • Deploy the Code • checkout the code with git • install required packages (os and python)
  • 106. Django App Servers • Deploy the Code • checkout the code with git • install required packages (os and python) • create environment specific config files
  • 107. Django App Servers • Deploy the Code • checkout the code with git • install required packages (os and python) • create environment specific config files • Serve the Code
  • 108. Django App Servers • Deploy the Code • checkout the code with git • install required packages (os and python) • create environment specific config files • Serve the Code • install Gunicorn (or apache2/mod_wsgi)
  • 109. Django App Servers • Deploy the Code • checkout the code with git • install required packages (os and python) • create environment specific config files • Serve the Code • install Gunicorn (or apache2/mod_wsgi) • create an app specific config file (vhost)
  • 110. Search for Database Master results = search(:node, "role:django_cms_database_master") template "/srv/django_cms/shared/local_settings.py" do source "settings.py.erb" mode "644" variables( :host => results[0]['fqdn'] ) end
  • 112. Load Balancer % knife role show django_cms_load_balancer chef_type: role default_attributes: {} description: Django CMS load balancer env_run_lists: {} json_class: Chef::Role name: django_cms_load_balancer override_attributes: haproxy: app_server_role: django_cms run_list: recipe[haproxy::app_lb]
  • 113. Load Balancer • The balancing pool should grow as more application servers are brought online
  • 114. Search for App Servers pool_members = search(:node, "role:django_cms") template "/etc/haproxy/haproxy.cfg" do source "haproxy-app_lb.cfg.erb" owner "root" group "root" mode 0644 variables :pool_members => pool_members notifies :restart, "service[haproxy]" end
  • 115. One set of codez.... ...to rule them all
  • 116. Same Code Different Configurations
  • 117. Same Code Different Configurations • We can deploy the same app stack on:
  • 118. Same Code Different Configurations • We can deploy the same app stack on: • a single node or a fully redundant cluster of nodes.
  • 119. Same Code Different Configurations • We can deploy the same app stack on: • a single node or a fully redundant cluster of nodes. • physical hardware or any number of public/private cloud providers.
  • 120. Same Code Different Configurations • We can deploy the same app stack on: • a single node or a fully redundant cluster of nodes. • physical hardware or any number of public/private cloud providers. • a developer workstation fully virtualized with Vagrant + VirtualBox
  • 121. Staging/QA - Single Node # launch stack in your data center % knife bootstrap 123.123.3.3 -r ‘role[django_cms_database_master]’, ‘role[django_cms]’, ‘role[django_cms_load_balancer]’ # launch stack in EC2 % knife ec2 server create -r ‘role[django_cms_database_master]’, ‘role[django_cms]’, ‘role[django_cms_load_balancer]’ # launch stack in Rackspace % knife rackspace server create -r ‘role[django_cms_database_master]’, ‘role[django_cms]’, ‘role[django_cms_load_balancer]’
  • 122. Production - Multi-Machine Cluster % knife ec2 server create -r ‘role[django_cms_database_master]’ % knife ec2 server create -r ‘role[django_cms]’ % knife ec2 server create -r ‘role[django_cms]’ % knife ec2 server create -r ‘role[django_cms_load_balancer]’
  • 123. Developer Workstation % cat Vagrantfile Vagrant::Config.run do |config| config.vm.box = base_box config.vm.provision :chef_server do |chef| chef.chef_server_url = "https://api.opscode.com/organizations/foo" chef.validation_key_path = "~/.chef/private-pems/foo-validator.pem" chef.validation_client_name = "#{ENV['ORGNAME']}-validator" chef.provisioning_path = "/etc/chef" chef.run_list = [ 'role[django_cms_database_master]', 'role[django_cms]', 'role[django_cms_load_balancer]' ] end end % vagrant up
  • 124. BONUS: deploy [insert your favorite web framework here] stacks
  • 125. Application Cookbook • Supports the following web stacks: • Django • Java Webapps • Php • Rails • Node.js (coming soon) • Opscode contributed quick starts walk you through example deployments
  • 126. Further Resources & Closing • www.opscode.com • wiki.opscode.com • @opscode, #opschef • irc.freenode.net, #chef, #chef-hacking • lists.opscode.com
  • 128. Thanks! schisamo@opscode.com www.opscode.com

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. Managing infrastructure with Chef.\n
  8. How&amp;#x2019;s and why&amp;#x2019;s of managing infrastructure with Chef.\nA quick overview of Chef\nWe&amp;#x2019;ll talk about the steps involved for automatically building our n-tier Django stack\nWe&amp;#x2019;ll discuss how your Chef code is reusable across environments\n\n
  9. How&amp;#x2019;s and why&amp;#x2019;s of managing infrastructure with Chef.\nA quick overview of Chef\nWe&amp;#x2019;ll talk about the steps involved for automatically building our n-tier Django stack\nWe&amp;#x2019;ll discuss how your Chef code is reusable across environments\n\n
  10. How&amp;#x2019;s and why&amp;#x2019;s of managing infrastructure with Chef.\nA quick overview of Chef\nWe&amp;#x2019;ll talk about the steps involved for automatically building our n-tier Django stack\nWe&amp;#x2019;ll discuss how your Chef code is reusable across environments\n\n
  11. How&amp;#x2019;s and why&amp;#x2019;s of managing infrastructure with Chef.\nA quick overview of Chef\nWe&amp;#x2019;ll talk about the steps involved for automatically building our n-tier Django stack\nWe&amp;#x2019;ll discuss how your Chef code is reusable across environments\n\n
  12. Why not just use some shell scripts?\n
  13. \n
  14. This is the dream. When everyone&amp;#x2019;s 2nd girlfriend &amp;#x2018;nagios&amp;#x2019; wakes you up in the middle of the night you are ready for the worst.\n
  15. Keep track of all the steps required to take bare metal systems to doing their job in the infrastructure.\n\nIt is all about the policy. This can be lo-fi (ie a wiki page and the &amp;#x2018;meat&amp;#x2019; cloud) or fully automated with something like Chef.\n\nUsually this is the context of a single node.\n
  16. Taking all the systems that have been configured to do their job, and make them work together to actually run the infrastructure.\n\nWRT Chef, we talk about Fully Automated Infrastructure.\n\nThis brings all the single nodes together.\n
  17. Introducing Chef.\n\nMaybe you&amp;#x2019;ve already met!\n
  18. Chef provides a framework for fully automating infrastructure, and has some important design principles.\n
  19. Chef makes it easy to reason about your infrastructure, at scale. The declarative Ruby configuration language is easy to read, and the predictable ordering makes it easy to understand what&amp;#x2019;s going on.\n\nChef is flexible, and designed to allow you to build infrastructure. &amp;#x201C;Tim Toady&amp;#x201D;\n
  20. Chef makes it easy to reason about your infrastructure, at scale. The declarative Ruby configuration language is easy to read, and the predictable ordering makes it easy to understand what&amp;#x2019;s going on.\n\nChef is flexible, and designed to allow you to build infrastructure. &amp;#x201C;Tim Toady&amp;#x201D;\n
  21. Chef makes it easy to reason about your infrastructure, at scale. The declarative Ruby configuration language is easy to read, and the predictable ordering makes it easy to understand what&amp;#x2019;s going on.\n\nChef is flexible, and designed to allow you to build infrastructure. &amp;#x201C;Tim Toady&amp;#x201D;\n
  22. Chef makes it easy to reason about your infrastructure, at scale. The declarative Ruby configuration language is easy to read, and the predictable ordering makes it easy to understand what&amp;#x2019;s going on.\n\nChef is flexible, and designed to allow you to build infrastructure. &amp;#x201C;Tim Toady&amp;#x201D;\n
  23. Chef makes it easy to reason about your infrastructure, at scale. The declarative Ruby configuration language is easy to read, and the predictable ordering makes it easy to understand what&amp;#x2019;s going on.\n\nChef is flexible, and designed to allow you to build infrastructure. &amp;#x201C;Tim Toady&amp;#x201D;\n
  24. Idempotent: Consistency, known system state, easy to build\nChef takes idempotent actions to put the system in the desired state.\n
  25. Chef makes it easy to reason about your infrastructure.\n\nWe build an API, with primitives and libraries, and let you model your data. We don&amp;#x2019;t try to discover because we might make an incorrect assumption about the system.\n\nYou need an API to manage your infrastructure. The standard tools on Unix and Windows already use APIs to the system. Use an API to manage your infrastructure.\n
  26. Chef comes from the perspective that the tool should do pretty much what you expect, hence sane defaults. To get there we had express some opinions. Those opinions can be changed easily, whether that is modifying the configuration of the chef-client, or how Apache is set up.\n
  27. Chef is a flexible framework. You can make it do pretty much anything you want. Just like Perl doesn&amp;#x2019;t tell the programmer how to program, Chef doesn&amp;#x2019;t tell the system administrator how to manage the system. You can extend it, mold it and modify it to do what you need.\n\nBeing written in Ruby, using Ruby for the main language was very purposeful. The tool shouldn&amp;#x2019;t get in your way.\n
  28. \n
  29. -Chef is a library for building and managing infrastructure, and as such it happens to have some tools we wrote that help with that.\n-Ohai gathers data about your nodes.\n-Chef client runs on your nodes to configure them.\n-Knife is the CLI tool used to access the API.\n-Shef is an interactive console debugger.\n
  30. -Chef is a library for building and managing infrastructure, and as such it happens to have some tools we wrote that help with that.\n-Ohai gathers data about your nodes.\n-Chef client runs on your nodes to configure them.\n-Knife is the CLI tool used to access the API.\n-Shef is an interactive console debugger.\n
  31. -Chef is a library for building and managing infrastructure, and as such it happens to have some tools we wrote that help with that.\n-Ohai gathers data about your nodes.\n-Chef client runs on your nodes to configure them.\n-Knife is the CLI tool used to access the API.\n-Shef is an interactive console debugger.\n
  32. -Chef is a library for building and managing infrastructure, and as such it happens to have some tools we wrote that help with that.\n-Ohai gathers data about your nodes.\n-Chef client runs on your nodes to configure them.\n-Knife is the CLI tool used to access the API.\n-Shef is an interactive console debugger.\n
  33. \n
  34. -thin server...fat clients =&gt; all execution happens down on the nodes...server is dumb REST/file server\n-easy to scale horizontally (like a stateless web app)\n
  35. -thin server...fat clients =&gt; all execution happens down on the nodes...server is dumb REST/file server\n-easy to scale horizontally (like a stateless web app)\n
  36. -thin server...fat clients =&gt; all execution happens down on the nodes...server is dumb REST/file server\n-easy to scale horizontally (like a stateless web app)\n
  37. -thin server...fat clients =&gt; all execution happens down on the nodes...server is dumb REST/file server\n-easy to scale horizontally (like a stateless web app)\n
  38. \n
  39. Community is important.\n\nhttp://apache.org/licenses/LICENSE-2.0.html\nhttp://www.opscode.com/blog/2009/08/11/why-we-chose-the-apache-license/\nhttp://wiki.opscode.com/display/chef/How+to+Contribute\nhttp://wiki.opscode.com/display/chef/Approved+Contributors\n\n
  40. Community is important.\n\nhttp://apache.org/licenses/LICENSE-2.0.html\nhttp://www.opscode.com/blog/2009/08/11/why-we-chose-the-apache-license/\nhttp://wiki.opscode.com/display/chef/How+to+Contribute\nhttp://wiki.opscode.com/display/chef/Approved+Contributors\n\n
  41. Community is important.\n\nhttp://apache.org/licenses/LICENSE-2.0.html\nhttp://www.opscode.com/blog/2009/08/11/why-we-chose-the-apache-license/\nhttp://wiki.opscode.com/display/chef/How+to+Contribute\nhttp://wiki.opscode.com/display/chef/Approved+Contributors\n\n
  42. Community is important.\n\nhttp://apache.org/licenses/LICENSE-2.0.html\nhttp://www.opscode.com/blog/2009/08/11/why-we-chose-the-apache-license/\nhttp://wiki.opscode.com/display/chef/How+to+Contribute\nhttp://wiki.opscode.com/display/chef/Approved+Contributors\n\n
  43. Community is important.\n\nhttp://apache.org/licenses/LICENSE-2.0.html\nhttp://www.opscode.com/blog/2009/08/11/why-we-chose-the-apache-license/\nhttp://wiki.opscode.com/display/chef/How+to+Contribute\nhttp://wiki.opscode.com/display/chef/Approved+Contributors\n\n
  44. Community is important.\n\nhttp://apache.org/licenses/LICENSE-2.0.html\nhttp://www.opscode.com/blog/2009/08/11/why-we-chose-the-apache-license/\nhttp://wiki.opscode.com/display/chef/How+to+Contribute\nhttp://wiki.opscode.com/display/chef/Approved+Contributors\n\n
  45. \n
  46. \n
  47. Communication with the server is secure. Clients hold the private key, the server has the public key. The server is not a centralized store of authentication information, pushing the responsibility to the nodes.\n
  48. \n
  49. \n
  50. \n
  51. Manage system configuration as resources.\nPut resources together in recipes.\nDistribute recipes with cookbooks.\nAssign recipes to systems through roles.\nStore arbitrary data in data bags.\nTrack it all like source code.\n
  52. Resources are an abstraction we feed data into. When you write recipes in Chef, you create resources of things you want to configure.\n
  53. Resources declare a description of the state a part of the node should be in.\n
  54. Resources declare a description of the state a part of the node should be in.\n
  55. Resources declare a description of the state a part of the node should be in.\n
  56. Resources declare a description of the state a part of the node should be in.\n
  57. Resources declare a description of the state a part of the node should be in.\n
  58. Resources declare a description of the state a part of the node should be in.\n
  59. Resources declare a description of the state a part of the node should be in.\n
  60. Resources declare a description of the state a part of the node should be in.\n
  61. Resources declare a description of the state a part of the node should be in.\n
  62. Resources declare a description of the state a part of the node should be in.\n
  63. Resources declare a description of the state a part of the node should be in.\n
  64. Resources declare a description of the state a part of the node should be in.\n
  65. Resources declare a description of the state a part of the node should be in.\n
  66. Resources declare a description of the state a part of the node should be in.\n
  67. Resources declare a description of the state a part of the node should be in.\n
  68. Resources declare a description of the state a part of the node should be in.\n
  69. Resources declare a description of the state a part of the node should be in.\n
  70. Resources declare a description of the state a part of the node should be in.\n
  71. Resources declare a description of the state a part of the node should be in.\n
  72. Resources declare a description of the state a part of the node should be in.\n
  73. Resources declare a description of the state a part of the node should be in.\n
  74. Resources declare a description of the state a part of the node should be in.\n
  75. Resources declare a description of the state a part of the node should be in.\n
  76. Resources declare a description of the state a part of the node should be in.\n
  77. Resources declare a description of the state a part of the node should be in.\n
  78. Resources declare a description of the state a part of the node should be in.\n
  79. The abstraction over the commands or API calls that will configure the resource to be in the state you have defined.\n
  80. Providers know how to actually configure the resources to be in the declared state\n\n
  81. \n
  82. \n
  83. Just like recipes themselves are processed in order, the recipes included are processed in order, so when you include a recipe, all its resources are added to the resource collection, then Chef continues to the next.\n\n\n
  84. \n
  85. \n
  86. \n
  87. \n
  88. \n
  89. \n
  90. \n
  91. -the cpan, PyPI or rubygems.org of the cookbbook world!\n
  92. \n
  93. \n
  94. \n
  95. \n
  96. \n
  97. \n
  98. \n
  99. \n
  100. \n
  101. \n
  102. \n
  103. \n
  104. Data bags are containers of grouped information.\n\nUsers, application information, network info, cabinet/rack locations. Describe components of your infrastructure with data, and use that data to configure systems.\n\nProcess data bags in recipes to configure systems dynamically.\n
  105. \n
  106. \n
  107. In our example we are deploy Django CMS but this would apply to any Django application.\n
  108. Provisioning is the first step. We need some computers on the internet. They&amp;#x2019;re going to be load balancers, webservers, database servers. Launch those with a cloud API. Every cloud does this.\n
  109. You need to do something and you manage the configuration. Install packages, create users, etc. You can use pre-built images for this, but then just for a simple infrastructure (w/o monitoring/trending, middleware, etc) you have four discrete images to maintain for updates both for the OS and app updates.\n
  110. This is the last mile. The systems are configured, but also need to be configured to talk to each other.\n
  111. \n
  112. \n
  113. \n
  114. \n
  115. Every database backed application needs a master database. For this simple example we haven&amp;#x2019;t done any complex setup of master/slave replication, but the recipes are built such that this would be relatively easy to add.\n
  116. The database master recipe will read the application information from the data bag and use it to create the database so the application can store its data.\n
  117. all done fully automated\n
  118. all done fully automated\n
  119. all done fully automated\n
  120. We start with one but scale horizontally as needed. We can even scale up and down based on demands.\n
  121. The main thing in this role is the application recipe. \n\nThe recipe will read in data from the data bag (in a predefined format) to determine what kind of application to deploy, the repository where it lives, details on where to put it, what roles to search for to find the database, and many more customizable properties.\n\nWe launched two of these to have something to load balance :).\n
  122. -acquire the code (remote file or scm)...create required config files (database.yml, local_settings.py etc.)\n-install the server software...create an application config for server\n
  123. -acquire the code (remote file or scm)...create required config files (database.yml, local_settings.py etc.)\n-install the server software...create an application config for server\n
  124. -acquire the code (remote file or scm)...create required config files (database.yml, local_settings.py etc.)\n-install the server software...create an application config for server\n
  125. -acquire the code (remote file or scm)...create required config files (database.yml, local_settings.py etc.)\n-install the server software...create an application config for server\n
  126. -acquire the code (remote file or scm)...create required config files (database.yml, local_settings.py etc.)\n-install the server software...create an application config for server\n
  127. -acquire the code (remote file or scm)...create required config files (database.yml, local_settings.py etc.)\n-install the server software...create an application config for server\n
  128. -acquire the code (remote file or scm)...create required config files (database.yml, local_settings.py etc.)\n-install the server software...create an application config for server\n
  129. You no longer need to track which system has an IP that should be applied as the database master. We can just use its fqdn from a search.\n
  130. \n
  131. We&amp;#x2019;re using haproxy, and we&amp;#x2019;ll search for a specific application to load balance. The recipe is written to search for the django_cms role to find systems that should be pool members.\n
  132. \n
  133. -This search occurs everytime Chef runs on the load balancer.\n-If you add more app servers to the mix, the load balancer will *automatically* become aware!\n
  134. A single set of Chef cookbooks, roles and databags allows you to deploy your application stack in numerous ways.\n
  135. \n
  136. \n
  137. \n
  138. \n
  139. \n
  140. \n
  141. \n
  142. \n
  143. https://github.com/opscode/cookbooks/tree/master/application\nhttp://www.opscode.com/blog/category/quickstarts/\n
  144. Before we go to questions, here&amp;#x2019;s some resources to be aware of.\n
  145. \n
  146. \n