How to Continuous Delivery

Disclaimer

No exp

Disclaimer

You know nothing

Git flow

  • complex
  • merge hell
  • maintainability cost
  • protected environment
  • QA before releases

Master only

  • simple
  • (almost) no conflicts
  • fit with microservices
  • base on automated tests
  • crazy? ;)

Master only

  • Commit often
  • PR for code review and/or WIP
  • Continuous Deployment to production

What could possibly go wrong?

Outage

Tips and tricks

Migrations

  • atomic changes
  • split full change across multiple migrations
  • adjust code across multiple commits

 

http://blog.arkency.com/2014/04/the-biggest-obstacle-to-start-with-continuous-deployment/

No Migrations

  • NoSQL
  • Easy to scale
  • Consider pros and cons

 

http://martinfowler.com/nosql.html

Complex features

When my team of three rebuilt GitHub Issues in 2014, we had shipped probably hundreds of tiny pull requests to production behind a feature flag that only we could see.

 

https://zachholman.com/posts/deploying-software

Zero Downtime

  • two servers running code
  • switch traffic to blue only
  • deploy to green
  • verify & repeat

 

http://martinfowler.com/bliki/BlueGreenDeployment.html

Staging

  • run tests on staging without mocks - copy of production environment with dummy data
  • automatically deploy to production

 

http://martinfowler.com/articles/continuousIntegration.html

Monitoring

  • track errors and deployments
  • alert when more errors after deployment
  • automatically revert when peak is too high
  • Continuous Delivery is battle tested
  • There are tools
  • There are patterns
  • There are books and articles

WDYT?

Made with Slides.com