SlideShare une entreprise Scribd logo
1  sur  87
Télécharger pour lire hors ligne
DevOps
                     &
                         Chef
Friday 16 March 12
DevOps


Friday 16 March 12
Devs   vs   Ops




Friday 16 March 12
Devs   vs   Ops




Friday 16 March 12
Devs     vs   Ops




                     The Wall Of Confusion
Friday 16 March 12
Change
                     vs
                          Stability
Friday 16 March 12
A Meeting of Minds
                         Follow code into
                         the wild

                      Accept change:
                      become agile

Friday 16 March 12
Buzzword:   DevOps




Friday 16 March 12
Buzzword:   DevOps     Buzzword
                             Buzzword                  Buzzword



                      Buzzword          Buzzword
                                                   Buzzword
         Buzzword
                          Buzzword




Friday 16 March 12
Buzzword:   DevOps       Buzzword
                             Buzzword                     Buzzword
                                     Buzz Lightyear   Buzzword
              Buzzword                    Buzzword
             Buzzword                   Buzzword
                   Buzzword                           Buzzword
         Buzzword                        Buzzword

                          Buzzword           Buzzword




Friday 16 March 12
Buzzword
                        DevOps
                Buzzword:               Buzzword
              Buzzword Buzzword Buzzword         Buzzword
               Buzzword   Buzzword Lightyear Buzzword
                              Buzz
          Buzzword
                 Buzzword        Buzzword
                                      Buzzword
                          Buzzword
                               Buzzword
             Buzzword                         Buzzword
                   Buzzword                Buzzword
         Buzzword      Buzzword Buzzword
                                       Buzz Aldrin
                      Buzzword
                 Buzzword           Buzzword




Friday 16 March 12
What is DevOps?




Friday 16 March 12
What is DevOps?



                             What is DevOps NOT?




Friday 16 March 12
What is DevOps?

                     They are making a play for our jobs

                                       What is DevOps NOT?




Friday 16 March 12
Devs want root
           What is DevOps?

                     They are making a play for our jobs

                                       What is DevOps NOT?




Friday 16 March 12
DevOps is not a job title, it’s a philosophy

                                            Devs want root
           What is DevOps?

                     They are making a play for our jobs

                                       What is DevOps NOT?




Friday 16 March 12
DevOps is not a job title, it’s a philosophy

                                            Devs want root
           What is DevOps?

                     They are making a play for our jobs

                                       What is DevOps NOT?
                                So many words



Friday 16 March 12
DevOps, for me




Friday 16 March 12
DevOps, for me:
                       Testing




Friday 16 March 12
DevOps, for me:
                       Testing
                                 Monitoring




Friday 16 March 12
DevOps, for me:
                          Testing
                                    Monitoring
                     Automation



Friday 16 March 12
DevOps, for me:
                     Testing
         Monitoring
    Automation



Friday 16 March 12
DevOps, for me:
                     Testing   Don’t release broken things

         Monitoring            Know when things break

    Automation                 Replace/fix broken things instantly




Friday 16 March 12
✔   ?
Friday 16 March 12
SCCS:
                     Source Code Control System




Friday 16 March 12
SCCS:
                     Source Code Control System

                      1972
                             40 Years Ago!


Friday 16 March 12
Revision Control




    ✔
Friday 16 March 12
Revision Control
                                   Test Driven Development




    ✔
Friday 16 March 12
Revision Control
                                   Test Driven Development

 Feature Branches




    ✔
Friday 16 March 12
Revision Control
                                   Test Driven Development

 Feature Branches
                              Continuous Integration




    ✔
Friday 16 March 12
Revision Control
                                   Test Driven Development

 Feature Branches
                              Continuous Integration

         Staging Environments


    ✔
Friday 16 March 12
Revision Control
                                   Test Driven Development

 Feature Branches
                              Continuous Integration

         Staging Environments          AGILE
    ✔
Friday 16 March 12
AGILE


Friday 16 March 12
AGILE OPS
                                 ?

Friday 16 March 12
AGILE OPS
      Continuous Deployment       ?
        Feature Flags   Dark Launches
            Automated Recovery
 IMVU - 50+            Flickr - 10+
             Etsy - 25
Friday 16 March 12
Instant Feedback
                           Rollbacks
          Confidence
                     No fear of change
Friday 16 March 12
Code   Infrastructure



Friday 16 March 12
Infrastructure   Code



Friday 16 March 12
Infrastructure   As   Code



Friday 16 March 12
$  ssh  root@web1
             Last  login:  Tue  Mar  13
             #  apt-­‐get  install  apache2
             ...
             #  vim  /etc/apache2/sites-­‐enabled/default.conf
             ...
             #  /etc/init.d/apache2  restart
             ...
             #  scp  web2:/root/.ssh/authorized_keys  ~/.ssh




Friday 16 March 12
Chef
Friday 16 March 12
SERVER


                                          chef-client on node
    use knife to push                           retrieves
    config to server                          configuration
                                              from server




                        use knife to query and
      CLIENT                                          CLIENT
                             ssh to clients
      (workstation)                              (server/node)
Friday 16 March 12
Chef/nodes/web1.json




Friday 16 March 12
{
              "access" : [ "developers", "designers" ],
              "name": "web1",
              "run_list": [ "role[base]", "role[web]",
                            "recipe[splunk]" ]
}




Friday 16 March 12
{
              "access" : [ "developers", "designers" ],
              "name": "web1",
              "run_list": [ "role[base]", "role[web]",
                            "recipe[splunk]" ]
}




Friday 16 March 12
Chef/nodes/web1.json
             Chef/roles/web.rb




Friday 16 March 12
run_list("recipe[apache]",
                     "role[monitoring]")




Friday 16 March 12
run_list("recipe[apache]",
                     "role[monitoring]")




Friday 16 March 12
Chef/nodes/web1.json
             Chef/roles/web.rb
             Chef/cookbooks/apache/
                        recipes/default.rb




Friday 16 March 12
package "apache2" do
                       action :install
                     end




Friday 16 March 12
apache_modules = ['wsgi', 'ssl',
                     'auth_tkt', 'proxy_http',
                     'headers', 'rewrite', 'status']

             apache_modules.each do |mod|
                 apache_module mod do
                     enable true
                     notifies :restart,
                           "service[apache2]"
                 end
             end



Friday 16 March 12
apache_modules = ['wsgi', 'ssl',
                     'auth_tkt', 'proxy_http',
                     'headers', 'rewrite', 'status']

             apache_modules.each do |mod|
                 apache_module mod do
                     enable true
                     notifies :restart,
                           "service[apache2]"
                 end
             end



Friday 16 March 12
package "apache2" do
             case node[:platform]
             when "centos","redhat","fedora","suse"
                 package_name "httpd"
             when "debian","ubuntu"
                 package_name "apache2-mpm-prefork"
             end
             action :install
           end




Friday 16 March 12
package "apache2" do
             case node[:platform]
             when "centos","redhat","fedora","suse"
                 package_name "httpd"
             when "debian","ubuntu"
                 package_name "apache2-mpm-prefork"
             end
             action :install
           end




Friday 16 March 12
Chef/nodes/web1.json
             Chef/roles/web.rb
             Chef/cookbooks/apache/
                        recipes/default.rb
                        attributes/default.rb




Friday 16 March 12
default[:apache][:version] = "2.2"




Friday 16 March 12
package "apache2" do
                action :install
                version "#{node[:apache][:version]}"
              end




Friday 16 March 12
Chef/nodes/web1.json
             Chef/roles/web.rb
             Chef/cookbooks/apache/
                        recipes/default.rb
                        attributes/default.rb
                        templates/default/apache2.conf.erb




Friday 16 March 12
template "#{node[:apache][:dir]}/apache2.conf" do
            source "apache2.conf.erb"
            owner "root"
            mode 0644
            notifies :restart, resources(:service =>
                                       "apache2")
          end




Friday 16 March 12
It’s all Ruby

Friday 16 March 12
It’s all Ruby
   http://wiki.opscode.com/display/chef/Just+Enough+Ruby+for+Chef

                      “Just Enough Ruby for Chef”



Friday 16 March 12
It’s all Ruby
                        Let’s hack


Friday 16 March 12
Chef/nodes/web1.json
             Chef/roles/web.rb
             Chef/cookbooks/apache/
                        recipes/default.rb
                        attributes/default.rb
                        templates/default/apache2.conf.erb
                        libraries/default.rb




Friday 16 March 12
class Chef
      class Recipe
        def apache_ports(&block)
          @node[:apache][:vhosts].each do |vh|
              vh[:ports].each do |p|
                 block.call(p)
             end
          end
        end
      end
    end



Friday 16 March 12
apache_ports do |p|
                         firewall_port p do
                             action :open
                         end
                     end




Friday 16 March 12
apache_ports do |p|
                         firewall_port p do
                             action :open
                         end
                     end




Friday 16 March 12
define :firewall_port, :action => :open do
          if not params.has_key?(:port)
              params[:port] = params[:name]
          end

          if params[:action] == :open
            execute "open #{params[:port]}" do
              command "iptables -A INPUT --destination-port
                              #{params[:port]} -j ACCEPT"
            end
          else
            execute "close #{params[:port]}" do
              command "iptables -A INPUT --destination-port
                              #{params[:port]} -j DROP"
            end
          end
        end


Friday 16 March 12
Providers
                package "apache2" do
                  action :install
                end                          apt-get install


                                             yum install
                     node[:platform]


                                             brew install

Friday 16 March 12
"#{File.expand_path(
                Chef::Config[:file_cache_path]
                    )}/handlers/yola.rb"




Friday 16 March 12
"#{File.expand_path(
                Chef::Config[:file_cache_path]
                    )}/handlers/yola.rb"



        class YolaHandler < Chef::Handler
            def report()
                run_status.updated_resources.each do |r|
                    campfire_speak(r.to_s)
                end
            end
        end



Friday 16 March 12
"#{File.expand_path(
                Chef::Config[:file_cache_path]
                    )}/handlers/yola.rb"



        class YolaHandler < Chef::Handler
            def report()
                run_status.updated_resources.each do |r|
                    campfire_speak(r.to_s)
                end
            end
        end



Friday 16 March 12
Chef/nodes/web1.json
             Chef/roles/web.rb
             Chef/cookbooks/apache/
                        recipes/default.rb
                        attributes/default.rb
                        templates/default/apache2.conf.erb
                        libraries/default.rb
             Chef/environments/production.rb




Friday 16 March 12
Chef/nodes/web1.json
             Chef/roles/web.rb
             Chef/cookbooks/apache/
                        recipes/default.rb
                        attributes/default.rb
                        templates/default/apache2.conf.erb
                        libraries/default.rb
             Chef/environments/production.rb
             Chef/environments/testing.rb




Friday 16 March 12
default_attributes({
                        "aws_region" => "usa-east"
                     })




                     default_attributes({
                        "aws_region" => "usa-east",
                        "logging" => {
                          "debug" => true
                        }
                     })


Friday 16 March 12
Chef/nodes/web1.json
             Chef/roles/web.rb
             Chef/cookbooks/apache/
                        recipes/default.rb
                        attributes/default.rb
                        templates/default/apache2.conf.erb
                        libraries/default.rb
             Chef/environments/production.rb
             Chef/environments/testing.rb
             Chef/data_bags/employees/jonathan.json



Friday 16 March 12
{
         "name": "Jonathan Hitchcock",
         "id": "jonathan",
         "groups": ["developers", "operations"],
         "ssh_keys": [
           { "key":
       "AAAB3NzC1yc2EAAAABIwAAAQEA3advEyDE0aEo=="
           }
         ]
       }




Friday 16 March 12
Provisioning




Friday 16 March 12
Provisioning

          $ knife ec2 server create -r 'role[webserver]'
                              -I ami-7000f019 -f m1.small




Friday 16 March 12
Provisioning

          $ knife ec2 server create -r 'role[webserver]'
                              -I ami-7000f019 -f m1.small


            Amazon EC2               Openstack
                      Rackspace Cloud       libvirt
           Eucalyptus
                          KVM            Kickstart
                  XEN             Vagrant
Friday 16 March 12
Integration
                     configuration data vs configuration logic




Friday 16 March 12
Integration
             configuration vs configuration logic
                     data




Friday 16 March 12
Integration
             configuration vs configuration logic
                     data
                     Ohai      Collects infrastructure data


                Stored and indexed in NoSQL

                                          Search and use

Friday 16 March 12
(A side note on)     Attributes
                default

                     normal

                       override

                          automatic

Friday 16 March 12
(A side note on)     Attributes
                default              cookbooks, data bags


                     normal                node definitions


                       override            for special cases


                          automatic                    ohai


Friday 16 March 12
(Back to)   Integration
             search(:node, 'role:webbackend') do |wb|
               haproxy_backend "#{wb[:apache][:port]}" do
                 action :create
               end
             end


           Systems auto-discover each other

                           Configuration is responsive to changes


Friday 16 March 12
Integration
             search(:node, 'role:webbackend') do |wb|
               haproxy_backend "#{wb[:apache][:port]}" do
                 action :create
               end
             end


           Systems auto-discover each other

                       Configuration is responsive to changes
                            So you don’t have to be!

Friday 16 March 12
Jonathan Hitchcock
                            @vhata
                             github.com/vhata

Friday 16 March 12

Contenu connexe

En vedette

Git + gitlab + sourcetree
Git + gitlab + sourcetreeGit + gitlab + sourcetree
Git + gitlab + sourcetree현우 고
 
Basics of reflection in java
Basics of reflection in javaBasics of reflection in java
Basics of reflection in javakim.mens
 
A Research Study into DevOps Bottlenecks
A Research Study into DevOps BottlenecksA Research Study into DevOps Bottlenecks
A Research Study into DevOps BottlenecksBaruch Sadogursky
 
Webinar: DevOps - Redefining your IT Strategy
Webinar: DevOps - Redefining your IT StrategyWebinar: DevOps - Redefining your IT Strategy
Webinar: DevOps - Redefining your IT StrategyEdureka!
 
하루에 10번 배포하기 - flickr
하루에 10번 배포하기 - flickr하루에 10번 배포하기 - flickr
하루에 10번 배포하기 - flickrSeongSik Kim
 
Reflection in java
Reflection in javaReflection in java
Reflection in javaupen.rockin
 
Using Chef for Automated Infrastructure in the Cloud
Using Chef for Automated Infrastructure in the CloudUsing Chef for Automated Infrastructure in the Cloud
Using Chef for Automated Infrastructure in the CloudJesse Robbins
 
Linux Server Hardening - Steps by Steps
Linux Server Hardening - Steps by StepsLinux Server Hardening - Steps by Steps
Linux Server Hardening - Steps by StepsSunil Paudel
 
When Enterprise Meets DevOps
When Enterprise Meets DevOpsWhen Enterprise Meets DevOps
When Enterprise Meets DevOpsThoughtworks
 
摩登開發團隊的DevOps之道 (@DevOpsTaiwan)
摩登開發團隊的DevOps之道 (@DevOpsTaiwan)摩登開發團隊的DevOps之道 (@DevOpsTaiwan)
摩登開發團隊的DevOps之道 (@DevOpsTaiwan)Chen Cheng-Wei
 
Patterns and Practices of a Successful DevOps Transformation
Patterns and Practices of a Successful DevOps TransformationPatterns and Practices of a Successful DevOps Transformation
Patterns and Practices of a Successful DevOps TransformationChef
 
What is chef - korean
What is chef - koreanWhat is chef - korean
What is chef - koreanSangUk Park
 

En vedette (18)

Git + gitlab + sourcetree
Git + gitlab + sourcetreeGit + gitlab + sourcetree
Git + gitlab + sourcetree
 
Basics of reflection in java
Basics of reflection in javaBasics of reflection in java
Basics of reflection in java
 
A Research Study into DevOps Bottlenecks
A Research Study into DevOps BottlenecksA Research Study into DevOps Bottlenecks
A Research Study into DevOps Bottlenecks
 
Webinar: DevOps - Redefining your IT Strategy
Webinar: DevOps - Redefining your IT StrategyWebinar: DevOps - Redefining your IT Strategy
Webinar: DevOps - Redefining your IT Strategy
 
SRE in Startup
SRE in StartupSRE in Startup
SRE in Startup
 
Using the Splunk Java SDK
Using the Splunk Java SDKUsing the Splunk Java SDK
Using the Splunk Java SDK
 
Reflection in Java
Reflection in JavaReflection in Java
Reflection in Java
 
Building DevOps Toolchain
Building DevOps ToolchainBuilding DevOps Toolchain
Building DevOps Toolchain
 
하루에 10번 배포하기 - flickr
하루에 10번 배포하기 - flickr하루에 10번 배포하기 - flickr
하루에 10번 배포하기 - flickr
 
Reflection in java
Reflection in javaReflection in java
Reflection in java
 
Using Chef for Automated Infrastructure in the Cloud
Using Chef for Automated Infrastructure in the CloudUsing Chef for Automated Infrastructure in the Cloud
Using Chef for Automated Infrastructure in the Cloud
 
Intro to Git, GitHub, and BitBucket
Intro to Git, GitHub, and BitBucketIntro to Git, GitHub, and BitBucket
Intro to Git, GitHub, and BitBucket
 
Linux Server Hardening - Steps by Steps
Linux Server Hardening - Steps by StepsLinux Server Hardening - Steps by Steps
Linux Server Hardening - Steps by Steps
 
When Enterprise Meets DevOps
When Enterprise Meets DevOpsWhen Enterprise Meets DevOps
When Enterprise Meets DevOps
 
摩登開發團隊的DevOps之道 (@DevOpsTaiwan)
摩登開發團隊的DevOps之道 (@DevOpsTaiwan)摩登開發團隊的DevOps之道 (@DevOpsTaiwan)
摩登開發團隊的DevOps之道 (@DevOpsTaiwan)
 
Patterns and Practices of a Successful DevOps Transformation
Patterns and Practices of a Successful DevOps TransformationPatterns and Practices of a Successful DevOps Transformation
Patterns and Practices of a Successful DevOps Transformation
 
Chef introduction
Chef introductionChef introduction
Chef introduction
 
What is chef - korean
What is chef - koreanWhat is chef - korean
What is chef - korean
 

Similaire à DevOps and Chef

Scaling Django to the sky
Scaling Django to the skyScaling Django to the sky
Scaling Django to the skyNaren Arya
 
Ep keyote slides
Ep  keyote slidesEp  keyote slides
Ep keyote slidesOpenEBS
 
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...CodeOps Technologies LLP
 
Código Fácil De Testear
Código Fácil De TestearCódigo Fácil De Testear
Código Fácil De TestearAlvaro Videla
 
(In Portuguese) Seu produto é um sucesso, e agora? desafios técnicos que uma...
(In Portuguese) Seu produto é um sucesso, e agora?  desafios técnicos que uma...(In Portuguese) Seu produto é um sucesso, e agora?  desafios técnicos que uma...
(In Portuguese) Seu produto é um sucesso, e agora? desafios técnicos que uma...Phil Calçado
 

Similaire à DevOps and Chef (6)

Scaling Django to the sky
Scaling Django to the skyScaling Django to the sky
Scaling Django to the sky
 
Ep keyote slides
Ep  keyote slidesEp  keyote slides
Ep keyote slides
 
Ep keyote slides
Ep  keyote slidesEp  keyote slides
Ep keyote slides
 
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
Containers and Developer Defined Data Centers - Evan Powell - Keynote in Bang...
 
Código Fácil De Testear
Código Fácil De TestearCódigo Fácil De Testear
Código Fácil De Testear
 
(In Portuguese) Seu produto é um sucesso, e agora? desafios técnicos que uma...
(In Portuguese) Seu produto é um sucesso, e agora?  desafios técnicos que uma...(In Portuguese) Seu produto é um sucesso, e agora?  desafios técnicos que uma...
(In Portuguese) Seu produto é um sucesso, e agora? desafios técnicos que uma...
 

Dernier

Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 

Dernier (20)

Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 

DevOps and Chef

  • 1. DevOps & Chef Friday 16 March 12
  • 3. Devs vs Ops Friday 16 March 12
  • 4. Devs vs Ops Friday 16 March 12
  • 5. Devs vs Ops The Wall Of Confusion Friday 16 March 12
  • 6. Change vs Stability Friday 16 March 12
  • 7. A Meeting of Minds Follow code into the wild Accept change: become agile Friday 16 March 12
  • 8. Buzzword: DevOps Friday 16 March 12
  • 9. Buzzword: DevOps Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Friday 16 March 12
  • 10. Buzzword: DevOps Buzzword Buzzword Buzzword Buzz Lightyear Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Friday 16 March 12
  • 11. Buzzword DevOps Buzzword: Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Lightyear Buzzword Buzz Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzzword Buzz Aldrin Buzzword Buzzword Buzzword Friday 16 March 12
  • 12. What is DevOps? Friday 16 March 12
  • 13. What is DevOps? What is DevOps NOT? Friday 16 March 12
  • 14. What is DevOps? They are making a play for our jobs What is DevOps NOT? Friday 16 March 12
  • 15. Devs want root What is DevOps? They are making a play for our jobs What is DevOps NOT? Friday 16 March 12
  • 16. DevOps is not a job title, it’s a philosophy Devs want root What is DevOps? They are making a play for our jobs What is DevOps NOT? Friday 16 March 12
  • 17. DevOps is not a job title, it’s a philosophy Devs want root What is DevOps? They are making a play for our jobs What is DevOps NOT? So many words Friday 16 March 12
  • 18. DevOps, for me Friday 16 March 12
  • 19. DevOps, for me: Testing Friday 16 March 12
  • 20. DevOps, for me: Testing Monitoring Friday 16 March 12
  • 21. DevOps, for me: Testing Monitoring Automation Friday 16 March 12
  • 22. DevOps, for me: Testing Monitoring Automation Friday 16 March 12
  • 23. DevOps, for me: Testing Don’t release broken things Monitoring Know when things break Automation Replace/fix broken things instantly Friday 16 March 12
  • 24. ? Friday 16 March 12
  • 25. SCCS: Source Code Control System Friday 16 March 12
  • 26. SCCS: Source Code Control System 1972 40 Years Ago! Friday 16 March 12
  • 27. Revision Control ✔ Friday 16 March 12
  • 28. Revision Control Test Driven Development ✔ Friday 16 March 12
  • 29. Revision Control Test Driven Development Feature Branches ✔ Friday 16 March 12
  • 30. Revision Control Test Driven Development Feature Branches Continuous Integration ✔ Friday 16 March 12
  • 31. Revision Control Test Driven Development Feature Branches Continuous Integration Staging Environments ✔ Friday 16 March 12
  • 32. Revision Control Test Driven Development Feature Branches Continuous Integration Staging Environments AGILE ✔ Friday 16 March 12
  • 34. AGILE OPS ? Friday 16 March 12
  • 35. AGILE OPS Continuous Deployment ? Feature Flags Dark Launches Automated Recovery IMVU - 50+ Flickr - 10+ Etsy - 25 Friday 16 March 12
  • 36. Instant Feedback Rollbacks Confidence No fear of change Friday 16 March 12
  • 37. Code Infrastructure Friday 16 March 12
  • 38. Infrastructure Code Friday 16 March 12
  • 39. Infrastructure As Code Friday 16 March 12
  • 40. $  ssh  root@web1 Last  login:  Tue  Mar  13 #  apt-­‐get  install  apache2 ... #  vim  /etc/apache2/sites-­‐enabled/default.conf ... #  /etc/init.d/apache2  restart ... #  scp  web2:/root/.ssh/authorized_keys  ~/.ssh Friday 16 March 12
  • 42. SERVER chef-client on node use knife to push retrieves config to server configuration from server use knife to query and CLIENT CLIENT ssh to clients (workstation) (server/node) Friday 16 March 12
  • 44. { "access" : [ "developers", "designers" ], "name": "web1", "run_list": [ "role[base]", "role[web]", "recipe[splunk]" ] } Friday 16 March 12
  • 45. { "access" : [ "developers", "designers" ], "name": "web1", "run_list": [ "role[base]", "role[web]", "recipe[splunk]" ] } Friday 16 March 12
  • 46. Chef/nodes/web1.json Chef/roles/web.rb Friday 16 March 12
  • 47. run_list("recipe[apache]", "role[monitoring]") Friday 16 March 12
  • 48. run_list("recipe[apache]", "role[monitoring]") Friday 16 March 12
  • 49. Chef/nodes/web1.json Chef/roles/web.rb Chef/cookbooks/apache/ recipes/default.rb Friday 16 March 12
  • 50. package "apache2" do action :install end Friday 16 March 12
  • 51. apache_modules = ['wsgi', 'ssl', 'auth_tkt', 'proxy_http', 'headers', 'rewrite', 'status'] apache_modules.each do |mod| apache_module mod do enable true notifies :restart, "service[apache2]" end end Friday 16 March 12
  • 52. apache_modules = ['wsgi', 'ssl', 'auth_tkt', 'proxy_http', 'headers', 'rewrite', 'status'] apache_modules.each do |mod| apache_module mod do enable true notifies :restart, "service[apache2]" end end Friday 16 March 12
  • 53. package "apache2" do case node[:platform] when "centos","redhat","fedora","suse" package_name "httpd" when "debian","ubuntu" package_name "apache2-mpm-prefork" end action :install end Friday 16 March 12
  • 54. package "apache2" do case node[:platform] when "centos","redhat","fedora","suse" package_name "httpd" when "debian","ubuntu" package_name "apache2-mpm-prefork" end action :install end Friday 16 March 12
  • 55. Chef/nodes/web1.json Chef/roles/web.rb Chef/cookbooks/apache/ recipes/default.rb attributes/default.rb Friday 16 March 12
  • 57. package "apache2" do action :install version "#{node[:apache][:version]}" end Friday 16 March 12
  • 58. Chef/nodes/web1.json Chef/roles/web.rb Chef/cookbooks/apache/ recipes/default.rb attributes/default.rb templates/default/apache2.conf.erb Friday 16 March 12
  • 59. template "#{node[:apache][:dir]}/apache2.conf" do source "apache2.conf.erb" owner "root" mode 0644 notifies :restart, resources(:service => "apache2") end Friday 16 March 12
  • 60. It’s all Ruby Friday 16 March 12
  • 61. It’s all Ruby http://wiki.opscode.com/display/chef/Just+Enough+Ruby+for+Chef “Just Enough Ruby for Chef” Friday 16 March 12
  • 62. It’s all Ruby Let’s hack Friday 16 March 12
  • 63. Chef/nodes/web1.json Chef/roles/web.rb Chef/cookbooks/apache/ recipes/default.rb attributes/default.rb templates/default/apache2.conf.erb libraries/default.rb Friday 16 March 12
  • 64. class Chef   class Recipe     def apache_ports(&block)       @node[:apache][:vhosts].each do |vh|        vh[:ports].each do |p|          block.call(p)          end       end     end   end end Friday 16 March 12
  • 65. apache_ports do |p| firewall_port p do action :open end end Friday 16 March 12
  • 66. apache_ports do |p| firewall_port p do action :open end end Friday 16 March 12
  • 67. define :firewall_port, :action => :open do if not params.has_key?(:port) params[:port] = params[:name] end   if params[:action] == :open     execute "open #{params[:port]}" do       command "iptables -A INPUT --destination-port #{params[:port]} -j ACCEPT"     end   else     execute "close #{params[:port]}" do       command "iptables -A INPUT --destination-port #{params[:port]} -j DROP"     end   end end Friday 16 March 12
  • 68. Providers package "apache2" do action :install end apt-get install yum install node[:platform] brew install Friday 16 March 12
  • 69. "#{File.expand_path( Chef::Config[:file_cache_path] )}/handlers/yola.rb" Friday 16 March 12
  • 70. "#{File.expand_path( Chef::Config[:file_cache_path] )}/handlers/yola.rb" class YolaHandler < Chef::Handler def report() run_status.updated_resources.each do |r| campfire_speak(r.to_s) end end end Friday 16 March 12
  • 71. "#{File.expand_path( Chef::Config[:file_cache_path] )}/handlers/yola.rb" class YolaHandler < Chef::Handler def report() run_status.updated_resources.each do |r| campfire_speak(r.to_s) end end end Friday 16 March 12
  • 72. Chef/nodes/web1.json Chef/roles/web.rb Chef/cookbooks/apache/ recipes/default.rb attributes/default.rb templates/default/apache2.conf.erb libraries/default.rb Chef/environments/production.rb Friday 16 March 12
  • 73. Chef/nodes/web1.json Chef/roles/web.rb Chef/cookbooks/apache/ recipes/default.rb attributes/default.rb templates/default/apache2.conf.erb libraries/default.rb Chef/environments/production.rb Chef/environments/testing.rb Friday 16 March 12
  • 74. default_attributes({ "aws_region" => "usa-east" }) default_attributes({ "aws_region" => "usa-east", "logging" => { "debug" => true } }) Friday 16 March 12
  • 75. Chef/nodes/web1.json Chef/roles/web.rb Chef/cookbooks/apache/ recipes/default.rb attributes/default.rb templates/default/apache2.conf.erb libraries/default.rb Chef/environments/production.rb Chef/environments/testing.rb Chef/data_bags/employees/jonathan.json Friday 16 March 12
  • 76. { "name": "Jonathan Hitchcock", "id": "jonathan", "groups": ["developers", "operations"], "ssh_keys": [ { "key": "AAAB3NzC1yc2EAAAABIwAAAQEA3advEyDE0aEo==" } ] } Friday 16 March 12
  • 78. Provisioning $ knife ec2 server create -r 'role[webserver]' -I ami-7000f019 -f m1.small Friday 16 March 12
  • 79. Provisioning $ knife ec2 server create -r 'role[webserver]' -I ami-7000f019 -f m1.small Amazon EC2 Openstack Rackspace Cloud libvirt Eucalyptus KVM Kickstart XEN Vagrant Friday 16 March 12
  • 80. Integration configuration data vs configuration logic Friday 16 March 12
  • 81. Integration configuration vs configuration logic data Friday 16 March 12
  • 82. Integration configuration vs configuration logic data Ohai Collects infrastructure data Stored and indexed in NoSQL Search and use Friday 16 March 12
  • 83. (A side note on) Attributes default normal override automatic Friday 16 March 12
  • 84. (A side note on) Attributes default cookbooks, data bags normal node definitions override for special cases automatic ohai Friday 16 March 12
  • 85. (Back to) Integration search(:node, 'role:webbackend') do |wb| haproxy_backend "#{wb[:apache][:port]}" do action :create end end Systems auto-discover each other Configuration is responsive to changes Friday 16 March 12
  • 86. Integration search(:node, 'role:webbackend') do |wb| haproxy_backend "#{wb[:apache][:port]}" do action :create end end Systems auto-discover each other Configuration is responsive to changes So you don’t have to be! Friday 16 March 12
  • 87. Jonathan Hitchcock @vhata github.com/vhata Friday 16 March 12