TRACK: CI/CD CONTINUOUS EVERYTHING ● Engineering Operations Director @ Deeper Insights ● Co-Founder and Leader @ DevOps Porto About Me @EdPiairo https://pt.linkedin.com/in/eduardopiairo [email protected] https://www.eduardopiairo.com
TRACK: CI/CD CONTINUOUS EVERYTHING A deployment pipeline should enable collaboration between the various groups involved in delivering software and provide everyone visibility about the flow of changes in the system, together with a thorough audit trail. by Martin Fowler @ https://martinfowler.com/bliki/DeploymentPipeline.html Definition
TRACK: CI/CD CONTINUOUS EVERYTHING Database Challenges • Database and application changes (most of the time) are handled differently • Different deployment pipelines - synchronization needed • Database is not included (manual work)
TRACK: CI/CD CONTINUOUS EVERYTHING Database Challenges • 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
TRACK: CI/CD CONTINUOUS EVERYTHING The Value Of Automation • Enable control over database development • Increase speed of response to change • Greater reliability, repeatability and consistency • Enables failing in a controlled and known way • Remove/reduce human intervention in the release process
TRACK: CI/CD CONTINUOUS EVERYTHING Source Control • Every database change can be described with an SQL script • Traceability through change history • SQL as documentation • Shared code-base and shared process • Enforce standards to reduce conflicts
TRACK: CI/CD CONTINUOUS EVERYTHING Migrations vs State • State based solutions • How the database should be • Migrations based solutions • How the database should change Migration Migration State Delta
TRACK: CI/CD CONTINUOUS EVERYTHING Continuous Integration • Integrate and validate changes • Unit and integration tests • Small batches, less risk • Considerations • What should be tested? And when? • How can the application contribute to this stage?
TRACK: CI/CD CONTINUOUS EVERYTHING Scenario #1 Source Control Continuous Integration Continuous Delivery APP DB • Independent deployment pipelines • High need of synchronization between DBA and development team
TRACK: CI/CD CONTINUOUS EVERYTHING Scenario #2 Source Control Continuous Integration Continuous Delivery APP DB • Different code repositories • Independent CI process • The contact point will be the deployment moment
TRACK: CI/CD CONTINUOUS EVERYTHING Scenario #3 Source Control Continuous Integration Continuous Delivery APP DB • Different code repositories • Connected/dependent CI process • Short learning step towards scenario #4
TRACK: CI/CD CONTINUOUS EVERYTHING Scenario #4 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)
TRACK: CI/CD CONTINUOUS EVERYTHING My Definition Pipeline: Cultural and technical tool for managing changes in the software development process (should contemplate databases, applications and infrastructure).