Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Delivering changes for databases and applications

Delivering changes for databases and applications

Talk presented @ NetPonto (04-11-2017)

7b47fb5bb7f32e0ffdbd7bba5598ba98?s=128

Eduardo Piairo

November 04, 2017
Tweet

Transcript

  1. DELIVERING CHANGES FOR DATABASES AND APPLICATIONS Eduardo Piairo @EdPiairo #NetPonto

  2. ABOUT ME Deployment pipeline for databases @EdPiairo, #NetPonto @EdPiairo https://pt.linkedin.com/in/jesuspiairo

    eduardopiairo@gmail.com http://www.eduardopiairo.com/ Eduardo Piairo Friend of Redgate Operations Engineer DevOps Porto Founder
  3. AGENDA • Deployment pipeline • Database challenges • Deployment pipeline

    stages • Deployment pipeline scenarios • Final thoughts Delivering changes for databases and applications @EdPiairo, #NetPonto
  4. DEPLOYMENT PIPELINE Delivering changes for databases and applications Source Control

    Continuous Integration Continuous Delivery Database + Application @EdPiairo, #NetPonto
  5. WHAT’S SO SPECIAL ABOUT DATABASES? Delivering changes for databases and

    applications @EdPiairo, #NetPonto
  6. DATABASE CHALLENGES Delivering changes for databases and applications • Database

    and application changes (most of the time) are handled differently • Database is not included in the pipeline (manual work) • Different deployment pipeline • Synchronization needed @EdPiairo, #NetPonto
  7. DATABASE CHALLENGES Delivering changes for databases and applications • Manual

    work … • Lack of traceability of database changes (changes history) • It’s the most expensive and risky work type • Prevent CI and CD utilization in their full extent • Promote the fear of changes @EdPiairo, #WinOps
  8. THE PROBLEM TO FIX Delivering changes for databases and applications

    Databases become a bottleneck in an agile delivery process @EdPiairo, #NetPonto
  9. AUTOMATION Delivering changes for databases and applications @EdPiairo, #NetPonto

  10. THE VALUE OF AUTOMATION Delivering changes for databases and applications

    • Enable control over database development • Increase speed of response to change • Greater reliability of the release process • Remove/reduce human intervention in the release process From (Re)Learn and forget it to Improve and forget it @EdPiairo, #NetPonto
  11. THE VALUE OF AUTOMATION Delivering changes for databases and applications

    Fearless database changes @EdPiairo, #NetPonto
  12. SOURCE CONTROL Delivering changes for databases and applications • First

    step in your database deployment pipeline • Traceability through change history • SQL as documentation • Shared code-base and shared process • Enforceable standards to reduce conflicts SQL Script @EdPiairo, #NetPonto
  13. • State based solutions • How the database should be

    (declarative) • Migrations based solutions • How the database should change (imperative) MIGRATIONS VS STATE Delivering changes for databases and applications Migration Migration State Delta @EdPiairo, #NetPonto
  14. SCRIPTING GUIDELINES Delivering changes for databases and applications • One

    script, one operation type, one object (small batches) • Merge conflicts management • Patterns identification • File system scripts history search @EdPiairo, #NetPonto
  15. CONTINUOUS INTEGRATION Delivering changes for databases and applications • Integrate

    and validate changes • Tests: Unit, Integration • Small batches, less risk • Considerations: • What should be tested? And When? • Can the application help on this? @EdPiairo, #NetPonto
  16. CONTINUOUS DELIVERY Delivering changes for databases and applications • Delivering

    change(s) in the target environment • Considerations • Downtime • Time to recover • Affected applications @EdPiairo, #NetPonto
  17. FAILED DEPLOYMENT Delivering changes for databases and applications • Rollback/roll

    forward scripts • Very fast • Please, do not make mistakes • It’s like working backwards • Backups (before deploy) • Safer but slower • Keep databases small • Avoid share databases between applications @EdPiairo, #NetPonto
  18. SCENARIO #1 – INDEPENDENT PIPELINES Delivering changes for databases and

    applications Source Control Continuous Integration Continuous Delivery APP DB • Independent deployment pipelines • High need of synchronization between DBA and development team @EdPiairo, #NetPonto
  19. SCENARIO #2 – DELIVERING TOGETHER Delivering changes for databases and

    applications Source Control Continuous Integration Continuous Delivery APP DB • Different code repositories • Independent CI process • The contact point will be the deployment moment @EdPiairo, #NetPonto
  20. SCENARIO #3 – CONNECTED INTEGRATION Delivering changes for databases and

    applications Source Control Continuous Integration Continuous Delivery APP DB • Different code repositories • Connected/dependent CI process @EdPiairo, #NetPonto
  21. SCENARIO #4 – FULL INTEGRATION Delivering changes for databases and

    applications Source Control Continuous Integration Continuous Delivery APP DB • Share the some code repository, CI process and CD process • No need of synchronization • Promotes learning within teams (database code reviews) @EdPiairo, #NetPonto
  22. DEMO Delivering changes for databases and applications @EdPiairo, #NetPonto

  23. DEVOPS, DATABASES AND APPLICATIONS Delivering changes for databases and applications

    • Deployment pipeline: Cultural and technical tool for managing changes in the software development process (should contemplate databases, applications and infrastructure). • DevOps as a contract – collaboration and communication mechanism for change management • Bringing DevOps to the pipeline: • Increase flow visibility • Increase feedback • Increase knowledge base @EdPiairo, #NetPonto
  24. READING MATERIAL Delivering changes for databases and applications @EdPiairo, #NetPonto

  25. Q&A Delivering changes for databases and applications @EdPiairo https://pt.linkedin.com/in/jesuspiairo eduardopiairo@gmail.com

    http://www.eduardopiairo.com/ @EdPiairo, #NetPonto