SlideShare ist ein Scribd-Unternehmen logo
1 von 44
Downloaden Sie, um offline zu lesen
Deploying Software at
       Scale
      Kris Buytaert
      @krisbuytaert
Kris Buytaert
●   I used to be a Dev,
●   Then Became an Op
●   Chief Trolling Officer and Open Source
    Consultant @inuits.eu
●   Everything is an effing DNS Problem
●   Building Clouds since before the bookstore
●   Some books, some papers, some blogs
●   Evangelizing devops
Todays Goals
●   A reproducable way to deploy and upgrade
    software
●   Automatically
●   Fast
●   Consistent
What's this devops thing
       anyhow ?
What's the problem ?
The community of developers whose work you
see on the Web, who probably don’t know what
ADO or UML or JPA even stand for, deploy better
systems at less cost in less time at lower risk
than we see in the Enterprise. This is true even
when you factor in the greater flexibility and
velocity of startups.


Tim Bray , on his blog January 2010
The Old Days
●   “Put this Code Live, here's a tarball” NOW!
●   What dependencies ?
●   No machines available ?
●   What database ?
●   Security ?
●   High Availability ?
●   Scalability ?
●   My computer can't install this ?
devops
●   Culture
●   (Lean)
●   Automation
●   Measurement
●   Sharing
              Damon Edwards and John Willis
                                  Gene Kim
devops (<)> continuous delilvery
Nirvana
An “ecosystem” that supports continuous delivery, from
infrastructure, data and configuration management to
business.
Through automation of the build, deployment, and testing
process, and improved collaboration between developers,
testers, and operations, delivery teams can get changes
released in a matter of hours — sometimes even minutes–no
matter what the size of a project or the complexity of its code
base.
                            Continuous Delivery , Jez Humble
How many times a day ?
●   10 @ Flickr
●   Deployments used to be pain
●   Nobody dared to deploy a site
●   Practice makes perfect
●   Knowing you can vs constantly doing it
" Our job as engineers (and ops, dev-ops, QA,
support, everyone in the company actually) is to
enable the business goals. We strongly feel that
in order to do that you must have the ability to
deploy code quickly and safely. Even if the
business goals are to deploy strongly QA’d code
once a month at 3am (it’s not for us, we push all
the time), having a reliable and easy
deployment should be non-negotiable."
Etsy Blog upon releasing Deployinator

http://codeascraft.etsy.com/2010/05/20/quantum-of-deployment/
How do we get there ?
OS Baseline
●   Automated Deployments
●   Reproducable
●   Kickstart, FAI, Preseeding,
●   JeOS
Infrastructure as Code
●   Treat configuration automation as code
●   Development best practices
      •   Model your infrastructure
      •   Version your cookbooks / manifests
      •   Test your cookbooks/ manifests
      •   Dev/ test /uat / prod for your infra
●   Model your infrastructure
●   A working service = automated ( Application Code +
    Infrastructure Code + Security + Monitoring )
●   Think Puppet, Chef, Cfengine, Ansible , ....
Version Control
●   Git !
●   Version ALL the things:
    •   Source code Application
    •   Source code Infrastructure
    •   Builds
    •   Tests
    •   Pipelines
    •   Scripts
    •   Documentation
    •   Monitoring scripts
Continuous Integration
●   Builds

●   Nightly Builds

●   Builds with tests

●   Nightly Builds with tests

●   Frequent integration

●   Continuous Integration
Jenkins
●   Open Source Continuous Integration Server
●   A zillion plugins (400)




●   Have developers build stable and deployable
    code
●   Test Infra code
Jenkins Pipeline
What's in your Pipeline ?
A pipeline
●   Checkout code
●   Syntax
●   Style
●   Code Coverage
●   Tests
●   Build
●   More Tests
●   Package
App Requirements
●   Testable
●   Configuration isolated
●   Automated Deployments
●   “If my computer can't install it , the installer is
    borken”   Luke Kanies at Fosdem (2007)




●   Bulk provisioning of data
●   http://www.krisbuytaert.be/blog/how-i-my-java
Why ops like to package
●   Packages give you features

•Consistency, security, dependencies
●   Uniquely identify where files come from

•Package or cfg-mgmt
●   Source repo not always available

•Firewall / Cloud etc ..
●   Weird deployment locations , no easy access
●   Little overhead when you automate
●   CONFIG does not belong in a package
#packagingsucks
• Really ..

              ●   Missing upstream

              ●   Ancient upstream

              ●   Unneeded dependencies

              ●   Broken upstream

              ●   Distro Policies

●   “Maximum RPM” ?

●   Packaging is needed

              ●   Dependencies, tooling, repositories

●   Anger driven development
Not all packages are equal
#packaginlove
fpm
fpm -t rpm -s dir -n hornetq -v 2.2.5 hornetq
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.nNkVwh
+ umask 022
+ cd /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILD
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.yUd4MV
+ umask 022
+ cd /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILD
+ cd /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILD
+ tar -zxf /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/data.tar.gz
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.jkpqeA
+ umask 022
+ cd /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILD
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-strip
+ /usr/lib/rpm/brp-strip-static-archive
+ /usr/lib/rpm/brp-strip-comment-note
Processing files: hornetq-2.2.5-1.x86_64
Checking for unpackaged file(s): /usr/lib/rpm/check-files /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILD
Wrote: /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/SRPMS/hornetq-2.2.5-1.src.rpm
Wrote: /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/RPMS/x86_64/hornetq-2.2.5-1.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.z2UL3B
+ umask 022
+ cd /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILD
+ rm -rf /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILD
+ exit 0
Created /usr/local/hornetq-2.2.5.x86_64.rpm
fpm in action
●   https://github.com/Inuits/build-gems
●   Fork, pull
●   Jenkins pulls , builds , pushes to repo
●   (variants for Nagios Plugins / Jenkins Plugins
    available)
A pipeline
●   Checkout code     ●   Upload to Repo
●   Syntax
●   Style
●   Code Coverage
●   Tests
●   Build
●   More Tests
●   Package
Pulp
Pulp is a Python application for managing
software repositories and their associated
content, such as packages, errata, and
distributions. It can replicate software
repositories from a variety of supported sources,
such as http/https, file system, ISO, and RHN, to
a local on-site repository. It provides mechanisms
for systems to gain access to these repositories,
providing centralized software installation.
Pulp
●   Redhat Community
●   Redhat Emerging Technology
●   Part of Katello
Pulp
●   “manages” its own apache instance

●   Symlinks , no copies

●   Queues

•Syncing in the background

•No more screens ;)

●   Actions are not instantly

•e.g. Add / sync / delete

●   Hello mongodb :(

●   v1 vs v2

●   Only use repo functionality , cfgmgmt is in charge of packages
Repository Management
Version vs Latest
●   Version your repos ?
     ensure => latests
●   Latest your environments ?
●   Strict versioning in config ?
     ensure => '0.98.4'
A pipeline
●   Checkout code     ●   Upload to Repo
●   Syntax            ●   Deploy on Test
●   Style
●   Code Coverage
●   Tests
●   Build
●   More Tests
●   Package
The Marionette Collective
●   Distributed ssh ++
●   What version of ssh do I have installed on my
    servers ?
●   On what servers is XYZ running ?
●   Clean all my ssl certs ?
●   Restart apache on all servers with fact X
mc-package
mc-package -W /dev/ status jdk
 * [ ============================================================> ] 33 / 33

servicesdb01.dev.com             version = -absent
services.dev.google.com          version = jdk-1.6.0_13-fcs
drbdtest02.dev.google.com          version = -absent
services3.dev.google.com          version = jdk-1.6.0_20-fcs
um.dev.google.com               version = jdk-1.5.0_19-fcs
devtools03.uat.com              version = jdk-1.6.0_29-fcs
alexandria02.dev.google.com         version = -absent
weblink01.dev.com               version = -absent
wikitest.dev.google.com          version = jdk-1.6.0_24-fcs
payment.dev.google.com             version = jdk-1.5.0_17-fcs
tiff2pdf01.dev.com             version = -absent
devdoos.dev.com                version = jdk-1.6.0_30-fcs
wiki.dev.google.com             version = jdk-1.6.0_24-fcs
reporting01.dev.com             version = -absent
devtools01-dev.uat.com            version = jdk-1.6.0_23-fcs
devtools02.uat.com              version = jdk-1.6.0_29-fcs
drbdtest01.dev.google.com          version = -absent

---- package agent summary ----
        Nodes: 33/33
            Versions: 1 * 1.5.0_17-fcs, 1 * 1.5.0_19-fcs, 1 * 1.6.0_13-fcs, 1 * 1.6.0_20-fcs, 1 * 1.6.0_23-fcs, 2 * 1.6.0_24-fcs, 2 * 1.6.0
               Elapsed Time: 1.73 s
What to Trigger ?
●   Update Package
     •   Only updates package
●   Trigger Puppet Run
     •   Updates config + package
A pipeline
●   Checkout code     ●   Upload to Repo
●   Syntax            ●   Deploy on Test
●   Style             ●   More Tests
●   Code Coverage     ●   Promote
●   Tests             ●   Deploy on UAT
●   Build             ●   More Tests
●   More Tests        ●   Promote
●   Package           ●   Deploy on Prod
Done ?
●   Close the feedback loop,
●   Send metric on deployment


     echo "deployed.$package_name 1 `date +
     %s`" > /dev/tcp/<%= graphite_host %>/2003
Done ?


A Software project is not done until your last
enduser is in his grave !
But remember
      Everything is a Fscking DNS Problem
 No really, Everything is a Fscking DNS Problem
        If it's not a fucking DNS Problem ..
                     It's an arp problem
              If it's not an arp problem...
            It's a Full Filesystem Problem
               If your filesystem isn't full
            It's a Spanning Tree problem
      If it's not a spanning Tree problem...
                     It's a USB problem
                If it's not a USB Problem
             It might be an ntp problem
                If it's not an ntp problem
               It's a sharing IRQ Problem
          If it's not a sharing IRQ Problem
 But most often .. its a Freaking Dns Problem !
         Or someone playing tricks on you




                                                  Jan 2006
Contact
Kris Buytaert
Kris.Buytaert@inuits.be

Further Reading
@krisbuytaert
http://www.krisbuytaert.be/b
log/
http://www.inuits.be/




                               Inuits

                               Duboistraat 50
                               2060 Antwerpen
                               Belgium
                               891.514.231

                               +32 475 961221

Weitere ähnliche Inhalte

Was ist angesagt?

Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with DockerHanoiJUG
 
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWSAutomated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWSBamdad Dashtban
 
Hudson
HudsonHudson
Hudson8x8
 
Puppet at DemonWare - Ruaidhri Power - Puppetcamp Dublin '12
Puppet at DemonWare - Ruaidhri Power - Puppetcamp Dublin '12Puppet at DemonWare - Ruaidhri Power - Puppetcamp Dublin '12
Puppet at DemonWare - Ruaidhri Power - Puppetcamp Dublin '12Puppet
 
11 Tools for your Open Source devops stack
11 Tools for your Open Source devops stack 11 Tools for your Open Source devops stack
11 Tools for your Open Source devops stack Kris Buytaert
 
Workflow, container, and beyond
Workflow, container, and beyondWorkflow, container, and beyond
Workflow, container, and beyondKohsuke Kawaguchi
 
Cooking the Cake for Nuget packages
Cooking the Cake for Nuget packagesCooking the Cake for Nuget packages
Cooking the Cake for Nuget packagesSergey Dzyuban
 
Manage your Windows Infrastructure with Puppet Bolt - August 26 - 2020
Manage your Windows Infrastructure with Puppet Bolt - August 26 - 2020Manage your Windows Infrastructure with Puppet Bolt - August 26 - 2020
Manage your Windows Infrastructure with Puppet Bolt - August 26 - 2020Puppet
 
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins PipelinesAn Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins PipelinesSteffen Gebert
 
Hudson at FISL 2009
Hudson at FISL 2009Hudson at FISL 2009
Hudson at FISL 2009Arun Gupta
 
7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins UsersJules Pierre-Louis
 
Dev to Delivery with Puppet, Vagrant and AWS
Dev to Delivery with Puppet, Vagrant and AWSDev to Delivery with Puppet, Vagrant and AWS
Dev to Delivery with Puppet, Vagrant and AWSPuppet
 
Brujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalabilityBrujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalabilityDamien Coraboeuf
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationGiacomo Vacca
 
Tap into the power of slaves with Jenkins by Kohsuke Kawaguchi
Tap into the power of slaves with Jenkins by Kohsuke KawaguchiTap into the power of slaves with Jenkins by Kohsuke Kawaguchi
Tap into the power of slaves with Jenkins by Kohsuke KawaguchiZeroTurnaround
 
Building Jenkins Pipelines at Scale
Building Jenkins Pipelines at ScaleBuilding Jenkins Pipelines at Scale
Building Jenkins Pipelines at ScaleJulien Pivotto
 
Jenkins days workshop pipelines - Eric Long
Jenkins days workshop  pipelines - Eric LongJenkins days workshop  pipelines - Eric Long
Jenkins days workshop pipelines - Eric Longericlongtx
 
Ci For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or GalCi For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or GalChad Woolley
 
Drupal Deployment
Drupal DeploymentDrupal Deployment
Drupal Deploymentq0rban
 

Was ist angesagt? (20)

Improve your Java Environment with Docker
Improve your Java Environment with DockerImprove your Java Environment with Docker
Improve your Java Environment with Docker
 
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWSAutomated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
Automated Deployment Pipeline using Jenkins, Puppet, Mcollective and AWS
 
Hudson
HudsonHudson
Hudson
 
Puppet at DemonWare - Ruaidhri Power - Puppetcamp Dublin '12
Puppet at DemonWare - Ruaidhri Power - Puppetcamp Dublin '12Puppet at DemonWare - Ruaidhri Power - Puppetcamp Dublin '12
Puppet at DemonWare - Ruaidhri Power - Puppetcamp Dublin '12
 
Devops For Drupal
Devops  For DrupalDevops  For Drupal
Devops For Drupal
 
11 Tools for your Open Source devops stack
11 Tools for your Open Source devops stack 11 Tools for your Open Source devops stack
11 Tools for your Open Source devops stack
 
Workflow, container, and beyond
Workflow, container, and beyondWorkflow, container, and beyond
Workflow, container, and beyond
 
Cooking the Cake for Nuget packages
Cooking the Cake for Nuget packagesCooking the Cake for Nuget packages
Cooking the Cake for Nuget packages
 
Manage your Windows Infrastructure with Puppet Bolt - August 26 - 2020
Manage your Windows Infrastructure with Puppet Bolt - August 26 - 2020Manage your Windows Infrastructure with Puppet Bolt - August 26 - 2020
Manage your Windows Infrastructure with Puppet Bolt - August 26 - 2020
 
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins PipelinesAn Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
An Open-Source Chef Cookbook CI/CD Implementation Using Jenkins Pipelines
 
Hudson at FISL 2009
Hudson at FISL 2009Hudson at FISL 2009
Hudson at FISL 2009
 
7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users7 Habits of Highly Effective Jenkins Users
7 Habits of Highly Effective Jenkins Users
 
Dev to Delivery with Puppet, Vagrant and AWS
Dev to Delivery with Puppet, Vagrant and AWSDev to Delivery with Puppet, Vagrant and AWS
Dev to Delivery with Puppet, Vagrant and AWS
 
Brujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalabilityBrujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalability
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous Integration
 
Tap into the power of slaves with Jenkins by Kohsuke Kawaguchi
Tap into the power of slaves with Jenkins by Kohsuke KawaguchiTap into the power of slaves with Jenkins by Kohsuke Kawaguchi
Tap into the power of slaves with Jenkins by Kohsuke Kawaguchi
 
Building Jenkins Pipelines at Scale
Building Jenkins Pipelines at ScaleBuilding Jenkins Pipelines at Scale
Building Jenkins Pipelines at Scale
 
Jenkins days workshop pipelines - Eric Long
Jenkins days workshop  pipelines - Eric LongJenkins days workshop  pipelines - Eric Long
Jenkins days workshop pipelines - Eric Long
 
Ci For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or GalCi For The Web 2.0 Guy Or Gal
Ci For The Web 2.0 Guy Or Gal
 
Drupal Deployment
Drupal DeploymentDrupal Deployment
Drupal Deployment
 

Ähnlich wie Deploying software at Scale

Towards Continuous Deployment with Django
Towards Continuous Deployment with DjangoTowards Continuous Deployment with Django
Towards Continuous Deployment with DjangoRoger Barnes
 
Continuous integration for open source distros v 3.0
Continuous integration for open source distros v 3.0Continuous integration for open source distros v 3.0
Continuous integration for open source distros v 3.0Sriram Narayanan
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack SummitMiguel Zuniga
 
DCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production ParityDCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production ParityGeoff Harcourt
 
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...Richard Bullington-McGuire
 
Production Ready WordPress - WC Utrecht 2017
Production Ready WordPress  - WC Utrecht 2017Production Ready WordPress  - WC Utrecht 2017
Production Ready WordPress - WC Utrecht 2017Edmund Turbin
 
Production Ready WordPress #WPLDN
Production Ready WordPress #WPLDNProduction Ready WordPress #WPLDN
Production Ready WordPress #WPLDNEdmund Turbin
 
Smarter deployments with octopus deploy
Smarter deployments with octopus deploySmarter deployments with octopus deploy
Smarter deployments with octopus deployThibaud Gravrand
 
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...NETWAYS
 
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08Борис Зора
 
Pipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as CodePipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as CodeKris Buytaert
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsGR8Conf
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-wayRobert Lujo
 
Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?AFUP_Limoges
 
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios
 
Software Delivery in 2016 - A Continuous Delivery Approach
Software Delivery in 2016 - A Continuous Delivery ApproachSoftware Delivery in 2016 - A Continuous Delivery Approach
Software Delivery in 2016 - A Continuous Delivery ApproachGiovanni Toraldo
 
Production ready word press
Production ready word pressProduction ready word press
Production ready word pressEdmund Turbin
 
How bigtop leveraged docker for build automation and one click hadoop provis...
How bigtop leveraged docker for build automation and  one click hadoop provis...How bigtop leveraged docker for build automation and  one click hadoop provis...
How bigtop leveraged docker for build automation and one click hadoop provis...Evans Ye
 

Ähnlich wie Deploying software at Scale (20)

Towards Continuous Deployment with Django
Towards Continuous Deployment with DjangoTowards Continuous Deployment with Django
Towards Continuous Deployment with Django
 
Continuous integration for open source distros v 3.0
Continuous integration for open source distros v 3.0Continuous integration for open source distros v 3.0
Continuous integration for open source distros v 3.0
 
Fluo CICD OpenStack Summit
Fluo CICD OpenStack SummitFluo CICD OpenStack Summit
Fluo CICD OpenStack Summit
 
DCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production ParityDCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production Parity
 
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
Extensible dev secops pipelines with Jenkins, Docker, Terraform, and a kitche...
 
Production Ready WordPress - WC Utrecht 2017
Production Ready WordPress  - WC Utrecht 2017Production Ready WordPress  - WC Utrecht 2017
Production Ready WordPress - WC Utrecht 2017
 
Production Ready WordPress #WPLDN
Production Ready WordPress #WPLDNProduction Ready WordPress #WPLDN
Production Ready WordPress #WPLDN
 
Smarter deployments with octopus deploy
Smarter deployments with octopus deploySmarter deployments with octopus deploy
Smarter deployments with octopus deploy
 
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
OSDC 2016 - Continous Integration in Data Centers - Further 3 Years later by ...
 
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08
Continuous Delivery with Jenkins declarative pipeline XPDays-2018-12-08
 
Pipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as CodePipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as Code
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails Projects
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
 
Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?Comment améliorer le quotidien des Développeurs PHP ?
Comment améliorer le quotidien des Développeurs PHP ?
 
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
 
Software Delivery in 2016 - A Continuous Delivery Approach
Software Delivery in 2016 - A Continuous Delivery ApproachSoftware Delivery in 2016 - A Continuous Delivery Approach
Software Delivery in 2016 - A Continuous Delivery Approach
 
Production ready word press
Production ready word pressProduction ready word press
Production ready word press
 
Evolution of deploy.sh
Evolution of deploy.shEvolution of deploy.sh
Evolution of deploy.sh
 
Devops
DevopsDevops
Devops
 
How bigtop leveraged docker for build automation and one click hadoop provis...
How bigtop leveraged docker for build automation and  one click hadoop provis...How bigtop leveraged docker for build automation and  one click hadoop provis...
How bigtop leveraged docker for build automation and one click hadoop provis...
 

Mehr von Kris Buytaert

Years of (not) learning , from devops to devoops
Years of (not) learning , from devops to devoopsYears of (not) learning , from devops to devoops
Years of (not) learning , from devops to devoopsKris Buytaert
 
Observability will not fix your Broken Monitoring ,Ignite
Observability will not fix your Broken Monitoring ,IgniteObservability will not fix your Broken Monitoring ,Ignite
Observability will not fix your Broken Monitoring ,IgniteKris Buytaert
 
Infrastructure as Code Patterns
Infrastructure as Code PatternsInfrastructure as Code Patterns
Infrastructure as Code PatternsKris Buytaert
 
From devoops to devops 13 years of (not) learning
From devoops to devops 13 years of (not) learningFrom devoops to devops 13 years of (not) learning
From devoops to devops 13 years of (not) learningKris Buytaert
 
Pipeline all the Dashboards as Code
Pipeline all the Dashboards as CodePipeline all the Dashboards as Code
Pipeline all the Dashboards as CodeKris Buytaert
 
Help , My Datacenter is on fire
Help , My Datacenter is on fireHelp , My Datacenter is on fire
Help , My Datacenter is on fireKris Buytaert
 
Devops is Dead, Long live Devops
Devops is Dead, Long live DevopsDevops is Dead, Long live Devops
Devops is Dead, Long live DevopsKris Buytaert
 
10 years of #devopsdays, but what have we really learned ?
10 years of #devopsdays, but what have we really learned ? 10 years of #devopsdays, but what have we really learned ?
10 years of #devopsdays, but what have we really learned ? Kris Buytaert
 
Continuous Infrastructure First
Continuous Infrastructure FirstContinuous Infrastructure First
Continuous Infrastructure FirstKris Buytaert
 
Is there a Future for devops ?
Is there a Future for devops   ? Is there a Future for devops   ?
Is there a Future for devops ? Kris Buytaert
 
10 Years of #devopsdays weirdness
10 Years of #devopsdays weirdness10 Years of #devopsdays weirdness
10 Years of #devopsdays weirdnessKris Buytaert
 
ADDO 2019: Looking back at over 10 years of Devops
ADDO 2019:    Looking back at over 10 years of DevopsADDO 2019:    Looking back at over 10 years of Devops
ADDO 2019: Looking back at over 10 years of DevopsKris Buytaert
 
Can we fix dev-oops ?
Can we fix dev-oops ?Can we fix dev-oops ?
Can we fix dev-oops ?Kris Buytaert
 
Continuous Infrastructure First Ignite Edition
Continuous Infrastructure First  Ignite EditionContinuous Infrastructure First  Ignite Edition
Continuous Infrastructure First Ignite EditionKris Buytaert
 
Continuous Infrastructure First
Continuous Infrastructure FirstContinuous Infrastructure First
Continuous Infrastructure FirstKris Buytaert
 
Open Source Monitoring in 2019
Open Source Monitoring in 2019 Open Source Monitoring in 2019
Open Source Monitoring in 2019 Kris Buytaert
 
Migrating to Puppet 5
Migrating to Puppet 5Migrating to Puppet 5
Migrating to Puppet 5Kris Buytaert
 
Repositories as Code
Repositories as CodeRepositories as Code
Repositories as CodeKris Buytaert
 
Devops is a Security Requirement
Devops is a Security RequirementDevops is a Security Requirement
Devops is a Security RequirementKris Buytaert
 

Mehr von Kris Buytaert (20)

Years of (not) learning , from devops to devoops
Years of (not) learning , from devops to devoopsYears of (not) learning , from devops to devoops
Years of (not) learning , from devops to devoops
 
Observability will not fix your Broken Monitoring ,Ignite
Observability will not fix your Broken Monitoring ,IgniteObservability will not fix your Broken Monitoring ,Ignite
Observability will not fix your Broken Monitoring ,Ignite
 
Infrastructure as Code Patterns
Infrastructure as Code PatternsInfrastructure as Code Patterns
Infrastructure as Code Patterns
 
From devoops to devops 13 years of (not) learning
From devoops to devops 13 years of (not) learningFrom devoops to devops 13 years of (not) learning
From devoops to devops 13 years of (not) learning
 
Pipeline all the Dashboards as Code
Pipeline all the Dashboards as CodePipeline all the Dashboards as Code
Pipeline all the Dashboards as Code
 
Help , My Datacenter is on fire
Help , My Datacenter is on fireHelp , My Datacenter is on fire
Help , My Datacenter is on fire
 
GitOps , done Right
GitOps , done RightGitOps , done Right
GitOps , done Right
 
Devops is Dead, Long live Devops
Devops is Dead, Long live DevopsDevops is Dead, Long live Devops
Devops is Dead, Long live Devops
 
10 years of #devopsdays, but what have we really learned ?
10 years of #devopsdays, but what have we really learned ? 10 years of #devopsdays, but what have we really learned ?
10 years of #devopsdays, but what have we really learned ?
 
Continuous Infrastructure First
Continuous Infrastructure FirstContinuous Infrastructure First
Continuous Infrastructure First
 
Is there a Future for devops ?
Is there a Future for devops   ? Is there a Future for devops   ?
Is there a Future for devops ?
 
10 Years of #devopsdays weirdness
10 Years of #devopsdays weirdness10 Years of #devopsdays weirdness
10 Years of #devopsdays weirdness
 
ADDO 2019: Looking back at over 10 years of Devops
ADDO 2019:    Looking back at over 10 years of DevopsADDO 2019:    Looking back at over 10 years of Devops
ADDO 2019: Looking back at over 10 years of Devops
 
Can we fix dev-oops ?
Can we fix dev-oops ?Can we fix dev-oops ?
Can we fix dev-oops ?
 
Continuous Infrastructure First Ignite Edition
Continuous Infrastructure First  Ignite EditionContinuous Infrastructure First  Ignite Edition
Continuous Infrastructure First Ignite Edition
 
Continuous Infrastructure First
Continuous Infrastructure FirstContinuous Infrastructure First
Continuous Infrastructure First
 
Open Source Monitoring in 2019
Open Source Monitoring in 2019 Open Source Monitoring in 2019
Open Source Monitoring in 2019
 
Migrating to Puppet 5
Migrating to Puppet 5Migrating to Puppet 5
Migrating to Puppet 5
 
Repositories as Code
Repositories as CodeRepositories as Code
Repositories as Code
 
Devops is a Security Requirement
Devops is a Security RequirementDevops is a Security Requirement
Devops is a Security Requirement
 

Deploying software at Scale

  • 1. Deploying Software at Scale Kris Buytaert @krisbuytaert
  • 2. Kris Buytaert ● I used to be a Dev, ● Then Became an Op ● Chief Trolling Officer and Open Source Consultant @inuits.eu ● Everything is an effing DNS Problem ● Building Clouds since before the bookstore ● Some books, some papers, some blogs ● Evangelizing devops
  • 3. Todays Goals ● A reproducable way to deploy and upgrade software ● Automatically ● Fast ● Consistent
  • 4. What's this devops thing anyhow ?
  • 5. What's the problem ? The community of developers whose work you see on the Web, who probably don’t know what ADO or UML or JPA even stand for, deploy better systems at less cost in less time at lower risk than we see in the Enterprise. This is true even when you factor in the greater flexibility and velocity of startups. Tim Bray , on his blog January 2010
  • 6. The Old Days ● “Put this Code Live, here's a tarball” NOW! ● What dependencies ? ● No machines available ? ● What database ? ● Security ? ● High Availability ? ● Scalability ? ● My computer can't install this ?
  • 7. devops ● Culture ● (Lean) ● Automation ● Measurement ● Sharing Damon Edwards and John Willis Gene Kim
  • 9. Nirvana An “ecosystem” that supports continuous delivery, from infrastructure, data and configuration management to business. Through automation of the build, deployment, and testing process, and improved collaboration between developers, testers, and operations, delivery teams can get changes released in a matter of hours — sometimes even minutes–no matter what the size of a project or the complexity of its code base. Continuous Delivery , Jez Humble
  • 10.
  • 11. How many times a day ? ● 10 @ Flickr ● Deployments used to be pain ● Nobody dared to deploy a site ● Practice makes perfect ● Knowing you can vs constantly doing it
  • 12. " Our job as engineers (and ops, dev-ops, QA, support, everyone in the company actually) is to enable the business goals. We strongly feel that in order to do that you must have the ability to deploy code quickly and safely. Even if the business goals are to deploy strongly QA’d code once a month at 3am (it’s not for us, we push all the time), having a reliable and easy deployment should be non-negotiable." Etsy Blog upon releasing Deployinator http://codeascraft.etsy.com/2010/05/20/quantum-of-deployment/
  • 13. How do we get there ?
  • 14. OS Baseline ● Automated Deployments ● Reproducable ● Kickstart, FAI, Preseeding, ● JeOS
  • 15. Infrastructure as Code ● Treat configuration automation as code ● Development best practices • Model your infrastructure • Version your cookbooks / manifests • Test your cookbooks/ manifests • Dev/ test /uat / prod for your infra ● Model your infrastructure ● A working service = automated ( Application Code + Infrastructure Code + Security + Monitoring ) ● Think Puppet, Chef, Cfengine, Ansible , ....
  • 16. Version Control ● Git ! ● Version ALL the things: • Source code Application • Source code Infrastructure • Builds • Tests • Pipelines • Scripts • Documentation • Monitoring scripts
  • 17. Continuous Integration ● Builds ● Nightly Builds ● Builds with tests ● Nightly Builds with tests ● Frequent integration ● Continuous Integration
  • 18. Jenkins ● Open Source Continuous Integration Server ● A zillion plugins (400) ● Have developers build stable and deployable code ● Test Infra code
  • 20. What's in your Pipeline ?
  • 21. A pipeline ● Checkout code ● Syntax ● Style ● Code Coverage ● Tests ● Build ● More Tests ● Package
  • 22. App Requirements ● Testable ● Configuration isolated ● Automated Deployments ● “If my computer can't install it , the installer is borken” Luke Kanies at Fosdem (2007) ● Bulk provisioning of data ● http://www.krisbuytaert.be/blog/how-i-my-java
  • 23. Why ops like to package ● Packages give you features •Consistency, security, dependencies ● Uniquely identify where files come from •Package or cfg-mgmt ● Source repo not always available •Firewall / Cloud etc .. ● Weird deployment locations , no easy access ● Little overhead when you automate ● CONFIG does not belong in a package
  • 24. #packagingsucks • Really .. ● Missing upstream ● Ancient upstream ● Unneeded dependencies ● Broken upstream ● Distro Policies ● “Maximum RPM” ? ● Packaging is needed ● Dependencies, tooling, repositories ● Anger driven development
  • 25. Not all packages are equal
  • 27. fpm fpm -t rpm -s dir -n hornetq -v 2.2.5 hornetq Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.nNkVwh + umask 022 + cd /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILD + exit 0 Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.yUd4MV + umask 022 + cd /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILD + cd /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILD + tar -zxf /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/data.tar.gz + exit 0 Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.jkpqeA + umask 022 + cd /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILD + /usr/lib/rpm/brp-compress + /usr/lib/rpm/brp-strip + /usr/lib/rpm/brp-strip-static-archive + /usr/lib/rpm/brp-strip-comment-note Processing files: hornetq-2.2.5-1.x86_64 Checking for unpackaged file(s): /usr/lib/rpm/check-files /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILD Wrote: /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/SRPMS/hornetq-2.2.5-1.src.rpm Wrote: /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/RPMS/x86_64/hornetq-2.2.5-1.x86_64.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.z2UL3B + umask 022 + cd /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILD + rm -rf /usr/local/build-rpm-hornetq-2.2.5.x86_64.rpm/BUILD + exit 0 Created /usr/local/hornetq-2.2.5.x86_64.rpm
  • 28. fpm in action ● https://github.com/Inuits/build-gems ● Fork, pull ● Jenkins pulls , builds , pushes to repo ● (variants for Nagios Plugins / Jenkins Plugins available)
  • 29. A pipeline ● Checkout code ● Upload to Repo ● Syntax ● Style ● Code Coverage ● Tests ● Build ● More Tests ● Package
  • 30. Pulp Pulp is a Python application for managing software repositories and their associated content, such as packages, errata, and distributions. It can replicate software repositories from a variety of supported sources, such as http/https, file system, ISO, and RHN, to a local on-site repository. It provides mechanisms for systems to gain access to these repositories, providing centralized software installation.
  • 31. Pulp ● Redhat Community ● Redhat Emerging Technology ● Part of Katello
  • 32.
  • 33. Pulp ● “manages” its own apache instance ● Symlinks , no copies ● Queues •Syncing in the background •No more screens ;) ● Actions are not instantly •e.g. Add / sync / delete ● Hello mongodb :( ● v1 vs v2 ● Only use repo functionality , cfgmgmt is in charge of packages
  • 35. Version vs Latest ● Version your repos ? ensure => latests ● Latest your environments ? ● Strict versioning in config ? ensure => '0.98.4'
  • 36. A pipeline ● Checkout code ● Upload to Repo ● Syntax ● Deploy on Test ● Style ● Code Coverage ● Tests ● Build ● More Tests ● Package
  • 37. The Marionette Collective ● Distributed ssh ++ ● What version of ssh do I have installed on my servers ? ● On what servers is XYZ running ? ● Clean all my ssl certs ? ● Restart apache on all servers with fact X
  • 38. mc-package mc-package -W /dev/ status jdk * [ ============================================================> ] 33 / 33 servicesdb01.dev.com version = -absent services.dev.google.com version = jdk-1.6.0_13-fcs drbdtest02.dev.google.com version = -absent services3.dev.google.com version = jdk-1.6.0_20-fcs um.dev.google.com version = jdk-1.5.0_19-fcs devtools03.uat.com version = jdk-1.6.0_29-fcs alexandria02.dev.google.com version = -absent weblink01.dev.com version = -absent wikitest.dev.google.com version = jdk-1.6.0_24-fcs payment.dev.google.com version = jdk-1.5.0_17-fcs tiff2pdf01.dev.com version = -absent devdoos.dev.com version = jdk-1.6.0_30-fcs wiki.dev.google.com version = jdk-1.6.0_24-fcs reporting01.dev.com version = -absent devtools01-dev.uat.com version = jdk-1.6.0_23-fcs devtools02.uat.com version = jdk-1.6.0_29-fcs drbdtest01.dev.google.com version = -absent ---- package agent summary ---- Nodes: 33/33 Versions: 1 * 1.5.0_17-fcs, 1 * 1.5.0_19-fcs, 1 * 1.6.0_13-fcs, 1 * 1.6.0_20-fcs, 1 * 1.6.0_23-fcs, 2 * 1.6.0_24-fcs, 2 * 1.6.0 Elapsed Time: 1.73 s
  • 39. What to Trigger ? ● Update Package • Only updates package ● Trigger Puppet Run • Updates config + package
  • 40. A pipeline ● Checkout code ● Upload to Repo ● Syntax ● Deploy on Test ● Style ● More Tests ● Code Coverage ● Promote ● Tests ● Deploy on UAT ● Build ● More Tests ● More Tests ● Promote ● Package ● Deploy on Prod
  • 41. Done ? ● Close the feedback loop, ● Send metric on deployment echo "deployed.$package_name 1 `date + %s`" > /dev/tcp/<%= graphite_host %>/2003
  • 42. Done ? A Software project is not done until your last enduser is in his grave !
  • 43. But remember Everything is a Fscking DNS Problem No really, Everything is a Fscking DNS Problem If it's not a fucking DNS Problem .. It's an arp problem If it's not an arp problem... It's a Full Filesystem Problem If your filesystem isn't full It's a Spanning Tree problem If it's not a spanning Tree problem... It's a USB problem If it's not a USB Problem It might be an ntp problem If it's not an ntp problem It's a sharing IRQ Problem If it's not a sharing IRQ Problem But most often .. its a Freaking Dns Problem ! Or someone playing tricks on you Jan 2006