SlideShare a Scribd company logo
Burn Down
 The Silos
  Lindsay Holmwood
DevOps
Case study
Applying with technology
High pro!le
fundraising website
Strong siloisation
Devs + Ops in di"erent companies
100% uptime
Burn down the silos! Helping dev and ops gel on high availability websites
3 Concepts
Consistency
Repeatability
Visibility
Burn down the silos! Helping dev and ops gel on high availability websites
Consistency
ensuring
 identical
behaviour
within an
environment
or across multiple
  environments
Burn down the silos! Helping dev and ops gel on high availability websites
con!guration
management
testing
Burn down the silos! Helping dev and ops gel on high availability websites
Puppet
   language
    library
 client/server
package { "apache2":
  ensure => installed
}

service { "apache2":
  enable => true,
  ensure => running
}
class apache2 {
    package { "apache2":
      ensure => installed
    }

    service { "apache2":
      enable => true,
      ensure => running
    }
}
Puppet work#ow
 write   apply   debug
class apache2 {
    package { "apache2":
      ensure => installed
    }

    service { "apache2":
      enable => true,
      ensure => running
    }
}
class apache2 {
    package { "apache2":
      ensure => installed
    }

    service { "apache2":
      enable => true,
      ensure => running,
      require => [ Package["apache2"] ]
    }
}
Complex manifests
Proprietary software
Lots of debugging
VMware snapshots
Burn down the silos! Helping dev and ops gel on high availability websites
Multiple
deploy environments
Con!guration drift
“roles”
define app_server($collectd_destination, $logging_destination) {
 server { $fqdn:
    logging_destination => $logging_destination
  }
  include apache2
  include mysql::client
  collectd::client { $fqdn:
    collection_destination => $collectd_destination
  }


    if $environment == "production" {
      include production::only::module
    }
}
node "app-01.stage.charity.com" {
  app_server { $fqdn:
    collectd_destination => "stats-01.stage.charity.com",
    logging_destination => "log-01.stage.charity.com"
  }
}

node "app-01.production.charity.com" {
  app_server { $fqdn:
    collectd_destination => "stats-01.production.charity.com",
    logging_destination => "log-01.production.charity.com"
  }
}
node /app-d+.stage.charity.com/ {
  app_server { $fqdn:
    collectd_destination => "stats-01.stage.charity.com",
    logging_destination => "log-01.stage.charity.com"
  }
}

node /app-d+.production.charity.com/ {
  app_server { $fqdn:
    collectd_destination => "stats-01.production.charity.com",
    logging_destination => "log-01.production.charity.com"
  }
}
30 minute builds
Consistency
Burn down the silos! Helping dev and ops gel on high availability websites
Repeatability
Function of
consistency
automate,
 to remove
human error
increase speed
 by shortening
feedback loops
Burn down the silos! Helping dev and ops gel on high availability websites
automated
deployments
con!guration
management
Burn down the silos! Helping dev and ops gel on high availability websites
Capistrano
Ruby DSL around
SSH-in-a-for-loop
Simple, powerful,
can blow your legs o"
Not a substitute for
  con!guration
  management
railsless-deploy
   http://bit.ly/i56ra9
Removes Rails-ism
Great for PHP
capistrano-multistage
     (part of capistrano-ext)
          http://bit.ly/i2moIp
# config/deploy.rb

set   :user, "deploy"
set   :application, "charity.com"
set   :keep_releases, 10
set   :deploy_to, "/srv/#{application}"

set :stages, %w(uat staging production)
# config/deploy/stage.rb

role :app,    "app-01.stage.charity.com",
              "app-02.stage.charity.com"
role :static, "static-01.stage.charity.com”
# config/deploy/production.rb

role :app,    "app-01.prod.charity.com",
              "app-02.prod.charity.com",
              "app-03.prod.charity.com"
role :static, "static-01.prod.charity.com”
cap staging deploy    # deploy to staging
# test
cap production deploy # deploy to production
Capistrano
bootstrap w/ Puppet
class capistrano::user {

    group { "deploy":
      gid => 499
    }

    user { "deploy":
      uid => 499,
      gid => 499,
      home => "/home/deploy",
      shell => "/bin/bash",
      require => Group["deploy"]
    }

    file { "/home/deploy/.ssh/authorized_keys":
      source => "puppet:///modules/capistrano/authorized_keys",
      mode   => 644,
      owner => "deploy",
      group => "deploy",
      require => [ User["deploy"] ]
    }

}
define capistrano::site {

  include capistrano::user

  file { "/srv/$name":
    ensure => directory,
    owner   => deploy,
    group   => deploy,
    require => [ User["deploy"] ]
  }

  file { "/srv/$name/releases":
    ensure => directory,
    owner   => deploy,
    group   => deploy,
    require => [ File["/srv/$name"] ]
  }

...
...

    file { "/srv/$name/shared/log":
      ensure => directory,
      owner => www-data,
      group => www-data,
    }

    file { "/etc/$name":
      source => "puppet:///modules/capistrano/etc/$name",
      recurse => true,
      mode    => "644",
      owner   => root,
      group   => root
    }

}
define app_server($collectd_destination, $logging_destination) {

    include apache2
    include mysql::client
    capistrano::site { “charity.com”: }

}
Deploying to a new
app server is as easy as:
# config/deploy/production.rb

role :app,    "app-01.prod.charity.com",
              "app-02.prod.charity.com",
              "app-03.prod.charity.com"
role :static, "static-01.prod.charity.com”
# config/deploy/production.rb

role :app,    "app-01.prod.charity.com",
              "app-02.prod.charity.com",
              "app-03.prod.charity.com",
              "app-04.prod.charity.com"
role :static, "static-01.prod.charity.com”
or...
# deploy/production.rb

role :app,    "app-01.prod.charity.com",
              "app-02.prod.charity.com",
              "app-03.prod.charity.com",
              "app-04.prod.charity.com"
role :static, "static-01.prod.charity.com”
# deploy/production.rb

role :app, *(1..4).map do |n|
  "app-%.2d.prod.charity.com" % n
end

role :static, "static-01.prod.charity.com”
Burn down the silos! Helping dev and ops gel on high availability websites
git-svn mirror
182MB * 20 == PAIN
remote_cache
bad with svn tags
git-svn + cron
fast clones
 commit access
21st century tech
Repeatability
Burn down the silos! Helping dev and ops gel on high availability websites
Visibility
one eye on the
     past
one eye on the
    future
Burn down the silos! Helping dev and ops gel on high availability websites
metric collection
code changes
monitoring
reports
Burn down the silos! Helping dev and ops gel on high availability websites
metric collection
collectd
lightweight
  statistics
 collection
  daemon
platform for
   collecting
time series data
plugin based
network aware
well de!ned APIs
curl_json
<Plugin curl_json>
 <URL "http://localhost:5984/_stats">
   Instance "httpd"
   <Key "httpd/requests/count">
     Type "http_requests"
   </Key>

    <Key "httpd_status_codes/*/count">
      Type "http_response_codes"
    </Key>
  </URL>
</Plugin>
/metrics
Burn down the silos! Helping dev and ops gel on high availability websites
code changes
application
       &

con!g management
Burn down the silos! Helping dev and ops gel on high availability websites
Your new best friend
monitoring
sudo mmm_control show                   # blocks under high IO
echo -en “shownquitn” | nc 127.1 9988 # instant
sudo mmm_control show                   # blocks under high IO
echo -en “shownquitn” | nc 127.1 9988 # instant



socket = ::TCPSocket.new("127.0.0.1", 9988)
socket.print("shownquitn")
output = socket.read.split("n")
hosts = output.map do |line|
  parts = line.scan(/nasty regex/).flatten

  { "hostname"            =>   parts[0],
    "address"             =>   parts[1],
    "mode"                =>   parts[2],
    "state"               =>   parts[3],
    "role"                =>   parts[5],
    "role_address"        =>   parts[6] }
end
Burn down the silos! Helping dev and ops gel on high availability websites
reports
mk-query-digest
      &

   logrotate
# prerotate

SLOWLOG_FILENAME="/var/log/mysql/mysql-slow.log"
OPTIONS="--report --group-by distill --order-by Query_time:max
--timeline --report-format query_report,profile"
DATE="$(date +%Y-%m-%dT%H:%M:%S%z)"
REPORT_FILENAME="/tmp/$(hostname)-mysql-slow-query-report-$DATE"
mk-query-digest $SLOWLOG_FILENAME $OPTIONS > $REPORT_FILENAME

SUBJECT="MySQL Slow Queries Report for $(hostname) as of $DATE"
RECIPIENTS="developers@charity.com,ops@bulletproof.net"
cat $REPORT_FILENAME | nail -n -E -s "$SUBJECT" "$RECIPIENTS"
Burn down the silos! Helping dev and ops gel on high availability websites
Retrospectives
Slave explosion
Background:
Background:
MySQL replication
Background:
MySQL replication
MMM
Background:
MySQL replication
MMM
2 masters + 4 slaves
REPLICATION_FAIL
     on one slave
Down to 3 nodes
Increased cluster load
REPLICATION_DELAY
     on another slave
Down to 2 nodes
Inspection
of REPLICATION_DELAY slave
Swapping like mad
Half the memory allocated
Shutdown,
 upgrade,
   boot
Visibility
metric collection
Consistency
Burn down the silos! Helping dev and ops gel on high availability websites
Database connectivity
Soft launch
PHP connection errors
Con!g parses + loads
Add con!g dump url
Visibility
curl_json
Redeploy
...
Typo
2 reviewers
of con!g management
both in ops team
Visibility
code changes
Your new best friend
reviewer diversity
devs should have visibility of ops changes
Burn down the silos! Helping dev and ops gel on high availability websites
Data consistency
New release
Database migrations
Release promotion
uat

  stage

production
uat !

  stage

production
uat !

  stage !

production
uat !

  stage !

production "
uat !

  stage !

production "
CREATE TABLE foo
           should have been


CREATE TABLE IF NOT EXIST foo
Consistency
uat

  stage

production
uat

  stage

production
uat

  stage

production
Repeatability
Burn down the silos! Helping dev and ops gel on high availability websites
Consistency
ensuring
 identical
behaviour
within an
environment
or across multiple
  environments
Repeatability
Function of
consistency
automate,
 to remove
human error
increase speed
 by shortening
feedback loops
Visibility
one eye on the
     past
one eye on the
    future
Communicate!
Thank you!
Credits:
http://www.#ickr.com/photos/48722974@N07/4682302824/     http://www.#ickr.com/photos/lyza/4144764381/
http://www.#ickr.com/photos/acediscovery/3030548744/     http://www.#ickr.com/photos/matchew/424026531/
http://www.#ickr.com/photos/andrew_wertheimer/5268407700/ http://www.#ickr.com/photos/mrwoodnz/4289893182/
http://www.#ickr.com/photos/azrasta/4528604334/          http://www.#ickr.com/photos/myprofe/4396178084/
http://www.#ickr.com/photos/boliston/2351083198/         http://www.#ickr.com/photos/nnova/4834954885/
http://www.#ickr.com/photos/brianwestcott/1497708345/    http://www.#ickr.com/photos/pjern/2150874047/
http://www.#ickr.com/photos/brunogirin/73014722/         http://www.#ickr.com/photos/rubodewig/5161937181/
http://www.#ickr.com/photos/eole/4500783172/             http://www.#ickr.com/photos/rutty/460520720/
http://www.#ickr.com/photos/jacockshaw/1811056252/       http://www.#ickr.com/photos/sarah_lincoln/4740037328/
http://www.#ickr.com/photos/jenny-pics/2719309611/       http://www.#ickr.com/photos/shindotv/3835365695/
http://www.#ickr.com/photos/ldsykora/2414497811/         http://www.#ickr.com/photos/thalamus/306881919/
http://www.#ickr.com/photos/listed_crime/1342164481/     http://www.#ickr.com/photos/traviscrawford/323366600/
http://www.#ickr.com/photos/localsurfer/369116556/       http://www.#ickr.com/photos/webtreatsetc/5303216304/

More Related Content

KEY
Phpne august-2012-symfony-components-friends
PDF
Ansible leveraging 2.0
PDF
Filling the flask
PPTX
Things Your Mother Didn't Tell You About Bundle Configurations - Symfony Live...
 
PPTX
Things Your Mother Didnt Tell You About Bundle Configurations - Symfony Live…
 
PDF
4069180 Caching Performance Lessons From Facebook
PDF
Refactoring terraform
PDF
PuppetCamp SEA 1 - Version Control with Puppet
Phpne august-2012-symfony-components-friends
Ansible leveraging 2.0
Filling the flask
Things Your Mother Didn't Tell You About Bundle Configurations - Symfony Live...
 
Things Your Mother Didnt Tell You About Bundle Configurations - Symfony Live…
 
4069180 Caching Performance Lessons From Facebook
Refactoring terraform
PuppetCamp SEA 1 - Version Control with Puppet

What's hot (20)

PPT
Play!ng with scala
PDF
Redis for your boss 2.0
PDF
Automated Java Deployments With Rpm
PPTX
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
PDF
Redis for your boss
PDF
Masterclass Advanced Usage of the AWS CLI
KEY
CodeIgniter 3.0
PDF
Terraform 0.9 + good practices
KEY
Chef 0.8, Knife and Amazon EC2
PDF
A Little Backbone For Your App
PPTX
REST with Eve and Python
PDF
FreeBSD: Dev to Prod
PDF
Getting Started with Ansible
PDF
Node js introduction
PDF
Observability with Consul Connect
PDF
Ansible inside
PDF
Advanced symfony Techniques
PDF
Forget the Web
PDF
Terraform Introduction
KEY
Api Design
Play!ng with scala
Redis for your boss 2.0
Automated Java Deployments With Rpm
Harmonious Development: Standardizing The Deployment Process via Vagrant and ...
Redis for your boss
Masterclass Advanced Usage of the AWS CLI
CodeIgniter 3.0
Terraform 0.9 + good practices
Chef 0.8, Knife and Amazon EC2
A Little Backbone For Your App
REST with Eve and Python
FreeBSD: Dev to Prod
Getting Started with Ansible
Node js introduction
Observability with Consul Connect
Ansible inside
Advanced symfony Techniques
Forget the Web
Terraform Introduction
Api Design
Ad

Viewers also liked (12)

PDF
Git for Subversion Users (phpDay 2011)
PPT
Controle de Versão GIT
PPTX
Ppt presentatie 20_mei
PPTX
Safe Ways to Teach about Transgression
PPTX
Leadership 2.0 FAPAC May 12, 2009
PPT
Cultureel Project Cultuurrestaurant
PPTX
TEDxBerlin: Net-work: Why the Future of Passionate Work Needs Your Relations...
PPTX
RememberTheName WebMonday Zürich
PDF
Data Governance - An Implementation Reality Check
PDF
Getting started with git svn
PDF
Effective Git
PDF
Using Subversion and Git Together
Git for Subversion Users (phpDay 2011)
Controle de Versão GIT
Ppt presentatie 20_mei
Safe Ways to Teach about Transgression
Leadership 2.0 FAPAC May 12, 2009
Cultureel Project Cultuurrestaurant
TEDxBerlin: Net-work: Why the Future of Passionate Work Needs Your Relations...
RememberTheName WebMonday Zürich
Data Governance - An Implementation Reality Check
Getting started with git svn
Effective Git
Using Subversion and Git Together
Ad

Similar to Burn down the silos! Helping dev and ops gel on high availability websites (20)

PDF
Test driven infrastructure development (2 - puppetconf 2013 edition)
PPTX
drupal ci cd concept cornel univercity.pptx
ODP
Automating MySQL operations with Puppet
PDF
Puppet for Sys Admins
PDF
Porting Rails Apps to High Availability Systems
PDF
One-Man Ops
KEY
Puppet
PDF
Microservices Without the Macrocost
PDF
Cloudops fundamentals management, tdd, test driven design, continuous integra...
PDF
Continuous Delivery: The Dirty Details
PDF
John adams talk cloudy
PDF
High Available Drupal
ODP
MNPHP Scalable Architecture 101 - Feb 3 2011
PDF
Rocket Fuelled Cucumbers
PDF
Hosting Ruby Web Apps
PDF
Deployment Tactics
KEY
Everything ruby
PDF
Sean schofield & Richard Lister, Spree Commerce_ Fearless deployment @ Open C...
PDF
Scalable, good, cheap
PPTX
Introduction to DevOps
Test driven infrastructure development (2 - puppetconf 2013 edition)
drupal ci cd concept cornel univercity.pptx
Automating MySQL operations with Puppet
Puppet for Sys Admins
Porting Rails Apps to High Availability Systems
One-Man Ops
Puppet
Microservices Without the Macrocost
Cloudops fundamentals management, tdd, test driven design, continuous integra...
Continuous Delivery: The Dirty Details
John adams talk cloudy
High Available Drupal
MNPHP Scalable Architecture 101 - Feb 3 2011
Rocket Fuelled Cucumbers
Hosting Ruby Web Apps
Deployment Tactics
Everything ruby
Sean schofield & Richard Lister, Spree Commerce_ Fearless deployment @ Open C...
Scalable, good, cheap
Introduction to DevOps

More from Lindsay Holmwood (12)

PDF
Escalating complexity: DevOps learnings from Air France 447
PDF
AA261: DevOps lessons in collaborative maintenance
PDF
Islands: Puppet at Bulletproof Networks
PDF
Load testing with Blitz
PDF
Latency: The Silent Monitoring System Killer
PDF
Rump - making Puppetmaster-less Puppet meaty
PDF
Behaviour driven infrastructure
PDF
Behaviour Driven Monitoring with cucumber-nagios
PDF
Flapjack: rethinking monitoring for the cloud
PDF
Monitoring web application behaviour with cucumber-nagios
PDF
Your own (little) gem: building an online business with Ruby
PDF
Deploying Merb
Escalating complexity: DevOps learnings from Air France 447
AA261: DevOps lessons in collaborative maintenance
Islands: Puppet at Bulletproof Networks
Load testing with Blitz
Latency: The Silent Monitoring System Killer
Rump - making Puppetmaster-less Puppet meaty
Behaviour driven infrastructure
Behaviour Driven Monitoring with cucumber-nagios
Flapjack: rethinking monitoring for the cloud
Monitoring web application behaviour with cucumber-nagios
Your own (little) gem: building an online business with Ruby
Deploying Merb

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
A Presentation on Artificial Intelligence
PPT
Teaching material agriculture food technology
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Empathic Computing: Creating Shared Understanding
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Approach and Philosophy of On baking technology
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Encapsulation_ Review paper, used for researhc scholars
Cloud computing and distributed systems.
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Per capita expenditure prediction using model stacking based on satellite ima...
NewMind AI Monthly Chronicles - July 2025
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
A Presentation on Artificial Intelligence
Teaching material agriculture food technology
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Empathic Computing: Creating Shared Understanding
“AI and Expert System Decision Support & Business Intelligence Systems”
The AUB Centre for AI in Media Proposal.docx
Approach and Philosophy of On baking technology
MYSQL Presentation for SQL database connectivity
Network Security Unit 5.pdf for BCA BBA.
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Big Data Technologies - Introduction.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Encapsulation_ Review paper, used for researhc scholars

Burn down the silos! Helping dev and ops gel on high availability websites