SlideShare a Scribd company logo
1 of 28
Download to read offline
DISQUS
                         Continuous Deployment Everything



                                    David Cramer
                                       @zeeg




Friday, April 29, 2011
Disclaimer: We don’t use Pylons




Friday, April 29, 2011
Continuous Deployment


           Shipping new code as soon
                  as it’s ready

                         (It’s really just super awesome buildbots)




Friday, April 29, 2011
Workflow




                  1. Developer commits code
                  2. CI server runs tests automatically
                         2.1.Build passes, code deploys
                         2.2.Build fails, block deploy
                  3. Developer tests feature on production




Friday, April 29, 2011
Pros                         Cons


                 •       Develop features         •   Culture Shock
                         incrementally            •   Stability depends on
                 •       Release frequently           test coverage
                 •       Less QA! (maybe)         •   Initial time
                                                      investment




                          We mostly just care about iteration and stability

Friday, April 29, 2011
Painless Development




Friday, April 29, 2011
Development



                  •      Production > Staging > CI > Dev
                         •   Automate testing of complicated
                             processes and architecture
                  •      Simple is arguably better than complete
                         •   Especially for local development
                  •      python setup.py {develop,test}
                  •      Use Puppet/Chef or build a simple
                         bootstrap.{py,sh}



Friday, April 29, 2011
Production            Staging
                         •    PostgreSQL   •   PostgreSQL
                         •    Memcache     •   Memcache
                         •    Redis        •   Redis
                         •    Solr         •   Solr
                         •    Apache       •   Apache
                         •    Nginx        •   Nginx
                         •    RabbitMQ     •   RabbitMQ


                             CI Server         Macbook

                         •    Memcache     •   PostgreSQL
                         •    PostgreSQL   •   Apache
                         •    Redis        •   Memcache
                         •    Solr         •   Redis
                         •    Apache       •   Solr
                         •    Nginx        •   Nginx
                         •    RabbitMQ     •   RabbitMQ


Friday, April 29, 2011
Bootstrapping Local



                  •      Simplify local setup
                         •   git clone dcramer@disqus:disqus.git
                         •   python setup.py develop
                         •   python manage.py runserver


                  •      Need to test dependancies?
                         •   virtualbox + vagrant up



Friday, April 29, 2011
“Under Construction”



                  •      Iterate quickly by hiding features
                  •      Early adopters are free QA



                         from gargoyle import gargoyle

                         def my_view(request):
                             if gargoyle.is_active('awesome', request):
                                 return 'new happy version :D'
                             else:
                                 return 'old sad version :('




Friday, April 29, 2011
Gargoyle

                         Deploy features to portions of a user base at a
                          time to ensure smooth, measurable releases




                          Being users of our product, we actively use
                         early versions of features before public release

Friday, April 29, 2011
Integration
                         (or as we like to call it)




Friday, April 29, 2011
Integration is Required




                         Deploy only when things wont break

Friday, April 29, 2011
Reporting is Critical




Friday, April 29, 2011
CI Requirements




                  ✓      Developers must know when they’ve
                         broken something
                         ✓   IRC, Email, IM
                  ✓      Support proper reporting
                         ✓   XUnit, Pylint, Coverage.py
                  ✓      Painless setup
                         ✓   apt-get install jenkins



Friday, April 29, 2011
Shortcomings


                  •      False positives lower awareness
                         •   Reporting isn't accurate
                         •   Services fail
                         •   Bad Tests
                  •      Not enough code coverage
                         •   Regressions on untested code
                  •      Test suite takes too long
                         •   Integration tests vs Unit tests


Friday, April 29, 2011
Fixing False Positives




                  •      Re-run tests several times on a failure
                  •      Report continually failing tests
                         •   Fix continually failing tests
                  •      Rely less on 3rd parties
                         •   Mock/Dingus




Friday, April 29, 2011
Maintaining Coverage




                  •      Raise awareness with reporting
                         •   Fail/alert when coverage drops on a build
                  •      Commit tests with code
                  •      Drive it into your culture




Friday, April 29, 2011
Speeding Up Tests




                  •      Write true unit tests
                         •   vs slower integration tests
                  •      Mock 3rd party APIs
                  •      Distributed and parallel testing
                         •   http://github.com/disqus/mule




Friday, April 29, 2011
Mule


                  •      Unstable (we’re working on it)
                  •      Mostly Django right now
                         •   Generic interfaces for unittest2
                  •      Works with multi-processing and Celery
                         •   More complex than normal Celery usage
                  •      Full XUnit integration
                  •      Simple workflow
                         •   mule test --runner="python manage.py
                             mule --worker $TEST"


Friday, April 29, 2011
Deploy (finally)




Friday, April 29, 2011
How DISQUS Does It




                  •      Incremental deploy with Fabric
                  •      Drop server from pool
                  •      Pull in requirements on each server
                         •   Isolated virtualenv’s built on each server
                  •      Push server back online




Friday, April 29, 2011
Challenges




                  •      PyPi works on server A, but not B
                  •      Scale, or lack of
                  •      CPU cost per server
                  •      Schema changes, data model changes
                  •      Backwards compatibility




Friday, April 29, 2011
PyPi is Down




                  •      http://github.com/disqus/chishop




Friday, April 29, 2011
Help, we have 100 servers!




                  •      Incremental (ours) vs Fanout
                  •      Push vs Pull
                         •   Twitter uses BitTorrent
                  •      Isolation vs Packaging (Complexity)




Friday, April 29, 2011
SQL Schema Changes
                  1. Add column (NULLable)
                  2. Add app code to fill column
                  3. Deploy
                  4. Backfill column
                  5. Add app code to read column
                  6. Deploy


                  Cached Data Changes

                  • Have a global version number
                  • Have a data model cache version
                    • maybe md5(cls.__dict__)?

Friday, April 29, 2011
DISQUS
                           Questions?




                           psst, we’re hiring
                          jobs@disqus.com

Friday, April 29, 2011
References




                  •      Mule (distributed test runner)
                         http://github.com/disqus/mule
                  •      Gargoyle (feature switches)
                         https://github.com/disqus/gargoyle
                  •      Jenkins CI
                         http://jenkins-ci.org/




                                                  code.disqus.com
Friday, April 29, 2011

More Related Content

What's hot

VA Smalltalk Update ESUG2014
VA Smalltalk Update ESUG2014VA Smalltalk Update ESUG2014
VA Smalltalk Update ESUG2014ESUG
 
Supersize your production pipe enjmin 2013 v1.1 hd
Supersize your production pipe    enjmin 2013 v1.1 hdSupersize your production pipe    enjmin 2013 v1.1 hd
Supersize your production pipe enjmin 2013 v1.1 hdslantsixgames
 
10 things you need to know to deliver a successful Alfresco project
10 things you need to know to deliver a successful Alfresco project10 things you need to know to deliver a successful Alfresco project
10 things you need to know to deliver a successful Alfresco projectSymphony Software Foundation
 
統合開発環境TOPPERS Builderのカスタマイズ法
統合開発環境TOPPERS Builderのカスタマイズ法統合開発環境TOPPERS Builderのカスタマイズ法
統合開発環境TOPPERS Builderのカスタマイズ法Masaki Muranaka
 
Continuous integration
Continuous integrationContinuous integration
Continuous integrationBasma Alkerm
 
PHP, Cloud And Microsoft Symfony Live 2010
PHP,  Cloud And  Microsoft    Symfony  Live 2010PHP,  Cloud And  Microsoft    Symfony  Live 2010
PHP, Cloud And Microsoft Symfony Live 2010guest5a7126
 
Build automation best practices
Build automation best practicesBuild automation best practices
Build automation best practicesCode Mastery
 
The Brave New World of Continuous Release - Baruch Sadogursky
The Brave New World of Continuous Release - Baruch SadogurskyThe Brave New World of Continuous Release - Baruch Sadogursky
The Brave New World of Continuous Release - Baruch Sadogurskyjaxconf
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Hannes Lowette
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUlrich Krause
 
Continuous delivery @åf consult
Continuous delivery @åf consultContinuous delivery @åf consult
Continuous delivery @åf consultTomas Riha
 
Spring Roo Add-On Development & Distribution
Spring Roo Add-On Development & DistributionSpring Roo Add-On Development & Distribution
Spring Roo Add-On Development & DistributionStefan Schmidt
 
(ATS3-DEV02) Scripting with .NET Assemblies in Symyx Notebook
(ATS3-DEV02) Scripting with .NET Assemblies in Symyx Notebook(ATS3-DEV02) Scripting with .NET Assemblies in Symyx Notebook
(ATS3-DEV02) Scripting with .NET Assemblies in Symyx NotebookBIOVIA
 
Continuous delivery with Codeship
Continuous delivery with CodeshipContinuous delivery with Codeship
Continuous delivery with CodeshipTetiana Chupryna
 
Dr. Strangelove, or how I learned to love plugin development
Dr. Strangelove, or how I learned to love plugin developmentDr. Strangelove, or how I learned to love plugin development
Dr. Strangelove, or how I learned to love plugin developmentUlrich Krause
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the BasicsUlrich Krause
 

What's hot (20)

Linux HA anno 2014
Linux HA anno 2014Linux HA anno 2014
Linux HA anno 2014
 
VA Smalltalk Update ESUG2014
VA Smalltalk Update ESUG2014VA Smalltalk Update ESUG2014
VA Smalltalk Update ESUG2014
 
Puppet camp amsterdam
Puppet camp amsterdamPuppet camp amsterdam
Puppet camp amsterdam
 
Supersize your production pipe enjmin 2013 v1.1 hd
Supersize your production pipe    enjmin 2013 v1.1 hdSupersize your production pipe    enjmin 2013 v1.1 hd
Supersize your production pipe enjmin 2013 v1.1 hd
 
10 things you need to know to deliver a successful Alfresco project
10 things you need to know to deliver a successful Alfresco project10 things you need to know to deliver a successful Alfresco project
10 things you need to know to deliver a successful Alfresco project
 
DevOps, beyond agile
DevOps, beyond agileDevOps, beyond agile
DevOps, beyond agile
 
統合開発環境TOPPERS Builderのカスタマイズ法
統合開発環境TOPPERS Builderのカスタマイズ法統合開発環境TOPPERS Builderのカスタマイズ法
統合開発環境TOPPERS Builderのカスタマイズ法
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Basic Selenium Training
Basic Selenium TrainingBasic Selenium Training
Basic Selenium Training
 
PHP, Cloud And Microsoft Symfony Live 2010
PHP,  Cloud And  Microsoft    Symfony  Live 2010PHP,  Cloud And  Microsoft    Symfony  Live 2010
PHP, Cloud And Microsoft Symfony Live 2010
 
Build automation best practices
Build automation best practicesBuild automation best practices
Build automation best practices
 
The Brave New World of Continuous Release - Baruch Sadogursky
The Brave New World of Continuous Release - Baruch SadogurskyThe Brave New World of Continuous Release - Baruch Sadogursky
The Brave New World of Continuous Release - Baruch Sadogursky
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
UKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basicsUKLUG 2012 - XPages, Beyond the basics
UKLUG 2012 - XPages, Beyond the basics
 
Continuous delivery @åf consult
Continuous delivery @åf consultContinuous delivery @åf consult
Continuous delivery @åf consult
 
Spring Roo Add-On Development & Distribution
Spring Roo Add-On Development & DistributionSpring Roo Add-On Development & Distribution
Spring Roo Add-On Development & Distribution
 
(ATS3-DEV02) Scripting with .NET Assemblies in Symyx Notebook
(ATS3-DEV02) Scripting with .NET Assemblies in Symyx Notebook(ATS3-DEV02) Scripting with .NET Assemblies in Symyx Notebook
(ATS3-DEV02) Scripting with .NET Assemblies in Symyx Notebook
 
Continuous delivery with Codeship
Continuous delivery with CodeshipContinuous delivery with Codeship
Continuous delivery with Codeship
 
Dr. Strangelove, or how I learned to love plugin development
Dr. Strangelove, or how I learned to love plugin developmentDr. Strangelove, or how I learned to love plugin development
Dr. Strangelove, or how I learned to love plugin development
 
XPages -Beyond the Basics
XPages -Beyond the BasicsXPages -Beyond the Basics
XPages -Beyond the Basics
 

Viewers also liked

Viewers also liked (20)

PyCon 2011 Scaling Disqus
PyCon 2011 Scaling DisqusPyCon 2011 Scaling Disqus
PyCon 2011 Scaling Disqus
 
2markit
2markit2markit
2markit
 
Camp1
Camp1Camp1
Camp1
 
Paragraphs and topic sentences
Paragraphs and topic sentencesParagraphs and topic sentences
Paragraphs and topic sentences
 
开始想你
开始想你开始想你
开始想你
 
幸福来不来
幸福来不来幸福来不来
幸福来不来
 
Grasas Y Lipidos1
Grasas Y Lipidos1Grasas Y Lipidos1
Grasas Y Lipidos1
 
Guia de blogger
Guia de bloggerGuia de blogger
Guia de blogger
 
Getting Started With School Net
Getting Started With School NetGetting Started With School Net
Getting Started With School Net
 
Lezing TNT
Lezing TNTLezing TNT
Lezing TNT
 
Drets d'examen
Drets d'examenDrets d'examen
Drets d'examen
 
Blog Ict2
Blog Ict2Blog Ict2
Blog Ict2
 
Click frog present2013-agecy2
Click frog present2013-agecy2Click frog present2013-agecy2
Click frog present2013-agecy2
 
MISIÓN INTERCULTURALIDAD - 1E-A
MISIÓN INTERCULTURALIDAD - 1E-AMISIÓN INTERCULTURALIDAD - 1E-A
MISIÓN INTERCULTURALIDAD - 1E-A
 
香港六合彩
香港六合彩香港六合彩
香港六合彩
 
Lecture 21
Lecture 21Lecture 21
Lecture 21
 
Ana Virtual Worlds
Ana Virtual WorldsAna Virtual Worlds
Ana Virtual Worlds
 
Niver Je - 26.10.07
Niver Je - 26.10.07Niver Je - 26.10.07
Niver Je - 26.10.07
 
CasóRio Tati - 23.06.07
CasóRio Tati - 23.06.07CasóRio Tati - 23.06.07
CasóRio Tati - 23.06.07
 
Javaday 2007: skype4java
Javaday 2007: skype4javaJavaday 2007: skype4java
Javaday 2007: skype4java
 

Similar to Continuous Deployment at Disqus (Pylons Minicon)

Pitfalls of Continuous Deployment
Pitfalls of Continuous DeploymentPitfalls of Continuous Deployment
Pitfalls of Continuous Deploymentzeeg
 
PHPUnit & Continuous Integration: An Introduction
PHPUnit & Continuous Integration: An IntroductionPHPUnit & Continuous Integration: An Introduction
PHPUnit & Continuous Integration: An Introductionalexmace
 
Are Your Tests Really Helping You?
Are Your Tests Really Helping You?Are Your Tests Really Helping You?
Are Your Tests Really Helping You?LB Denker
 
Test parallelization using Jenkins
Test parallelization using JenkinsTest parallelization using Jenkins
Test parallelization using JenkinsRogue Wave Software
 
Hadoop Summit 2013 : Continuous Integration on top of hadoop
Hadoop Summit 2013 : Continuous Integration on top of hadoopHadoop Summit 2013 : Continuous Integration on top of hadoop
Hadoop Summit 2013 : Continuous Integration on top of hadoopWisely chen
 
The Key Components of Adopting CI The OpenStack Way
The Key Components of Adopting CI The OpenStack WayThe Key Components of Adopting CI The OpenStack Way
The Key Components of Adopting CI The OpenStack WayiWeb (group INAP)
 
Running productioninstance 1-localcopy
Running productioninstance 1-localcopyRunning productioninstance 1-localcopy
Running productioninstance 1-localcopyCloudBees
 
How to stuff a 900 pound gorilla into a smartphone
How to stuff a 900 pound gorilla into a smartphoneHow to stuff a 900 pound gorilla into a smartphone
How to stuff a 900 pound gorilla into a smartphoneJoel Maher
 
Introduction To Continuous Integration
Introduction To Continuous IntegrationIntroduction To Continuous Integration
Introduction To Continuous IntegrationChristopher Read
 
Plone Testing Tools And Techniques
Plone Testing Tools And TechniquesPlone Testing Tools And Techniques
Plone Testing Tools And TechniquesJordan Baker
 
Continuous integration & deployment
Continuous integration & deploymentContinuous integration & deployment
Continuous integration & deploymentAlan Harper
 
Wordpress version control
Wordpress version controlWordpress version control
Wordpress version controlDavid Doolin
 
Deploying your SaaS stack OnPrem
Deploying your SaaS stack OnPremDeploying your SaaS stack OnPrem
Deploying your SaaS stack OnPremKris Buytaert
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using JenkinsCliffano Subagio
 
Generalization in Auto-Testing. How we put what we had into new Technological...
Generalization in Auto-Testing. How we put what we had into new Technological...Generalization in Auto-Testing. How we put what we had into new Technological...
Generalization in Auto-Testing. How we put what we had into new Technological...SQALab
 
Wilko Nienhaus - continuous delivery release the right thing, done right, at ...
Wilko Nienhaus - continuous delivery release the right thing, done right, at ...Wilko Nienhaus - continuous delivery release the right thing, done right, at ...
Wilko Nienhaus - continuous delivery release the right thing, done right, at ...DevConFu
 
Unified Deployment: Including the Mainframe in Enterprise DevOps
Unified Deployment: Including the Mainframe in Enterprise DevOpsUnified Deployment: Including the Mainframe in Enterprise DevOps
Unified Deployment: Including the Mainframe in Enterprise DevOpsXebiaLabs
 
Testing Plug-in Architectures
Testing Plug-in ArchitecturesTesting Plug-in Architectures
Testing Plug-in ArchitecturesArie van Deursen
 
Continuous delivery with Jenkins Enterprise and Deployit
Continuous delivery with Jenkins Enterprise and DeployitContinuous delivery with Jenkins Enterprise and Deployit
Continuous delivery with Jenkins Enterprise and DeployitXebiaLabs
 
Automated testing DrupalCamp in Asheville
Automated testing DrupalCamp in AshevilleAutomated testing DrupalCamp in Asheville
Automated testing DrupalCamp in AshevillePromet Source
 

Similar to Continuous Deployment at Disqus (Pylons Minicon) (20)

Pitfalls of Continuous Deployment
Pitfalls of Continuous DeploymentPitfalls of Continuous Deployment
Pitfalls of Continuous Deployment
 
PHPUnit & Continuous Integration: An Introduction
PHPUnit & Continuous Integration: An IntroductionPHPUnit & Continuous Integration: An Introduction
PHPUnit & Continuous Integration: An Introduction
 
Are Your Tests Really Helping You?
Are Your Tests Really Helping You?Are Your Tests Really Helping You?
Are Your Tests Really Helping You?
 
Test parallelization using Jenkins
Test parallelization using JenkinsTest parallelization using Jenkins
Test parallelization using Jenkins
 
Hadoop Summit 2013 : Continuous Integration on top of hadoop
Hadoop Summit 2013 : Continuous Integration on top of hadoopHadoop Summit 2013 : Continuous Integration on top of hadoop
Hadoop Summit 2013 : Continuous Integration on top of hadoop
 
The Key Components of Adopting CI The OpenStack Way
The Key Components of Adopting CI The OpenStack WayThe Key Components of Adopting CI The OpenStack Way
The Key Components of Adopting CI The OpenStack Way
 
Running productioninstance 1-localcopy
Running productioninstance 1-localcopyRunning productioninstance 1-localcopy
Running productioninstance 1-localcopy
 
How to stuff a 900 pound gorilla into a smartphone
How to stuff a 900 pound gorilla into a smartphoneHow to stuff a 900 pound gorilla into a smartphone
How to stuff a 900 pound gorilla into a smartphone
 
Introduction To Continuous Integration
Introduction To Continuous IntegrationIntroduction To Continuous Integration
Introduction To Continuous Integration
 
Plone Testing Tools And Techniques
Plone Testing Tools And TechniquesPlone Testing Tools And Techniques
Plone Testing Tools And Techniques
 
Continuous integration & deployment
Continuous integration & deploymentContinuous integration & deployment
Continuous integration & deployment
 
Wordpress version control
Wordpress version controlWordpress version control
Wordpress version control
 
Deploying your SaaS stack OnPrem
Deploying your SaaS stack OnPremDeploying your SaaS stack OnPrem
Deploying your SaaS stack OnPrem
 
Continuous Delivery Using Jenkins
Continuous Delivery Using JenkinsContinuous Delivery Using Jenkins
Continuous Delivery Using Jenkins
 
Generalization in Auto-Testing. How we put what we had into new Technological...
Generalization in Auto-Testing. How we put what we had into new Technological...Generalization in Auto-Testing. How we put what we had into new Technological...
Generalization in Auto-Testing. How we put what we had into new Technological...
 
Wilko Nienhaus - continuous delivery release the right thing, done right, at ...
Wilko Nienhaus - continuous delivery release the right thing, done right, at ...Wilko Nienhaus - continuous delivery release the right thing, done right, at ...
Wilko Nienhaus - continuous delivery release the right thing, done right, at ...
 
Unified Deployment: Including the Mainframe in Enterprise DevOps
Unified Deployment: Including the Mainframe in Enterprise DevOpsUnified Deployment: Including the Mainframe in Enterprise DevOps
Unified Deployment: Including the Mainframe in Enterprise DevOps
 
Testing Plug-in Architectures
Testing Plug-in ArchitecturesTesting Plug-in Architectures
Testing Plug-in Architectures
 
Continuous delivery with Jenkins Enterprise and Deployit
Continuous delivery with Jenkins Enterprise and DeployitContinuous delivery with Jenkins Enterprise and Deployit
Continuous delivery with Jenkins Enterprise and Deployit
 
Automated testing DrupalCamp in Asheville
Automated testing DrupalCamp in AshevilleAutomated testing DrupalCamp in Asheville
Automated testing DrupalCamp in Asheville
 

More from zeeg

Practicing Continuous Deployment
Practicing Continuous DeploymentPracticing Continuous Deployment
Practicing Continuous Deploymentzeeg
 
Tools for Development and Debugging in Python
Tools for Development and Debugging in PythonTools for Development and Debugging in Python
Tools for Development and Debugging in Pythonzeeg
 
Building Scalable Web Apps
Building Scalable Web AppsBuilding Scalable Web Apps
Building Scalable Web Appszeeg
 
Sentry (SF Python, Feb)
Sentry (SF Python, Feb)Sentry (SF Python, Feb)
Sentry (SF Python, Feb)zeeg
 
DjangoCon 2010 Scaling Disqus
DjangoCon 2010 Scaling DisqusDjangoCon 2010 Scaling Disqus
DjangoCon 2010 Scaling Disquszeeg
 
Db tips & tricks django meetup
Db tips & tricks django meetupDb tips & tricks django meetup
Db tips & tricks django meetupzeeg
 

More from zeeg (6)

Practicing Continuous Deployment
Practicing Continuous DeploymentPracticing Continuous Deployment
Practicing Continuous Deployment
 
Tools for Development and Debugging in Python
Tools for Development and Debugging in PythonTools for Development and Debugging in Python
Tools for Development and Debugging in Python
 
Building Scalable Web Apps
Building Scalable Web AppsBuilding Scalable Web Apps
Building Scalable Web Apps
 
Sentry (SF Python, Feb)
Sentry (SF Python, Feb)Sentry (SF Python, Feb)
Sentry (SF Python, Feb)
 
DjangoCon 2010 Scaling Disqus
DjangoCon 2010 Scaling DisqusDjangoCon 2010 Scaling Disqus
DjangoCon 2010 Scaling Disqus
 
Db tips & tricks django meetup
Db tips & tricks django meetupDb tips & tricks django meetup
Db tips & tricks django meetup
 

Recently uploaded

SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 

Recently uploaded (20)

SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 

Continuous Deployment at Disqus (Pylons Minicon)

  • 1. DISQUS Continuous Deployment Everything David Cramer @zeeg Friday, April 29, 2011
  • 2. Disclaimer: We don’t use Pylons Friday, April 29, 2011
  • 3. Continuous Deployment Shipping new code as soon as it’s ready (It’s really just super awesome buildbots) Friday, April 29, 2011
  • 4. Workflow 1. Developer commits code 2. CI server runs tests automatically 2.1.Build passes, code deploys 2.2.Build fails, block deploy 3. Developer tests feature on production Friday, April 29, 2011
  • 5. Pros Cons • Develop features • Culture Shock incrementally • Stability depends on • Release frequently test coverage • Less QA! (maybe) • Initial time investment We mostly just care about iteration and stability Friday, April 29, 2011
  • 7. Development • Production > Staging > CI > Dev • Automate testing of complicated processes and architecture • Simple is arguably better than complete • Especially for local development • python setup.py {develop,test} • Use Puppet/Chef or build a simple bootstrap.{py,sh} Friday, April 29, 2011
  • 8. Production Staging • PostgreSQL • PostgreSQL • Memcache • Memcache • Redis • Redis • Solr • Solr • Apache • Apache • Nginx • Nginx • RabbitMQ • RabbitMQ CI Server Macbook • Memcache • PostgreSQL • PostgreSQL • Apache • Redis • Memcache • Solr • Redis • Apache • Solr • Nginx • Nginx • RabbitMQ • RabbitMQ Friday, April 29, 2011
  • 9. Bootstrapping Local • Simplify local setup • git clone dcramer@disqus:disqus.git • python setup.py develop • python manage.py runserver • Need to test dependancies? • virtualbox + vagrant up Friday, April 29, 2011
  • 10. “Under Construction” • Iterate quickly by hiding features • Early adopters are free QA from gargoyle import gargoyle def my_view(request): if gargoyle.is_active('awesome', request): return 'new happy version :D' else: return 'old sad version :(' Friday, April 29, 2011
  • 11. Gargoyle Deploy features to portions of a user base at a time to ensure smooth, measurable releases Being users of our product, we actively use early versions of features before public release Friday, April 29, 2011
  • 12. Integration (or as we like to call it) Friday, April 29, 2011
  • 13. Integration is Required Deploy only when things wont break Friday, April 29, 2011
  • 15. CI Requirements ✓ Developers must know when they’ve broken something ✓ IRC, Email, IM ✓ Support proper reporting ✓ XUnit, Pylint, Coverage.py ✓ Painless setup ✓ apt-get install jenkins Friday, April 29, 2011
  • 16. Shortcomings • False positives lower awareness • Reporting isn't accurate • Services fail • Bad Tests • Not enough code coverage • Regressions on untested code • Test suite takes too long • Integration tests vs Unit tests Friday, April 29, 2011
  • 17. Fixing False Positives • Re-run tests several times on a failure • Report continually failing tests • Fix continually failing tests • Rely less on 3rd parties • Mock/Dingus Friday, April 29, 2011
  • 18. Maintaining Coverage • Raise awareness with reporting • Fail/alert when coverage drops on a build • Commit tests with code • Drive it into your culture Friday, April 29, 2011
  • 19. Speeding Up Tests • Write true unit tests • vs slower integration tests • Mock 3rd party APIs • Distributed and parallel testing • http://github.com/disqus/mule Friday, April 29, 2011
  • 20. Mule • Unstable (we’re working on it) • Mostly Django right now • Generic interfaces for unittest2 • Works with multi-processing and Celery • More complex than normal Celery usage • Full XUnit integration • Simple workflow • mule test --runner="python manage.py mule --worker $TEST" Friday, April 29, 2011
  • 22. How DISQUS Does It • Incremental deploy with Fabric • Drop server from pool • Pull in requirements on each server • Isolated virtualenv’s built on each server • Push server back online Friday, April 29, 2011
  • 23. Challenges • PyPi works on server A, but not B • Scale, or lack of • CPU cost per server • Schema changes, data model changes • Backwards compatibility Friday, April 29, 2011
  • 24. PyPi is Down • http://github.com/disqus/chishop Friday, April 29, 2011
  • 25. Help, we have 100 servers! • Incremental (ours) vs Fanout • Push vs Pull • Twitter uses BitTorrent • Isolation vs Packaging (Complexity) Friday, April 29, 2011
  • 26. SQL Schema Changes 1. Add column (NULLable) 2. Add app code to fill column 3. Deploy 4. Backfill column 5. Add app code to read column 6. Deploy Cached Data Changes • Have a global version number • Have a data model cache version • maybe md5(cls.__dict__)? Friday, April 29, 2011
  • 27. DISQUS Questions? psst, we’re hiring jobs@disqus.com Friday, April 29, 2011
  • 28. References • Mule (distributed test runner) http://github.com/disqus/mule • Gargoyle (feature switches) https://github.com/disqus/gargoyle • Jenkins CI http://jenkins-ci.org/ code.disqus.com Friday, April 29, 2011