#nostaging - Software Circus - Amsterdam, 2-9-2016
-
Upload
pavel-chunyayev -
Category
Software
-
view
214 -
download
5
Transcript of #nostaging - Software Circus - Amsterdam, 2-9-2016
![Page 1: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/1.jpg)
@PavelChunyayev
#nostagingGet rid of the false feeling of safety that staging environment gives
by Pavel Chunyayev, 2-9-2016Amsterdam, Pakhuis West
Software Circus
![Page 2: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/2.jpg)
@PavelChunyayev
Inspiration for the talk• Dave Nolan - @davenolan• Edith Harbaugh - @edith_h • Myself :)
• https://speakerdeck.com/davenolan/number-nostaging• https://vimeo.com/channels/pipelineconf/162633462• http://blog.launchdarkly.com/staging-servers-are-dead-long-live-a-staging-server/• http://readwrite.com/2016/01/22/staging-servers/• http://
slideshare.net/PavelChunyayev/you-dont-need-dtap-backbase-implementation-amsterdam-17122015
![Page 3: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/3.jpg)
@PavelChunyayev
The need for Staging environment
![Page 4: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/4.jpg)
@PavelChunyayev
It all started with pushing code directly to productionBut it was painful, unstable, broke everyone’s work, created instability
![Page 5: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/5.jpg)
@PavelChunyayev
Environment before production to ensure quality
![Page 6: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/6.jpg)
@PavelChunyayev
Environment before production to ensure quality - Staging
![Page 7: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/7.jpg)
@PavelChunyayev
More environments mapped into functions
![Page 9: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/9.jpg)
@PavelChunyayev
Increase quality at the expense of timeFix must go through all the environmentsOr be pushed to production directly Data specific bugs are hard to reproduce before production
![Page 10: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/10.jpg)
@PavelChunyayev
WaterfallTest things before productionGate changed to productionAggregate changes to productionApprove delivery to production
![Page 11: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/11.jpg)
@PavelChunyayev
Waterfall deploymentsDeploy to production at 3 in the morning on SaturdayPrepare for weeks, execute for hoursIf something goes wrong, rollback
![Page 12: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/12.jpg)
@PavelChunyayev
Get some sleep in another life
![Page 13: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/13.jpg)
@PavelChunyayev
Main problem: long living environmentsConfiguration driftDirty environmentsTesting is complicated
![Page 14: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/14.jpg)
@PavelChunyayev
Immutable infrastructure to the rescue!1. Create environment just in time for the purpose2. Use it3. Dispose it when no longer needed
![Page 15: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/15.jpg)
@PavelChunyayev
Don’t give names to servers
![Page 17: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/17.jpg)
@PavelChunyayev
Immutable DTAP is not enough
![Page 18: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/18.jpg)
@PavelChunyayev
You can’t get clone of production3rd party integrations – should they be real or fake?Emails and notifications to usersInstance types and number
![Page 19: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/19.jpg)
@PavelChunyayev
You can’t get clone of production
No real usersFake data
![Page 20: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/20.jpg)
@PavelChunyayev
Testing on staging provides fake confidence
![Page 21: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/21.jpg)
@PavelChunyayev
Testing in production
![Page 22: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/22.jpg)
@PavelChunyayev
Testing in production???Isn’t it where everyone’s heading?What is needed to achieve this?
![Page 23: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/23.jpg)
@PavelChunyayev
New style deploymentsShort-lived immutable infrastructureZero downtime deploymentsGood monitoringPossibility to quickly rollbackContinuous Delivery
![Page 24: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/24.jpg)
@PavelChunyayev
Why would you need staging?Short-lived immutable infrastructureZero downtime deploymentsGood monitoringPossibility to quickly rollbackContinuous Delivery
![Page 25: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/25.jpg)
@PavelChunyayev
Approaches• Feature flags• API Versioning• Circuit breakers• Dark launches• Incremental changes for schema migrations• Branch by abstraction• Preference for backwards-compatible changes
![Page 26: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/26.jpg)
@PavelChunyayev
Why would you test on staging?You are testing synthetic scenariosThird of all the features are not required by usersThe rest are used differently than product manager expects
![Page 27: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/27.jpg)
@PavelChunyayev
Why would you test on staging?We need to move as fast as possible from developer’s laptop to production to evaluate if feature is really needed
![Page 28: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/28.jpg)
@PavelChunyayev
Perfomance testing on Staging?Not needed for every featureA lot of new features receive no load because users don’t need them
![Page 29: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/29.jpg)
@PavelChunyayev
Perfomance testingProvision ephemeral server to run some load testsBetter do a rolling release and test with a real load, and add synthetic load on top
![Page 30: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/30.jpg)
@PavelChunyayev
Staging microservices is painfulYou don’t have the systemYou have constantly changing system
![Page 31: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/31.jpg)
@PavelChunyayev
When to stage microservices?At night?Every hour?At every change?
![Page 32: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/32.jpg)
@PavelChunyayev
Why bother staging microservices?If deployments are independent Failures are identified quicklyAnd rollback are simple and automated
![Page 33: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/33.jpg)
@PavelChunyayev
#nostaging in two easy steps:
![Page 34: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/34.jpg)
@PavelChunyayev
Remove static DTAPAutomate environments provisioning and deploymentSo you can create any number of environments at any timeEstablish continuous delivery Heavily invest in automated testing Build quality in
![Page 35: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/35.jpg)
@PavelChunyayev
Destroy Staging environmentInvest in monitoring, failure detection and recoveryPush small incremental pieces to production
![Page 36: #nostaging - Software Circus - Amsterdam, 2-9-2016](https://reader036.fdocuments.us/reader036/viewer/2022062820/58a1e5761a28ab531e8b4d3f/html5/thumbnails/36.jpg)
@PavelChunyayev
Staging gives you a false sense of security that you don’t really have