SlideShare una empresa de Scribd logo
1 de 96
From Dev to DevOps



Carlos Sanchez
MaestroDev
Hola!


Solutions Architect at
MaestroDev
Member of Apache
Software Foundation
Maven PMC, Continuum,
Archiva
Eclipse IAM co-lead
etc...
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.
The Tragedy of the Commons
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
Infrastructure as Code




Follow development best practices
              tagging
            branching
             releasing
       dev, QA, production
DevOps
Should I worry about my OPS
            job?
yes
yes
 my job is to make other
people’s jobs unnecessary
yes
yes
yes no
yes no
you should see the NOOPS
           guys
DevOps is NOT about the tools
Nice, BUT




how can I implement IT
Nice, BUT




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

     Patrick Debois
Man is the only animal that
changes environment instead of
           adapting
Man is the only animal that
changes environment instead of
           adapting

          (using tools)
DevOps tools



everyone thinks is
intelligent enough
every tool thinks it’s cloud
enabled
every tool thinks it’s
DevOps
DevOps tools



everyone thinks is
intelligent enough
every tool thinks it’s cloud
enabled
every tool thinks it’s
DevOps
DevOps tools: infrastructure automation


                 infrastructure as code
      it’s all invented, now it’s standardized
Puppet


    infrastructure IS code
       declarative model
state vs process - no scripting
           manifests
             ruby
         ERB templates
 master - agent architecture
Puppet file structure




      /etc/puppet
    manifests/site.pp
   manifests/nodes.pp
Puppet example

user { 'dave':
  ensure     => present,
  uid        => '507',
  gid        => 'admin',
  shell      => '/bin/zsh',
  home       => '/home/dave',
  managehome => true,
}
file {'/tmp/test1':
  ensure => present,
  content => "Hi.",
}
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


     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 resources

 $ puppet resource user root

user { 'root':
    home => '/var/root',
    shell => '/bin/sh',
    uid => '0',
    ensure => 'present',
    password => '*',
    gid => '0',
    comment => 'System Administrator'
}
Puppet resources

$ puppet resource user dave
ensure=present shell="/bin/zsh" home="/
home/dave" managehome=true

notice: /User[dave]/ensure: created

user { 'dave':
    ensure => 'present',
    home => '/home/dave',
    shell => '/bin/zsh'
}
Puppet resources



file {'testfile':
  path    => '/tmp/testfile',
  ensure => present,
  mode    => 0640,
  content => "I'm a test file.",
}
notify {"I'm notifying you.":}
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.':}
package / file /service / subscribe

package { 'openssh-server':
  ensure => present,
  before => File['/etc/ssh/sshd_config'],
}

file { '/etc/ssh/sshd_config':
  ensure => file,
  mode   => 600,
  source => '/root/learning-manifests/sshd_config',
}

service { 'sshd':
  ensure     => running,
  enable     => true,
  hasrestart => true,
  hasstatus => true,
  subscribe => File['/etc/ssh/sshd_config'],
}
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

if $is_virtual {
  service {'ntpd':
    ensure => stopped,
    enable => false,
  }
}
else {
  service { 'ntpd':
    name       => 'ntpd',
    ensure     => running,
    enable     => true,
    hasrestart => true,
    require => Package['ntp'],
  }
}
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'],
    }
}
class declaration (1)




class {'ntp': }
class declaration (2)




include ntp
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
}
Maven and Puppet
What am I doing to automate deployment




             Ant tasks plugin
             ssh commands
             Assembly plugin
                  Cargo
What can I do to automate deployment




 Handle full deployment including infrastructure
             not just webapp deployment
    Help Ops with clear, automated manifests
 Ability to reproduce production environments
  in local box using Vagrant / VirtualBox / VMWare
Maven-Puppet module


         A Maven Puppet module

https://github.com/maestrodev/puppet-maven

   fetches Maven artifacts from the repo
        manages them with Puppet
         no more extra packaging
Requirements



      Java JDK
    Apache Buildr

preinstalled in the box
chicken and egg problem
New Maven type




    maven { "/tmp/maven-core-2.2.1.jar":
      id => "org.apache.maven:maven-core:jar:2.2.1",
      repos => ["http://repo1.maven.apache.org/maven2",
              "http://mirrors.ibiblio.org/pub/mirrors/maven2"],
}
New Maven type



    maven { "/tmp/maven-core-2.2.1.jar":
      groupId => "org.apache.maven",
      artifactId => "maven-core",
      version => "2.2.1",
      packaging => "jar",
      repos => ["http://repo1.maven.apache.org/maven2",
              "http://mirrors.ibiblio.org/pub/mirrors/maven2"],
}
Example code




                    Available at
          http://github.carlossanchez.eu
           http://blog.carlossanchez.eu
https://github.com/maestrodev/puppet-modules
Questions?
Thanks!

http://maestrodev.com
http://carlossanchez.eu
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/
            Printer in 1568 - Meggs, Philip B
 http://en.wikipedia.org/wiki/File:Printer_in_1568-ce.png

Más contenido relacionado

Más de 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
 
Continuous Delivery: The Next Frontier
Continuous Delivery: The Next FrontierContinuous Delivery: The Next Frontier
Continuous Delivery: The Next FrontierCarlos Sanchez
 
How to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero ClicksHow to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero ClicksCarlos Sanchez
 

Más de Carlos Sanchez (20)

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
 
Continuous Delivery: The Next Frontier
Continuous Delivery: The Next FrontierContinuous Delivery: The Next Frontier
Continuous Delivery: The Next Frontier
 
How to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero ClicksHow to Develop Puppet Modules: From Source to the Forge With Zero Clicks
How to Develop Puppet Modules: From Source to the Forge With Zero Clicks
 

Último

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Último (20)

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

From Dev to DevOps - Conferencia Agile Spain 2011

  • 1. From Dev to DevOps Carlos Sanchez MaestroDev
  • 2. Hola! Solutions Architect at MaestroDev Member of Apache Software Foundation Maven PMC, Continuum, Archiva Eclipse IAM co-lead etc...
  • 4. Agile planning iterative development continuous integration release soon, release often
  • 5.
  • 6.
  • 7.
  • 8.
  • 10.
  • 11. DevOps addresses Fear of change Risky deployments It works on my machine! Siloisation Dev Change vs. Ops stability
  • 12. Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan
  • 13. 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.
  • 14. The Tragedy of the Commons
  • 15. Dev
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23. What developers do today to specify target environments is NOT enough
  • 24.
  • 25. Ops
  • 26. requirements Operating System config files packages installed multi stage configurations dev QA pre-production production
  • 27. Deployment How do I deploy this? documentation manual steps prone to errors
  • 28. Cloud How do I deploy this? to hundreds of servers
  • 29. Infrastructure as Code Follow development best practices tagging branching releasing dev, QA, production
  • 30.
  • 32. Should I worry about my OPS job?
  • 33.
  • 34. yes
  • 35. yes my job is to make other people’s jobs unnecessary
  • 36. yes
  • 37. yes
  • 39. yes no you should see the NOOPS guys
  • 40. DevOps is NOT about the tools
  • 41. Nice, BUT how can I implement IT
  • 42. Nice, BUT how can I implement IT
  • 43. Tools can enable change in behavior and eventually change culture Patrick Debois
  • 44. Man is the only animal that changes environment instead of adapting
  • 45. Man is the only animal that changes environment instead of adapting (using tools)
  • 46. DevOps tools everyone thinks is intelligent enough every tool thinks it’s cloud enabled every tool thinks it’s DevOps
  • 47. DevOps tools everyone thinks is intelligent enough every tool thinks it’s cloud enabled every tool thinks it’s DevOps
  • 48. DevOps tools: infrastructure automation infrastructure as code it’s all invented, now it’s standardized
  • 49.
  • 50. Puppet infrastructure IS code declarative model state vs process - no scripting manifests ruby ERB templates master - agent architecture
  • 51. Puppet file structure /etc/puppet manifests/site.pp manifests/nodes.pp
  • 52. Puppet example user { 'dave': ensure => present, uid => '507', gid => 'admin', shell => '/bin/zsh', home => '/home/dave', managehome => true, } file {'/tmp/test1': ensure => present, content => "Hi.", }
  • 54. 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
  • 55. 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
  • 56. Vagrant base boxes www.vagrantbox.es anywhere! just (big) files
  • 57. 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
  • 58. 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
  • 59. manifests/base.pp package { jdk: ensure => installed, name => $operatingsystem ? { centOS => "java-1.6.0-openjdk-devel", Ubuntu => "openjdk-6-jdk", default => "jdk", }, }
  • 61. VeeWee easily build Vagrant base boxes https://github.com/jedi4ever/veewee
  • 62. 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'
  • 66. Puppet resources user { 'dave': ensure => present, uid => '507', gid => 'admin', shell => '/bin/zsh', home => '/home/dave', managehome => true, }
  • 67. Puppet resources $ puppet resource user root user { 'root': home => '/var/root', shell => '/bin/sh', uid => '0', ensure => 'present', password => '*', gid => '0', comment => 'System Administrator' }
  • 68. Puppet resources $ puppet resource user dave ensure=present shell="/bin/zsh" home="/ home/dave" managehome=true notice: /User[dave]/ensure: created user { 'dave': ensure => 'present', home => '/home/dave', shell => '/bin/zsh' }
  • 69. Puppet resources file {'testfile': path => '/tmp/testfile', ensure => present, mode => 0640, content => "I'm a test file.", } notify {"I'm notifying you.":}
  • 70. Puppet standalone $ puppet apply my_test_manifest.pp
  • 71. ordering file {'/tmp/test1': ensure => present, content => "Hi.", } notify {'/tmp/test1 has already been synced.': require => File['/tmp/test1'], }
  • 72. ordering file {'/tmp/test1': ensure => present, content => "Hi.", } -> notify {'/tmp/test1 has already been synced.':}
  • 73. package / file /service / subscribe package { 'openssh-server': ensure => present, before => File['/etc/ssh/sshd_config'], } file { '/etc/ssh/sshd_config': ensure => file, mode => 600, source => '/root/learning-manifests/sshd_config', } service { 'sshd': ensure => running, enable => true, hasrestart => true, hasstatus => true, subscribe => File['/etc/ssh/sshd_config'], }
  • 74. 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, }
  • 75. 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", }
  • 76. conditionals if $is_virtual { service {'ntpd': ensure => stopped, enable => false, } } else { service { 'ntpd': name => 'ntpd', ensure => running, enable => true, hasrestart => true, require => Package['ntp'], } }
  • 77. 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, }
  • 78. class definition class ntp { package { 'ntp': ensure => installed, } service { 'ntp': name => 'ntpd', ensure => running, enable => true, subscribe => File['ntp.conf'], } }
  • 81. 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', }
  • 82. modules {module}/ files/ lib/ manifests/ init.pp {class}.pp {defined type}.pp {namespace}/ {class}.pp {class}.pp templates/ tests/
  • 83. templating file {'/etc/foo.conf': ensure => file, require => Package['foo'], content => template('foo/foo.conf.erb'), }
  • 84. templates/foo.conf.erb OS is <%= $::operatingsystem %>
  • 85. 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 }
  • 87. What am I doing to automate deployment Ant tasks plugin ssh commands Assembly plugin Cargo
  • 88. What can I do to automate deployment Handle full deployment including infrastructure not just webapp deployment Help Ops with clear, automated manifests Ability to reproduce production environments in local box using Vagrant / VirtualBox / VMWare
  • 89. Maven-Puppet module A Maven Puppet module https://github.com/maestrodev/puppet-maven fetches Maven artifacts from the repo manages them with Puppet no more extra packaging
  • 90. Requirements Java JDK Apache Buildr preinstalled in the box chicken and egg problem
  • 91. New Maven type maven { "/tmp/maven-core-2.2.1.jar": id => "org.apache.maven:maven-core:jar:2.2.1", repos => ["http://repo1.maven.apache.org/maven2", "http://mirrors.ibiblio.org/pub/mirrors/maven2"], }
  • 92. New Maven type maven { "/tmp/maven-core-2.2.1.jar": groupId => "org.apache.maven", artifactId => "maven-core", version => "2.2.1", packaging => "jar", repos => ["http://repo1.maven.apache.org/maven2", "http://mirrors.ibiblio.org/pub/mirrors/maven2"], }
  • 93. Example code Available at http://github.carlossanchez.eu http://blog.carlossanchez.eu https://github.com/maestrodev/puppet-modules
  • 96. 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/ Printer in 1568 - Meggs, Philip B http://en.wikipedia.org/wiki/File:Printer_in_1568-ce.png

Notas del editor

  1. \n
  2. question? #developers vs #ops vs #devops\n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. question? what do you do to specify ops requirements?\n
  33. \n
  34. \n
  35. \n
  36. \n
  37. question? who&amp;#x2019;s able to roll back to a previous version of software? and system?\n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n
  68. \n
  69. \n
  70. \n
  71. \n
  72. \n
  73. \n
  74. \n
  75. \n
  76. \n
  77. \n
  78. \n
  79. \n
  80. \n
  81. \n
  82. \n
  83. \n
  84. \n
  85. \n
  86. \n
  87. \n
  88. \n
  89. \n
  90. \n
  91. \n
  92. \n
  93. \n
  94. \n
  95. \n
  96. \n
  97. \n
  98. \n
  99. \n
  100. \n