devops
                          an introduction




                          Patrick Debois
Monday 14 February 2011
My Background
     • Independent consultant
     • Have worked in different roles
     • Agile and Infrastructure
     • Just Enough Developed Infrastructure - http://jedi.be
     • Started organizing devopsdays
     • Recently joined Cutter Consortium

Monday 14 February 2011
Background check?
                          analysts     database
                          developer    security
                          operations   middleware
                          testers      sales
                          network      manager
                          storage      hr people


Monday 14 February 2011
DEV         OPS



                              The
                            problem
Monday 14 February 2011
Agile already did a great job




Monday 14 February 2011
But they forgot some people




Monday 14 February 2011
Monday 14 February 2011
Traditional CI Overview




                          http://www.javaworld.com/javaworld/jw-12-2008/images/CIOverview.jpg
Monday 14 February 2011
Continuous Integration
                                Maturity Model




                      http://www.anthillpro.com/blogs/anthillpro-blog/2009/05/05/1241542860000.html
Monday 14 February 2011
The only way to
                          measure progress
                             is “Working
                              software”



Monday 14 February 2011
The only way to
                          measure progress
                             is “Working
                              software”
                           In production

Monday 14 February 2011
Monday 14 February 2011
Business Value
            Ordered by             Ordered by the value
          the value gained             protected




         Increase Change              Avoid Change
Monday 14 February 2011
IT Tooling is changing




Monday 14 February 2011
Virtualization
                                   • kvm
                                   • xen
                                   • solaris zones
                                   • vmware
                                   • virtualbox
                                   • ...

Monday 14 February 2011
Cloud showed
                          us how to scale




Monday 14 February 2011
Abstraction API




                 http://libvirt.org/   http://www.jclouds.org/

                                                  Adrian Cole
                                                   @jclouds
Monday 14 February 2011
Platform as a Service




Monday 14 February 2011
Hudson as Service




                           http://www.cloudbees.com/


Monday 14 February 2011
But who will
                            manage
                           your IAAS
                           platform?


Monday 14 February 2011
First steps of
                          Automation

                                    http://fai-project.org/

       https://fedorahosted.org/cobbler/

                                 http://spacewalk.redhat.com/



Monday 14 February 2011
Cloning




Monday 14 February 2011
Virtual Sprawl




Monday 14 February 2011
Configuration
                          Management

                                                     Chef
  http://www.cfengine.org/     http://www.opscode.com/chef


                               https://github.com/
                               hugoduncan/pallet
                                                     Pallet
http://www.puppetlabs.com
Monday 14 February 2011
Infrastructure as code
 # tomcat.pp

 class tomcat {

 !    package {
 !    ! "java-1.6.0-sun-compat":
 !    ! ! ensure => "installed";
 !    ! "tomcat6":
 !    ! ! require => [Package["java-1.6.0-sun-compat"], Package["ntc-tomcat-log4j"]],
 !    ! ! ensure => "installed";
 !    ! "tomcat6-admin-webapps":
 !    ! ! ensure => "installed";
 !    ! "log4j":
 !    ! ! ensure => "installed";
 !    ! "tanukiwrapper":
 !    ! ! ensure => "installed";
 !    ! "mysql-connector-java":
 !    ! ! ensure => "installed";
 !    }

 !    file {
 !    ! "/etc/init.d/tomcat6":
                         mode     =>   "0755",
                         owner    =>   "root",
                         group    =>   "root",
                         source   =>   "puppet:///tomcat/tomcat6.init";
      }

 !    user {
 !    ! "tomcat":
 !    ! ! ensure => "present",
 !    ! ! require => Package["tomcat6"];
 !    }
 }!
Monday 14 February 2011
Model Driven Infrastructure




Monday 14 February 2011
Definition
                                             of your
                                         infrastructure



                                     John E.Vincent
                                         @lusis
                          https://github.com/lusis/vogeler
Monday 14 February 2011
Version Control




Monday 14 February 2011
Reusable
                             components
                          https://github.com/camptocamp




Monday 14 February 2011
Code/Server Smells
                                   Private Playground
                                   The sysadmin uses the system as his toy
                                   playground, doesn't clean up.
                                    • /tmp & /var/tmp full of old install files
                                    • / full of files
                                   Gready Server
                                   One server that does every function
                                    • combined mail and web and dns and
                                      fileshares
                                    • all users on the same system
                                   Root is the cause of all evil
                                    •   last show login all root
                                    •   no sudo is activated
                                    •   no sshd keys for logins
                                    •   nfs share/root?
                                    •   Chmod 777
                                    •   most processes run as root

Monday 14 February 2011
Sharing Recipes/Code




                             http://cookbooks.opscode.com/


http://forge.puppetlabs.com/
Monday 14 February 2011
CI for systems




Monday 14 February 2011
CI for systems (2)




Monday 14 February 2011
Pipelines concept




Monday 14 February 2011
Automation
                          without tests is




Monday 14 February 2011
cucumber-nagios
    Feature: google.com
         It should be up
         And I should be able to search for things

              Scenario: Searching for things
              When I visit "http://www.google.com"
              And I fill in "q" with "wikipedia"
              And I press "Google Search"
              Then I should see "www.wikipedia.org"


   $ cucumber-nagios google.feature
   Critical: 0, Warning: 0, 4 okay | passed=4, failed=0



                                                 Lindsay Holmwood
                                                      @auxesis
Monday 14 February 2011
cucumber-ssh
Scenario: Checking /etc/passwd
  When I ssh to "example.org" with the following credentials:
   | username | password       | keyfile                |
   | jacob    | spifeofstrife | /home/jacob/.ssh/id_dsa |
  And I run "cat /etc/passwd"
  Then I should see "jacob" in the output




                                        Lindsay Holmwood
                                             @auxesis
Monday 14 February 2011
cucumber-apache
apache.feature
Feature:
  In order to deploy my application
  As a systems administrator
  I want to know that the config files are legal

    Scenario: Valid Apache config
      Given a config file template apache2.conf in etc/apache2
      When I generate it
      Then there should be a file called apache2.conf in etc/ap
      And it should be valid




                                               Julian Simpson
http://pastie.org/693713
                                               @builddoctor
Monday 14 February 2011
cucumber-puppet

  Feature: cucumber-puppet
    In order to run my puppet manifest's test suite
    As an admin
    I want the cucumber-puppet gem installed

       Scenario: Install cucumber-puppet
             Given a node of class "cucumber-puppet"
             When I compile the catalog
             Then gem "cucumber-puppet" should be "installed"




                                           Nikolay Sturm
https://github.com/nistude/cucumber-puppet
                                             @nistude
Monday 14 February 2011
The life of a System
                                Birth, Adoption
                                     Life
                                   Retired
                                    Death




Monday 14 February 2011
Veewee

                                Allows an easy way
                            to build your own basebox




https://github.com/jedi4ever/veewee Patrick Debois
                                    @patrickdebois

Monday 14 February 2011
Veewee usage

                   • gem install veewee
                   • vagrant basebox define ‘ubuntu-64’ mybox
                    • preseed.cfg + postinstall.sh
                   • vagrant basebox build mybox
                   • vagrant export mybox

Monday 14 February 2011
Vagrant
                                          Allows an easy way
                                     to use the production recipes
                                     in your own dev environment



                  http://vagrantup.com/      Mitchell Hashimoto
                                                 @mitchellh

Monday 14 February 2011
Vagrant usage

                   • vagrant add mybox.box (adds the box)
                   • vagrant init myapp (starts a project)
                   • vagrant up (startup a box)
                   • vagrant ssh (logs into the box)
                   • vagrant provision (runs recipes)

Monday 14 February 2011
Sample Project

                     •    ProjectX (git repo)
                          • Vagrantfile
                          • [manifests] (git submodule)
                                  •
                                 tomcat ...
                                  •
                                 ubuntu ..
                          • [src] (git submodule)
                          • [definitions]
                              •
                              preseed.cfg


Monday 14 February 2011
Global Ownership
      It’s the                         It’s the
    javascript                        network
             It’s the                       It’s the
            backend                         server
                           It’s the                It’s the
                          database                 storage




Monday 14 February 2011
IAAS and PAAS blurring




                    Pull in both your recipes and your code

Monday 14 February 2011
I know
                             all that

                          What’s new?




Monday 14 February 2011
The map
      is not
   the territory
             Alfred Korzybski
Monday 14 February 2011
Optimize the whole not
                          just the individual parts




                             Systems Thinking
Monday 14 February 2011
Value Stream Mapping




Monday 14 February 2011
People make it happen




Monday 14 February 2011
Culture & Mindset




Monday 14 February 2011
Collaboration
 not only when things go wrong
                                                    Sysadmins
                                          Testers
                          Analysts                               Security
Developers




                                                                  Network
                                 UI
                                                    Architects
                              Designers

Monday 14 February 2011
No rock star mentality




                          Mine are bigger then yours
Monday 14 February 2011
Craftsmanship




Monday 14 February 2011
Trust




Monday 14 February 2011
Collaboration
 not only when things go wrong
                                                    Sysadmins
                                          Testers
                          Analysts                               Security
Developers




                                                                  Network
                                 UI
                                                    Architects
                              Designers

Monday 14 February 2011
Starting a devops
                              culture =
                           restoring trust




                                       http://voetstappen.blogspot.com/

Monday 14 February 2011
Interesting Books




Monday 14 February 2011
Want to know more?


                              #devops & #infratalk
                                 on twitter & irc
                              http://devopsdays.org
                              http://devopscafe.org
                             http://planetdevops.net
                              devops googlegroup
                          devops-toolchain googlegroup



Monday 14 February 2011
Questions?




Monday 14 February 2011
The End




Monday 14 February 2011

DevOps Introduction @Cegeka

  • 1.
    devops an introduction Patrick Debois Monday 14 February 2011
  • 2.
    My Background • Independent consultant • Have worked in different roles • Agile and Infrastructure • Just Enough Developed Infrastructure - http://jedi.be • Started organizing devopsdays • Recently joined Cutter Consortium Monday 14 February 2011
  • 3.
    Background check? analysts database developer security operations middleware testers sales network manager storage hr people Monday 14 February 2011
  • 4.
    DEV OPS The problem Monday 14 February 2011
  • 5.
    Agile already dida great job Monday 14 February 2011
  • 6.
    But they forgotsome people Monday 14 February 2011
  • 7.
  • 8.
    Traditional CI Overview http://www.javaworld.com/javaworld/jw-12-2008/images/CIOverview.jpg Monday 14 February 2011
  • 9.
    Continuous Integration Maturity Model http://www.anthillpro.com/blogs/anthillpro-blog/2009/05/05/1241542860000.html Monday 14 February 2011
  • 10.
    The only wayto measure progress is “Working software” Monday 14 February 2011
  • 11.
    The only wayto measure progress is “Working software” In production Monday 14 February 2011
  • 12.
  • 13.
    Business Value Ordered by Ordered by the value the value gained protected Increase Change Avoid Change Monday 14 February 2011
  • 14.
    IT Tooling ischanging Monday 14 February 2011
  • 15.
    Virtualization • kvm • xen • solaris zones • vmware • virtualbox • ... Monday 14 February 2011
  • 16.
    Cloud showed us how to scale Monday 14 February 2011
  • 17.
    Abstraction API http://libvirt.org/ http://www.jclouds.org/ Adrian Cole @jclouds Monday 14 February 2011
  • 18.
    Platform as aService Monday 14 February 2011
  • 19.
    Hudson as Service http://www.cloudbees.com/ Monday 14 February 2011
  • 20.
    But who will manage your IAAS platform? Monday 14 February 2011
  • 21.
    First steps of Automation http://fai-project.org/ https://fedorahosted.org/cobbler/ http://spacewalk.redhat.com/ Monday 14 February 2011
  • 22.
  • 23.
  • 24.
    Configuration Management Chef http://www.cfengine.org/ http://www.opscode.com/chef https://github.com/ hugoduncan/pallet Pallet http://www.puppetlabs.com Monday 14 February 2011
  • 25.
    Infrastructure as code # tomcat.pp class tomcat { ! package { ! ! "java-1.6.0-sun-compat": ! ! ! ensure => "installed"; ! ! "tomcat6": ! ! ! require => [Package["java-1.6.0-sun-compat"], Package["ntc-tomcat-log4j"]], ! ! ! ensure => "installed"; ! ! "tomcat6-admin-webapps": ! ! ! ensure => "installed"; ! ! "log4j": ! ! ! ensure => "installed"; ! ! "tanukiwrapper": ! ! ! ensure => "installed"; ! ! "mysql-connector-java": ! ! ! ensure => "installed"; ! } ! file { ! ! "/etc/init.d/tomcat6": mode => "0755", owner => "root", group => "root", source => "puppet:///tomcat/tomcat6.init"; } ! user { ! ! "tomcat": ! ! ! ensure => "present", ! ! ! require => Package["tomcat6"]; ! } }! Monday 14 February 2011
  • 26.
  • 27.
    Definition of your infrastructure John E.Vincent @lusis https://github.com/lusis/vogeler Monday 14 February 2011
  • 28.
  • 29.
    Reusable components https://github.com/camptocamp Monday 14 February 2011
  • 30.
    Code/Server Smells Private Playground The sysadmin uses the system as his toy playground, doesn't clean up. • /tmp & /var/tmp full of old install files • / full of files Gready Server One server that does every function • combined mail and web and dns and fileshares • all users on the same system Root is the cause of all evil • last show login all root • no sudo is activated • no sshd keys for logins • nfs share/root? • Chmod 777 • most processes run as root Monday 14 February 2011
  • 31.
    Sharing Recipes/Code http://cookbooks.opscode.com/ http://forge.puppetlabs.com/ Monday 14 February 2011
  • 32.
    CI for systems Monday14 February 2011
  • 33.
    CI for systems(2) Monday 14 February 2011
  • 34.
  • 35.
    Automation without tests is Monday 14 February 2011
  • 36.
    cucumber-nagios Feature: google.com It should be up And I should be able to search for things Scenario: Searching for things When I visit "http://www.google.com" And I fill in "q" with "wikipedia" And I press "Google Search" Then I should see "www.wikipedia.org" $ cucumber-nagios google.feature Critical: 0, Warning: 0, 4 okay | passed=4, failed=0 Lindsay Holmwood @auxesis Monday 14 February 2011
  • 37.
    cucumber-ssh Scenario: Checking /etc/passwd When I ssh to "example.org" with the following credentials: | username | password | keyfile | | jacob | spifeofstrife | /home/jacob/.ssh/id_dsa | And I run "cat /etc/passwd" Then I should see "jacob" in the output Lindsay Holmwood @auxesis Monday 14 February 2011
  • 38.
    cucumber-apache apache.feature Feature: Inorder to deploy my application As a systems administrator I want to know that the config files are legal Scenario: Valid Apache config Given a config file template apache2.conf in etc/apache2 When I generate it Then there should be a file called apache2.conf in etc/ap And it should be valid Julian Simpson http://pastie.org/693713 @builddoctor Monday 14 February 2011
  • 39.
    cucumber-puppet Feature:cucumber-puppet In order to run my puppet manifest's test suite As an admin I want the cucumber-puppet gem installed Scenario: Install cucumber-puppet Given a node of class "cucumber-puppet" When I compile the catalog Then gem "cucumber-puppet" should be "installed" Nikolay Sturm https://github.com/nistude/cucumber-puppet @nistude Monday 14 February 2011
  • 40.
    The life ofa System Birth, Adoption Life Retired Death Monday 14 February 2011
  • 41.
    Veewee Allows an easy way to build your own basebox https://github.com/jedi4ever/veewee Patrick Debois @patrickdebois Monday 14 February 2011
  • 42.
    Veewee usage • gem install veewee • vagrant basebox define ‘ubuntu-64’ mybox • preseed.cfg + postinstall.sh • vagrant basebox build mybox • vagrant export mybox Monday 14 February 2011
  • 43.
    Vagrant Allows an easy way to use the production recipes in your own dev environment http://vagrantup.com/ Mitchell Hashimoto @mitchellh Monday 14 February 2011
  • 44.
    Vagrant usage • vagrant add mybox.box (adds the box) • vagrant init myapp (starts a project) • vagrant up (startup a box) • vagrant ssh (logs into the box) • vagrant provision (runs recipes) Monday 14 February 2011
  • 45.
    Sample Project • ProjectX (git repo) • Vagrantfile • [manifests] (git submodule) • tomcat ... • ubuntu .. • [src] (git submodule) • [definitions] • preseed.cfg Monday 14 February 2011
  • 46.
    Global Ownership It’s the It’s the javascript network It’s the It’s the backend server It’s the It’s the database storage Monday 14 February 2011
  • 47.
    IAAS and PAASblurring Pull in both your recipes and your code Monday 14 February 2011
  • 48.
    I know all that What’s new? Monday 14 February 2011
  • 49.
    The map is not the territory Alfred Korzybski Monday 14 February 2011
  • 50.
    Optimize the wholenot just the individual parts Systems Thinking Monday 14 February 2011
  • 51.
  • 52.
    People make ithappen Monday 14 February 2011
  • 53.
    Culture & Mindset Monday14 February 2011
  • 54.
    Collaboration not onlywhen things go wrong Sysadmins Testers Analysts Security Developers Network UI Architects Designers Monday 14 February 2011
  • 55.
    No rock starmentality Mine are bigger then yours Monday 14 February 2011
  • 56.
  • 57.
  • 58.
    Collaboration not onlywhen things go wrong Sysadmins Testers Analysts Security Developers Network UI Architects Designers Monday 14 February 2011
  • 59.
    Starting a devops culture = restoring trust http://voetstappen.blogspot.com/ Monday 14 February 2011
  • 60.
  • 61.
    Want to knowmore? #devops & #infratalk on twitter & irc http://devopsdays.org http://devopscafe.org http://planetdevops.net devops googlegroup devops-toolchain googlegroup Monday 14 February 2011
  • 62.
  • 63.
    The End Monday 14February 2011