SlideShare una empresa de Scribd logo
1 de 75
Descargar para leer sin conexión
From Dev to DevOps


Carlos Sanchez
@csanchez
http://carlossanchez.eu
http://maestrodev.com
Apache
  @csanchez                   Maven
                                       Apache
   ASF                                 Archiva
  Member
                                   Apache
Eclipse IAM                       Continuum




              blog.carlossanchez.eu
Dev... What?
Agile




           planning
   iterative development
  continuous integration
release soon, release often
DevQaOps ?
DevOps addresses



       Fear of change
     Risky deployments
 It works on my machine!
         Siloisation
Dev Change vs. Ops stability
Individuals and interactions over processes and tools
 Working software over comprehensive documentation
  Customer collaboration over contract negotiation
    Responding to change over following a plan
Our highest priority is to satisfy the customer through early and
            continuous delivery of valuable software.
 Welcome changing requirements, even late in development.
  Agile processes harness change for the customer's competitive
                             advantage.
 Deliver working software frequently, from a couple of weeks
to a couple of months, with a preference to the shorter timescale.
   Business people and developers must work together daily
                      throughout the project.
 The most efficient and effective method of conveying information
       to and within a development team is face-to-face
                           conversation.
    Agile processes promote sustainable development. The
sponsors, developers, and users should be able to maintain
                    a constant pace indefinitely.
Dev
What developers do today to
specify target environments is
         NOT enough
Ops
requirements

Operating System
config files
packages installed
multi stage configurations
dev
QA
pre-production
production
Deployment




How do I deploy this?
documentation
manual steps
prone to errors
Cloud




How do I deploy this?
to hundreds of servers
DevOps
Should I worry about my OPS
            job?
yes
 my job is to make other
people’s jobs unnecessary
yes no
you should see the NOOPS
           guys
DevOps is NOT about the tools
Nice, BUT




how can I implement IT
Tools can enable
change in behavior
  and eventually
  change culture

     Patrick Debois
DevOps tools



everyone is intelligent
enough
every tool is cloud
enabled
every tool is DevOps(tm)
DevOps tools: infrastructure automation


                 infrastructure as code
      it’s all invented, now it’s standardized
Infrastructure as Code


New solutions bring new challenges

Follow development best practices
              tagging
            branching
             releasing
       dev, QA, production
New solutions bring new problems
               DEVOPS


  “MY MACHINES ARE BEING PROVISIONED”
Puppet
                 exec { "maven-untar":

manifests          command => "tar xf /tmp/x.tgz",
                   cwd => "/opt",
                   creates => "/opt/apache-maven-${version}",
ruby-like          path => ["/bin"],
                 } ->
 ERB templates   file { "/usr/bin/mvn":
                   ensure => link,
                   target => "/opt/apache-maven-${version}/bin/mvn",
                 }
                 file { "/usr/local/bin/mvn":
                   ensure => absent,
                   require => Exec["maven-untar"],
                 }
                 file { "$home/.mavenrc":
                   mode => "0600",
                   owner => $user,
                   content => template("maven/mavenrc.erb"),
                   require => User[$user],
                 }
Puppet



infrastructure IS code




                   package { 'openssh-server':
                     ensure => present,
                   }
Puppet

declarative model
state vs process
 no scripting



                    service { 'ntp':
                      name      => 'ntpd',
                      ensure    => running,
                    }
Puppet




master - agent
architecture
Vagrant
Vagrant


     Oracle VirtualBox cmdline automation
       Easy Puppet and Chef provisioning
  Keep VM configuration for different projects
Share boxes and configuration files across teams
          base box + configuration files
Vagrant base boxes




  www.vagrantbox.es

anywhere! just (big) files
using Vagrant

$ gem install vagrant
$ vagrant box add centos-6.0-x86_64 
      http://dl.dropbox.com/u/1627760/centos-6.0-x86_64.box
$   vagrant    init myproject
$   vagrant    up
$   vagrant    ssh
$   vagrant    suspend
$   vagrant    resume
$   vagrant    destroy
Vagrant
Vagrant::Config.run do |config|

  # Every Vagrant virtual environment requires a box to build off of.
  config.vm.box = "centos-6.0-x86_64"

  # The url from where the 'config.vm.box' box will be fetched
  config.vm.box_url = "http://dl.dropbox.com/u/1627760/centos-6.0-x86_64.box"

  # Boot with a GUI so you can see the screen. (Default is headless)
  #config.vm.boot_mode = :gui

  # Assign this VM to a host only network IP, allowing you to access it via the IP.
  # config.vm.network "33.33.33.10"

  # Forward a port from the guest to the host, which allows for outside
  # computers to access the VM, whereas host only networking does not.
  config.vm.forward_port "sonar", 9000, 19000

  # Enable provisioning with Puppet stand alone.
  config.vm.share_folder("templates", "/tmp/vagrant-puppet/templates", "templates")

  config.vm.provision :puppet do |puppet|
    puppet.manifest_file = "base.pp"
    puppet.module_path = "mymodules"
    puppet.options = ["--templatedir","/tmp/vagrant-puppet/templates"]
    puppet.options = "-v -d"
  end

end
manifests/base.pp



package { jdk:
  ensure => installed,
  name    => $operatingsystem ? {
     centOS => "java-1.6.0-openjdk-devel",
     Ubuntu => "openjdk-6-jdk",
     default => "jdk",
  },
}
VeeWee
VeeWee




   easily build Vagrant base boxes
https://github.com/jedi4ever/veewee
using VeeWee


$ gem install veewee
$ vagrant basebox templates
$ vagrant basebox define 'my-ubuntu-server'
    'ubuntu-11.04-server-amd64'
# customize definitions/my-ubuntu-server
$ vagrant basebox build 'my-ubuntu-server'
$ vagrant basebox validate 'my-ubuntu-server'
$ vagrant basebox export 'my-ubuntu-server'
$ vagrant box add 'my-ubuntu-server'
    'my-ubuntu-server.box'
$ vagrant init 'my-ubuntu-server'
Geppetto
http://cloudsmith.github.com/geppetto
Puppet DSL
Puppet resources


user { 'dave':
  ensure     =>   present,
  uid        =>   '507',
  gid        =>   'admin',
  shell      =>   '/bin/zsh',
  home       =>   '/home/dave',
  managehome =>   true,
}
Puppet standalone




$ puppet apply my_test_manifest.pp
ordering

file {'/tmp/test1':
  ensure => present,
  content => "Hi.",
}

notify {'/tmp/test1 has already
been synced.':
  require => File['/tmp/test1'],
}
ordering


file {'/tmp/test1':
  ensure => present,
  content => "Hi.",
} ->

notify {'/tmp/test1 has already
been synced.':}
variables



$longthing = "Imagine I have something really
long in here. Like an SSH key, let's say."

file {'authorized_keys':
  path    => '/root/.ssh/authorized_keys',
  content => $longthing,
}
facts

host {'self':
  ensure         =>   present,
  name           =>   $::fqdn,
  host_aliases   =>   ['puppet', $::hostname],
  ip             =>   $::ipaddress,
}

file {'motd':
  ensure => file,
  path    => '/etc/motd',
  mode    => 0644,
  content => "Welcome to ${::hostname},na $
{::operatingsystem} island in the sea of ${::domain}.
n",
}
conditionals

case $operatingsystem {
  centos, redhat: { $apache = "httpd" }
  debian, ubuntu: { $apache = "apache2" }
  default: { fail("Unrecognized operating system for
webserver") }
}

$apache = $operatingsystem ? {
     centos                => 'httpd',
     redhat                => 'httpd',
     /(?i)(ubuntu|debian)/ => "apache2-$1",
       # (Don't actually use that package name.)
     default               => undef,
   }
class definition

class ntp {

    package { 'ntp':
      ensure => installed,
    }

    service { 'ntp':
      name      => 'ntpd',
      ensure    => running,
      enable    => true,
      subscribe => File['ntp.conf'],
    }
}
parameterized classes

class paramclassexample ($value1, $value2 = "Default
value") {
  notify {"Value 1 is ${value1}.":}
  notify {"Value 2 is ${value2}.":}
}

class {'paramclassexample':
  value1 => 'Something',
  value2 => 'Something else',
}

class {'paramclassexample':
  value1 => 'Something',
}
modules

{module}/

    files/
    lib/
    manifests/
         init.pp
         {class}.pp
         {defined type}.pp
         {namespace}/
             {class}.pp
             {class}.pp
    templates/
    tests/
templating




file {'/etc/foo.conf':
  ensure => file,
  require => Package['foo'],
  content => template('foo/foo.conf.erb'),
}
templates/foo.conf.erb




OS is <%= $::operatingsystem %>
node configuration

# nodes.pp

node 'someserver.domain.com' inherits basenode {
    $web_fqdn = 'www.domain.com'
    include genericwebserver
    include some_other_service
}

node 'ldapmaster.domain.com' inherits basenode {
    include s_ldap::master
}

node 'humanresources.domain.com' inherits basenode {
    include c_humanresources
}
Examples
Tomcat cluster + postgres



     postgres database
         db.acme.com
      tomcat servers
        www1.acme.com
        www2.acme.com
             ...
          webapp
Modules required

git clone 
  https://github.com/maestrodev/puppet-postgres 
  modules/postgres
git clone 
  https://github.com/camptocamp/puppet-tomcat 
  modules/tomcat
git clone 
  https://github.com/maestrodev/puppet-maven 
  modules/maven
modules/example/database.pp

class 'database' ($db_password = 'password') {

    class { "postgres" :
      password => 'postgres'
    } ->
    postgres::initdb{ "initdb": } ->
    postgres::enable { "enable": } ->
    postgres::user {
      "web": passwd => $db_password
    } ->
    postgres::createdb { "web": owner=> "web" }
}
modules/example/webserver.pp

class 'webserver'($db_server = 'localhost', $db_password = 'password') {

  package { "java-1.6.0-openjdk-devel":
    ensure => "latest"
  }

  class { 'tomcat': } ->
  tomcat::instance {"mytomcat": } ->

  class { 'maven::maven': } ->
  maven { "/srv/tomcat/${mytomcat}/webapps/mywebapp.war":
    id => "com.acme:mywebapp:1.0:war",
  }

  file { '/etc/acme.conf':
    content => "db = ${db_server}
password = ${db_password}",
  }
}
manifests/site.pp

node 'base' {
  $db_password = 'web'
}

node 'db.acme.com' inherits base {
  class {'database': db_password => $db_password }
}

# www1.acme.com, www2.acme.com, www3.acme.com,...
node /^wwwd+.acme.com$/ inherits base {
  class {'webserver':
    db_server => 'db.acme.com',
    db_password => $db_password,
  }
}
spec/hosts/ db_spec.pp & www_spec.pp

 require 'rspec-puppet'

 describe 'db.acme.com' do
   it { should contain_package('postgres') }
 end


 require 'rspec-puppet'

 describe 'www55.acme.com' do
   it 'should have valid config file' do
     content = catalogue.resource('file', '/etc/acme.conf').send
 (:parameters)[:content]
     content.should match /db.acme.com/
     content.should match /password = web/
   end
 end
Example code and slides



                    Available at
        http://slideshare.carlossanchez.eu
          http://github.carlossanchez.eu
           http://blog.carlossanchez.eu
https://github.com/maestrodev/puppet-modules
Gracias!

http://blog.carlossanchez.eu
http://maestrodev.com
csanchez@maestrodev.com
carlos@apache.org

@csanchez
Photo Credits
               Son of Man Lego - Alex Eylar
http://www.flickr.com/photos/hoyvinmayvin/4702772452/
                 Brick wall - Luis Argerich
  http://www.flickr.com/photos/lrargerich/4353397797/
       Agile vs. Iterative flow - Christopher Little
http://en.wikipedia.org/wiki/File:Agile-vs-iterative-flow.jpg
                    DevOps - Rajiv.Pant
        http://en.wikipedia.org/wiki/File:Devops.png
         Pimientos de Padron - Howard Walfish
   http://www.flickr.com/photos/h-bomb/4868400647/
                    Compiling - XKCD
                    http://xkcd.com/303/
            Printer in 1568 - Meggs, Philip B
 http://en.wikipedia.org/wiki/File:Printer_in_1568-ce.png
                  Relativity - M. C. Escher
http://en.wikipedia.org/wiki/File:Escher%27s_Relativity.jpg
             Teacher and class - Herald Post
 http://www.flickr.com/photos/heraldpost/5169295832/

Más contenido relacionado

La actualidad más candente

DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)Soshi Nemoto
 
Preparation study of_docker - (MOSG)
Preparation study of_docker  - (MOSG)Preparation study of_docker  - (MOSG)
Preparation study of_docker - (MOSG)Soshi Nemoto
 
Continuous infrastructure testing
Continuous infrastructure testingContinuous infrastructure testing
Continuous infrastructure testingDaniel Paulus
 
Configuration Surgery with Augeas
Configuration Surgery with AugeasConfiguration Surgery with Augeas
Configuration Surgery with AugeasPuppet
 
Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013grim_radical
 
Learn basic ansible using docker
Learn basic ansible using dockerLearn basic ansible using docker
Learn basic ansible using dockerLarry Cai
 
Ansible 實戰:top down 觀點
Ansible 實戰:top down 觀點Ansible 實戰:top down 觀點
Ansible 實戰:top down 觀點William Yeh
 
DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)Soshi Nemoto
 
Ansible not only for Dummies
Ansible not only for DummiesAnsible not only for Dummies
Ansible not only for DummiesŁukasz Proszek
 
Amazon EC2 Container Service in Action
Amazon EC2 Container Service in ActionAmazon EC2 Container Service in Action
Amazon EC2 Container Service in ActionRemotty
 
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...Puppet
 
Making Your Capistrano Recipe Book
Making Your Capistrano Recipe BookMaking Your Capistrano Recipe Book
Making Your Capistrano Recipe BookTim Riley
 
10 Million hits a day with WordPress using a $15 VPS
10 Million hits a day  with WordPress using a $15 VPS10 Million hits a day  with WordPress using a $15 VPS
10 Million hits a day with WordPress using a $15 VPSPaolo Tonin
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Michele Orselli
 
Docker puppetcamp london 2013
Docker puppetcamp london 2013Docker puppetcamp london 2013
Docker puppetcamp london 2013Tomas Doran
 
DevOps(2) : Vagrant - (MOSG)
DevOps(2) : Vagrant  -  (MOSG)DevOps(2) : Vagrant  -  (MOSG)
DevOps(2) : Vagrant - (MOSG)Soshi Nemoto
 
Instruction: dev environment
Instruction: dev environmentInstruction: dev environment
Instruction: dev environmentSoshi Nemoto
 
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...Puppet
 
Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Soshi Nemoto
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Composeraccoony
 

La actualidad más candente (20)

DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)
 
Preparation study of_docker - (MOSG)
Preparation study of_docker  - (MOSG)Preparation study of_docker  - (MOSG)
Preparation study of_docker - (MOSG)
 
Continuous infrastructure testing
Continuous infrastructure testingContinuous infrastructure testing
Continuous infrastructure testing
 
Configuration Surgery with Augeas
Configuration Surgery with AugeasConfiguration Surgery with Augeas
Configuration Surgery with Augeas
 
Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013
 
Learn basic ansible using docker
Learn basic ansible using dockerLearn basic ansible using docker
Learn basic ansible using docker
 
Ansible 實戰:top down 觀點
Ansible 實戰:top down 觀點Ansible 實戰:top down 觀點
Ansible 實戰:top down 觀點
 
DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)
 
Ansible not only for Dummies
Ansible not only for DummiesAnsible not only for Dummies
Ansible not only for Dummies
 
Amazon EC2 Container Service in Action
Amazon EC2 Container Service in ActionAmazon EC2 Container Service in Action
Amazon EC2 Container Service in Action
 
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
How Puppet Enables the Use of Lightweight Virtualized Containers - PuppetConf...
 
Making Your Capistrano Recipe Book
Making Your Capistrano Recipe BookMaking Your Capistrano Recipe Book
Making Your Capistrano Recipe Book
 
10 Million hits a day with WordPress using a $15 VPS
10 Million hits a day  with WordPress using a $15 VPS10 Million hits a day  with WordPress using a $15 VPS
10 Million hits a day with WordPress using a $15 VPS
 
Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)Vagrant for real (codemotion rome 2016)
Vagrant for real (codemotion rome 2016)
 
Docker puppetcamp london 2013
Docker puppetcamp london 2013Docker puppetcamp london 2013
Docker puppetcamp london 2013
 
DevOps(2) : Vagrant - (MOSG)
DevOps(2) : Vagrant  -  (MOSG)DevOps(2) : Vagrant  -  (MOSG)
DevOps(2) : Vagrant - (MOSG)
 
Instruction: dev environment
Instruction: dev environmentInstruction: dev environment
Instruction: dev environment
 
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
Building and Testing from Scratch a Puppet Environment with Docker - PuppetCo...
 
Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)
 
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
파이썬 개발환경 구성하기의 끝판왕 - Docker Compose
 

Similar a From Dev to DevOps - Codemotion ES 2012

From Dev to DevOps
From Dev to DevOpsFrom Dev to DevOps
From Dev to DevOpsAgile Spain
 
Antons Kranga Building Agile Infrastructures
Antons Kranga   Building Agile InfrastructuresAntons Kranga   Building Agile Infrastructures
Antons Kranga Building Agile InfrastructuresAntons Kranga
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetAchieve Internet
 
Developing IT infrastructures with Puppet
Developing IT infrastructures with PuppetDeveloping IT infrastructures with Puppet
Developing IT infrastructures with PuppetAlessandro Franceschi
 
Ansible new paradigms for orchestration
Ansible new paradigms for orchestrationAnsible new paradigms for orchestration
Ansible new paradigms for orchestrationPaolo Tonin
 
Dance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech TalkDance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech TalkMichael Peacock
 
20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasag20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasaggarrett honeycutt
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOpsDmitry Buzdin
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesLindsay Holmwood
 
Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in developmentAdam Culp
 
Writing and Publishing Puppet Modules - PuppetConf 2014
Writing and Publishing Puppet Modules - PuppetConf 2014Writing and Publishing Puppet Modules - PuppetConf 2014
Writing and Publishing Puppet Modules - PuppetConf 2014Puppet
 
Writing & Sharing Great Modules - Puppet Camp Boston
Writing & Sharing Great Modules - Puppet Camp BostonWriting & Sharing Great Modules - Puppet Camp Boston
Writing & Sharing Great Modules - Puppet Camp BostonPuppet
 
PM : code faster
PM : code fasterPM : code faster
PM : code fasterPHPPRO
 
Provisioning with Puppet
Provisioning with PuppetProvisioning with Puppet
Provisioning with PuppetJoe Ray
 
Software Defined Datacenter
Software Defined DatacenterSoftware Defined Datacenter
Software Defined DatacenterNETWAYS
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php PresentationAlan Pinstein
 
Getting Started with Ansible
Getting Started with AnsibleGetting Started with Ansible
Getting Started with Ansibleahamilton55
 

Similar a From Dev to DevOps - Codemotion ES 2012 (20)

From Dev to DevOps
From Dev to DevOpsFrom Dev to DevOps
From Dev to DevOps
 
Antons Kranga Building Agile Infrastructures
Antons Kranga   Building Agile InfrastructuresAntons Kranga   Building Agile Infrastructures
Antons Kranga Building Agile Infrastructures
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and Puppet
 
Developing IT infrastructures with Puppet
Developing IT infrastructures with PuppetDeveloping IT infrastructures with Puppet
Developing IT infrastructures with Puppet
 
Ansible new paradigms for orchestration
Ansible new paradigms for orchestrationAnsible new paradigms for orchestration
Ansible new paradigms for orchestration
 
Dance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech TalkDance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech Talk
 
20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasag20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasag
 
Puppet
PuppetPuppet
Puppet
 
Introduction to DevOps
Introduction to DevOpsIntroduction to DevOps
Introduction to DevOps
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
Puppet and Vagrant in development
Puppet and Vagrant in developmentPuppet and Vagrant in development
Puppet and Vagrant in development
 
Writing and Publishing Puppet Modules - PuppetConf 2014
Writing and Publishing Puppet Modules - PuppetConf 2014Writing and Publishing Puppet Modules - PuppetConf 2014
Writing and Publishing Puppet Modules - PuppetConf 2014
 
Puppet
PuppetPuppet
Puppet
 
Writing & Sharing Great Modules - Puppet Camp Boston
Writing & Sharing Great Modules - Puppet Camp BostonWriting & Sharing Great Modules - Puppet Camp Boston
Writing & Sharing Great Modules - Puppet Camp Boston
 
PM : code faster
PM : code fasterPM : code faster
PM : code faster
 
Provisioning with Puppet
Provisioning with PuppetProvisioning with Puppet
Provisioning with Puppet
 
Software Defined Datacenter
Software Defined DatacenterSoftware Defined Datacenter
Software Defined Datacenter
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
 
Getting Started with Ansible
Getting Started with AnsibleGetting Started with Ansible
Getting Started with Ansible
 
Cooking with Chef
Cooking with ChefCooking with Chef
Cooking with Chef
 

Más de Carlos Sanchez

Using Containers for Continuous Integration and Continuous Delivery. KubeCon ...
Using Containers for Continuous Integration and Continuous Delivery. KubeCon ...Using Containers for Continuous Integration and Continuous Delivery. KubeCon ...
Using Containers for Continuous Integration and Continuous Delivery. KubeCon ...Carlos Sanchez
 
Using Kubernetes for Continuous Integration and Continuous Delivery
Using Kubernetes for Continuous Integration and Continuous DeliveryUsing Kubernetes for Continuous Integration and Continuous Delivery
Using Kubernetes for Continuous Integration and Continuous DeliveryCarlos Sanchez
 
Divide and Conquer: Easier Continuous Delivery using Micro-Services
Divide and Conquer: Easier Continuous Delivery using Micro-ServicesDivide and Conquer: Easier Continuous Delivery using Micro-Services
Divide and Conquer: Easier Continuous Delivery using Micro-ServicesCarlos Sanchez
 
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2daysUsing Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2daysCarlos Sanchez
 
Using Containers for Continuous Integration and Continuous Delivery
Using Containers for Continuous Integration and Continuous DeliveryUsing Containers for Continuous Integration and Continuous Delivery
Using Containers for Continuous Integration and Continuous DeliveryCarlos Sanchez
 
Divide and Conquer: Easier Continuous Delivery using Micro-Services
Divide and Conquer: Easier Continuous Delivery using Micro-ServicesDivide and Conquer: Easier Continuous Delivery using Micro-Services
Divide and Conquer: Easier Continuous Delivery using Micro-ServicesCarlos Sanchez
 
Using Containers for Building and Testing: Docker, Kubernetes and Mesos. FOSD...
Using Containers for Building and Testing: Docker, Kubernetes and Mesos. FOSD...Using Containers for Building and Testing: Docker, Kubernetes and Mesos. FOSD...
Using Containers for Building and Testing: Docker, Kubernetes and Mesos. FOSD...Carlos Sanchez
 
Testing Distributed Micro Services. Agile Testing Days 2017
Testing Distributed Micro Services. Agile Testing Days 2017Testing Distributed Micro Services. Agile Testing Days 2017
Testing Distributed Micro Services. Agile Testing Days 2017Carlos Sanchez
 
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
CI and CD at Scale: Scaling Jenkins with Docker and Apache MesosCI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
CI and CD at Scale: Scaling Jenkins with Docker and Apache MesosCarlos Sanchez
 
From Monolith to Docker Distributed Applications
From Monolith to Docker Distributed ApplicationsFrom Monolith to Docker Distributed Applications
From Monolith to Docker Distributed ApplicationsCarlos Sanchez
 
From Monolith to Docker Distributed Applications. JavaOne
From Monolith to Docker Distributed Applications. JavaOneFrom Monolith to Docker Distributed Applications. JavaOne
From Monolith to Docker Distributed Applications. JavaOneCarlos Sanchez
 
Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?
Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?
Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?Carlos Sanchez
 
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
CI and CD at Scale: Scaling Jenkins with Docker and Apache MesosCI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
CI and CD at Scale: Scaling Jenkins with Docker and Apache MesosCarlos Sanchez
 
From Monolith to Docker Distributed Applications
From Monolith to Docker Distributed ApplicationsFrom Monolith to Docker Distributed Applications
From Monolith to Docker Distributed ApplicationsCarlos Sanchez
 
Scaling Jenkins with Docker and Kubernetes
Scaling Jenkins with Docker and KubernetesScaling Jenkins with Docker and Kubernetes
Scaling Jenkins with Docker and KubernetesCarlos Sanchez
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for TestingCarlos Sanchez
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with KubernetesCarlos Sanchez
 
Scaling Jenkins with Docker and Kubernetes
Scaling Jenkins with Docker and KubernetesScaling Jenkins with Docker and Kubernetes
Scaling Jenkins with Docker and KubernetesCarlos Sanchez
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with KubernetesCarlos Sanchez
 
Enterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudEnterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudCarlos Sanchez
 

Más de Carlos Sanchez (20)

Using Containers for Continuous Integration and Continuous Delivery. KubeCon ...
Using Containers for Continuous Integration and Continuous Delivery. KubeCon ...Using Containers for Continuous Integration and Continuous Delivery. KubeCon ...
Using Containers for Continuous Integration and Continuous Delivery. KubeCon ...
 
Using Kubernetes for Continuous Integration and Continuous Delivery
Using Kubernetes for Continuous Integration and Continuous DeliveryUsing Kubernetes for Continuous Integration and Continuous Delivery
Using Kubernetes for Continuous Integration and Continuous Delivery
 
Divide and Conquer: Easier Continuous Delivery using Micro-Services
Divide and Conquer: Easier Continuous Delivery using Micro-ServicesDivide and Conquer: Easier Continuous Delivery using Micro-Services
Divide and Conquer: Easier Continuous Delivery using Micro-Services
 
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2daysUsing Kubernetes for Continuous Integration and Continuous Delivery. Java2days
Using Kubernetes for Continuous Integration and Continuous Delivery. Java2days
 
Using Containers for Continuous Integration and Continuous Delivery
Using Containers for Continuous Integration and Continuous DeliveryUsing Containers for Continuous Integration and Continuous Delivery
Using Containers for Continuous Integration and Continuous Delivery
 
Divide and Conquer: Easier Continuous Delivery using Micro-Services
Divide and Conquer: Easier Continuous Delivery using Micro-ServicesDivide and Conquer: Easier Continuous Delivery using Micro-Services
Divide and Conquer: Easier Continuous Delivery using Micro-Services
 
Using Containers for Building and Testing: Docker, Kubernetes and Mesos. FOSD...
Using Containers for Building and Testing: Docker, Kubernetes and Mesos. FOSD...Using Containers for Building and Testing: Docker, Kubernetes and Mesos. FOSD...
Using Containers for Building and Testing: Docker, Kubernetes and Mesos. FOSD...
 
Testing Distributed Micro Services. Agile Testing Days 2017
Testing Distributed Micro Services. Agile Testing Days 2017Testing Distributed Micro Services. Agile Testing Days 2017
Testing Distributed Micro Services. Agile Testing Days 2017
 
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
CI and CD at Scale: Scaling Jenkins with Docker and Apache MesosCI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
 
From Monolith to Docker Distributed Applications
From Monolith to Docker Distributed ApplicationsFrom Monolith to Docker Distributed Applications
From Monolith to Docker Distributed Applications
 
From Monolith to Docker Distributed Applications. JavaOne
From Monolith to Docker Distributed Applications. JavaOneFrom Monolith to Docker Distributed Applications. JavaOne
From Monolith to Docker Distributed Applications. JavaOne
 
Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?
Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?
Scaling Jenkins with Docker: Swarm, Kubernetes or Mesos?
 
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
CI and CD at Scale: Scaling Jenkins with Docker and Apache MesosCI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
CI and CD at Scale: Scaling Jenkins with Docker and Apache Mesos
 
From Monolith to Docker Distributed Applications
From Monolith to Docker Distributed ApplicationsFrom Monolith to Docker Distributed Applications
From Monolith to Docker Distributed Applications
 
Scaling Jenkins with Docker and Kubernetes
Scaling Jenkins with Docker and KubernetesScaling Jenkins with Docker and Kubernetes
Scaling Jenkins with Docker and Kubernetes
 
Using Docker for Testing
Using Docker for TestingUsing Docker for Testing
Using Docker for Testing
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with Kubernetes
 
Scaling Jenkins with Docker and Kubernetes
Scaling Jenkins with Docker and KubernetesScaling Jenkins with Docker and Kubernetes
Scaling Jenkins with Docker and Kubernetes
 
Scaling Docker with Kubernetes
Scaling Docker with KubernetesScaling Docker with Kubernetes
Scaling Docker with Kubernetes
 
Enterprise Build And Test In The Cloud
Enterprise Build And Test In The CloudEnterprise Build And Test In The Cloud
Enterprise Build And Test In The Cloud
 

Último

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 

Último (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 

From Dev to DevOps - Codemotion ES 2012

  • 1. From Dev to DevOps Carlos Sanchez @csanchez http://carlossanchez.eu http://maestrodev.com
  • 2. Apache @csanchez Maven Apache ASF Archiva Member Apache Eclipse IAM Continuum blog.carlossanchez.eu
  • 4. Agile planning iterative development continuous integration release soon, release often
  • 5.
  • 7.
  • 8. DevOps addresses Fear of change Risky deployments It works on my machine! Siloisation Dev Change vs. Ops stability
  • 9. Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan
  • 10. Our highest priority is to satisfy the customer through early and continuous delivery of valuable software. Welcome changing requirements, even late in development. Agile processes harness change for the customer's competitive advantage. Deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter timescale. Business people and developers must work together daily throughout the project. The most efficient and effective method of conveying information to and within a development team is face-to-face conversation. Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely.
  • 11.
  • 12. Dev
  • 13.
  • 14.
  • 15.
  • 16. What developers do today to specify target environments is NOT enough
  • 17.
  • 18.
  • 19. Ops
  • 20. requirements Operating System config files packages installed multi stage configurations dev QA pre-production production
  • 21. Deployment How do I deploy this? documentation manual steps prone to errors
  • 22. Cloud How do I deploy this? to hundreds of servers
  • 24.
  • 25. Should I worry about my OPS job?
  • 26. yes my job is to make other people’s jobs unnecessary
  • 27. yes no you should see the NOOPS guys
  • 28.
  • 29. DevOps is NOT about the tools
  • 30. Nice, BUT how can I implement IT
  • 31. Tools can enable change in behavior and eventually change culture Patrick Debois
  • 32. DevOps tools everyone is intelligent enough every tool is cloud enabled every tool is DevOps(tm)
  • 33. DevOps tools: infrastructure automation infrastructure as code it’s all invented, now it’s standardized
  • 34. Infrastructure as Code New solutions bring new challenges Follow development best practices tagging branching releasing dev, QA, production
  • 35. New solutions bring new problems DEVOPS “MY MACHINES ARE BEING PROVISIONED”
  • 36.
  • 37. Puppet exec { "maven-untar": manifests command => "tar xf /tmp/x.tgz", cwd => "/opt", creates => "/opt/apache-maven-${version}", ruby-like path => ["/bin"], } -> ERB templates file { "/usr/bin/mvn": ensure => link, target => "/opt/apache-maven-${version}/bin/mvn", } file { "/usr/local/bin/mvn": ensure => absent, require => Exec["maven-untar"], } file { "$home/.mavenrc": mode => "0600", owner => $user, content => template("maven/mavenrc.erb"), require => User[$user], }
  • 38. Puppet infrastructure IS code package { 'openssh-server': ensure => present, }
  • 39. Puppet declarative model state vs process no scripting service { 'ntp': name => 'ntpd', ensure => running, }
  • 42. Vagrant Oracle VirtualBox cmdline automation Easy Puppet and Chef provisioning Keep VM configuration for different projects Share boxes and configuration files across teams base box + configuration files
  • 43. Vagrant base boxes www.vagrantbox.es anywhere! just (big) files
  • 44. using Vagrant $ gem install vagrant $ vagrant box add centos-6.0-x86_64 http://dl.dropbox.com/u/1627760/centos-6.0-x86_64.box $ vagrant init myproject $ vagrant up $ vagrant ssh $ vagrant suspend $ vagrant resume $ vagrant destroy
  • 45. Vagrant Vagrant::Config.run do |config| # Every Vagrant virtual environment requires a box to build off of. config.vm.box = "centos-6.0-x86_64" # The url from where the 'config.vm.box' box will be fetched config.vm.box_url = "http://dl.dropbox.com/u/1627760/centos-6.0-x86_64.box" # Boot with a GUI so you can see the screen. (Default is headless) #config.vm.boot_mode = :gui # Assign this VM to a host only network IP, allowing you to access it via the IP. # config.vm.network "33.33.33.10" # Forward a port from the guest to the host, which allows for outside # computers to access the VM, whereas host only networking does not. config.vm.forward_port "sonar", 9000, 19000 # Enable provisioning with Puppet stand alone. config.vm.share_folder("templates", "/tmp/vagrant-puppet/templates", "templates") config.vm.provision :puppet do |puppet| puppet.manifest_file = "base.pp" puppet.module_path = "mymodules" puppet.options = ["--templatedir","/tmp/vagrant-puppet/templates"] puppet.options = "-v -d" end end
  • 46. manifests/base.pp package { jdk: ensure => installed, name => $operatingsystem ? { centOS => "java-1.6.0-openjdk-devel", Ubuntu => "openjdk-6-jdk", default => "jdk", }, }
  • 48. VeeWee easily build Vagrant base boxes https://github.com/jedi4ever/veewee
  • 49. using VeeWee $ gem install veewee $ vagrant basebox templates $ vagrant basebox define 'my-ubuntu-server' 'ubuntu-11.04-server-amd64' # customize definitions/my-ubuntu-server $ vagrant basebox build 'my-ubuntu-server' $ vagrant basebox validate 'my-ubuntu-server' $ vagrant basebox export 'my-ubuntu-server' $ vagrant box add 'my-ubuntu-server' 'my-ubuntu-server.box' $ vagrant init 'my-ubuntu-server'
  • 53. Puppet resources user { 'dave': ensure => present, uid => '507', gid => 'admin', shell => '/bin/zsh', home => '/home/dave', managehome => true, }
  • 54. Puppet standalone $ puppet apply my_test_manifest.pp
  • 55. ordering file {'/tmp/test1': ensure => present, content => "Hi.", } notify {'/tmp/test1 has already been synced.': require => File['/tmp/test1'], }
  • 56. ordering file {'/tmp/test1': ensure => present, content => "Hi.", } -> notify {'/tmp/test1 has already been synced.':}
  • 57. variables $longthing = "Imagine I have something really long in here. Like an SSH key, let's say." file {'authorized_keys': path => '/root/.ssh/authorized_keys', content => $longthing, }
  • 58. facts host {'self': ensure => present, name => $::fqdn, host_aliases => ['puppet', $::hostname], ip => $::ipaddress, } file {'motd': ensure => file, path => '/etc/motd', mode => 0644, content => "Welcome to ${::hostname},na $ {::operatingsystem} island in the sea of ${::domain}. n", }
  • 59. conditionals case $operatingsystem { centos, redhat: { $apache = "httpd" } debian, ubuntu: { $apache = "apache2" } default: { fail("Unrecognized operating system for webserver") } } $apache = $operatingsystem ? { centos => 'httpd', redhat => 'httpd', /(?i)(ubuntu|debian)/ => "apache2-$1", # (Don't actually use that package name.) default => undef, }
  • 60. class definition class ntp { package { 'ntp': ensure => installed, } service { 'ntp': name => 'ntpd', ensure => running, enable => true, subscribe => File['ntp.conf'], } }
  • 61. parameterized classes class paramclassexample ($value1, $value2 = "Default value") { notify {"Value 1 is ${value1}.":} notify {"Value 2 is ${value2}.":} } class {'paramclassexample': value1 => 'Something', value2 => 'Something else', } class {'paramclassexample': value1 => 'Something', }
  • 62. modules {module}/ files/ lib/ manifests/ init.pp {class}.pp {defined type}.pp {namespace}/ {class}.pp {class}.pp templates/ tests/
  • 63. templating file {'/etc/foo.conf': ensure => file, require => Package['foo'], content => template('foo/foo.conf.erb'), }
  • 64. templates/foo.conf.erb OS is <%= $::operatingsystem %>
  • 65. node configuration # nodes.pp node 'someserver.domain.com' inherits basenode { $web_fqdn = 'www.domain.com' include genericwebserver include some_other_service } node 'ldapmaster.domain.com' inherits basenode { include s_ldap::master } node 'humanresources.domain.com' inherits basenode { include c_humanresources }
  • 67. Tomcat cluster + postgres postgres database db.acme.com tomcat servers www1.acme.com www2.acme.com ... webapp
  • 68. Modules required git clone https://github.com/maestrodev/puppet-postgres modules/postgres git clone https://github.com/camptocamp/puppet-tomcat modules/tomcat git clone https://github.com/maestrodev/puppet-maven modules/maven
  • 69. modules/example/database.pp class 'database' ($db_password = 'password') { class { "postgres" : password => 'postgres' } -> postgres::initdb{ "initdb": } -> postgres::enable { "enable": } -> postgres::user { "web": passwd => $db_password } -> postgres::createdb { "web": owner=> "web" } }
  • 70. modules/example/webserver.pp class 'webserver'($db_server = 'localhost', $db_password = 'password') { package { "java-1.6.0-openjdk-devel": ensure => "latest" } class { 'tomcat': } -> tomcat::instance {"mytomcat": } -> class { 'maven::maven': } -> maven { "/srv/tomcat/${mytomcat}/webapps/mywebapp.war": id => "com.acme:mywebapp:1.0:war", } file { '/etc/acme.conf': content => "db = ${db_server} password = ${db_password}", } }
  • 71. manifests/site.pp node 'base' { $db_password = 'web' } node 'db.acme.com' inherits base { class {'database': db_password => $db_password } } # www1.acme.com, www2.acme.com, www3.acme.com,... node /^wwwd+.acme.com$/ inherits base { class {'webserver': db_server => 'db.acme.com', db_password => $db_password, } }
  • 72. spec/hosts/ db_spec.pp & www_spec.pp require 'rspec-puppet' describe 'db.acme.com' do it { should contain_package('postgres') } end require 'rspec-puppet' describe 'www55.acme.com' do it 'should have valid config file' do content = catalogue.resource('file', '/etc/acme.conf').send (:parameters)[:content] content.should match /db.acme.com/ content.should match /password = web/ end end
  • 73. Example code and slides Available at http://slideshare.carlossanchez.eu http://github.carlossanchez.eu http://blog.carlossanchez.eu https://github.com/maestrodev/puppet-modules
  • 75. Photo Credits Son of Man Lego - Alex Eylar http://www.flickr.com/photos/hoyvinmayvin/4702772452/ Brick wall - Luis Argerich http://www.flickr.com/photos/lrargerich/4353397797/ Agile vs. Iterative flow - Christopher Little http://en.wikipedia.org/wiki/File:Agile-vs-iterative-flow.jpg DevOps - Rajiv.Pant http://en.wikipedia.org/wiki/File:Devops.png Pimientos de Padron - Howard Walfish http://www.flickr.com/photos/h-bomb/4868400647/ Compiling - XKCD http://xkcd.com/303/ Printer in 1568 - Meggs, Philip B http://en.wikipedia.org/wiki/File:Printer_in_1568-ce.png Relativity - M. C. Escher http://en.wikipedia.org/wiki/File:Escher%27s_Relativity.jpg Teacher and class - Herald Post http://www.flickr.com/photos/heraldpost/5169295832/