In today’s world, enterprises operate under a constant push to go faster to market while maintaining (or increasing) quality without consumption of any additional resources. The name of the game is automation and process re-engineering.
With this new norm of automation, the strategy is to shift left. Shifting left means taking processes that usually fall at the end of the software development life cycle (or SDLC) and putting them toward the beginning. Or it could also be defined as turning a staged process into a continuous process that occurs throughout development.
By adopting continuous database integration, continuous delivery, and shift-left testing, your development and operations teams can synchronize database and application delivery.
The traditional approach is of reviewing the code by the DBA written by the developers in SQL format for the DB changes to understand the implications of the performance and integration of the data. But the DBA is introduced quite late in the process (just before production deployment) which is too late and it is costly to make proper changes. Most of the times the DB changes are deployed manually.
It is also difficult to implement the DevOps process if we have a tightly coupled architecture.
Database deployment automation is the practice of including databases in the DevOps process and automating it for the whole pipeline to run more smoothly.
With the concept of the distributed systems in today’s world, we have the microservices patterns that solved the DB coupling by giving each microservice its own DB.
Continuous Delivery in the pipeline allows developers to check database changes into the source repository, or to treat database-as-code, thus enabling the automation of database changes. It also allows an orchestration tool in the pipeline to call those scripts to make the changes to the database. Ideally, we can have the scripts with the data base changes and version control to keep track of the changes and go back and forth when required.
Container orchestration is a good way to start. These can be removed and started over in case of any issues.
Containerization is basically a lightweight alternative to virtual machines (VMs). Containerization involves encapsulating applications in containers with independent operating systems.
With the containerization approach, you no longer have to wait for DBAs to review the changes until the final phase and can be involved from the initial phase. As time goes by, developers, operations, and DBAs will agree on how to properly make changes in the database. And the more the team practices the review process, the smoother it will be with containerization.
There are a few database automation tools in the market which can help with this process:
- Liquibase (free)
- Redgate and DBMaestro
- Improved deployment quality
- Reduction in deployment costs
- Reduction in rework and schedule impact
- Seamless integration with planned CI/CD pipelines
All of these can be a complicated and error-prone process when done manually, especially at scale. A proper solution could be the final link in the chain to connect container orchestration platforms and databases effectively.