Automation beyond limits
Automation beyond limits
Integrating Oracle database release automation into customer CI/CD process.
eHarmony is one of the most advanced development firms we have seen: they have followed an agile methodology for years, being one of our first customers to run CI/CD pipelines. Each development team runs their development in parallel development environments in AWS, which they call runaways. They later merge all work from these runways to trunk and deploy to production.
The critical showstopper to making this process fully automated was their Oracle database, a key component of the architecture. The DB is an exceptionally powerful RDBMS, which did not have much tooling around release automation.
eHarmony required a solution which can clone the Oracle DB, mask its data, then apply or rollback an incremental set of release-specific changes in a repeatable, automated way. This would allow them to roll the DB forward and back in a finely grained fashion.
AVM adopted AWS Elastic Block Storage (EBS) snapshots to clone the Oracle DB data before spinning up any new runways. We applied a set of custom scripts to mask and map the DB data. This is a fairly standard industry solution, which became more interesting later when we started to address incremental changes.
Previously scripts would be applied to the DB manually: no history on these scripts was managed, so it was not possible to reproduce previous activity. We redesigned the DB release process, creating a framework to apply changes in a structured way. This framework consisted of Golang Core and Bash scripts.
Within the framework, DB changes are first pulled from GitHub and analysed against a set of pre-checks. If these checks passed, the framework applied its scripts to the DB and logged any activity in the GitHub repository, tracking the status of execution. A rollback script was also created as part of the process.
With a repository and an audit trail of all DB changes at our disposal, we were able to deliver two new features: the first is being able to roll the DB forward and back, and the second is to roll the DB in a selective fashion. In other words, we could choose which runways to apply which branch scripts to. This allowed us to introduce a revolutionary merging technique to the DB, which worked alongside git branch merges. We designed a wrapper around it, using Ruby on Rails following eHarmony’s request, and plugged it into the CI/CD pipeline as a Jenkins and CodePipeline job.
This is one of the case studies we are most proud of. Have you found yourself in a situation when you have a standard ask, which you would think others have already faced thousands of times before? Ever found yourself in the position where you do an online search, and you see everybody is asking the same question, but there is no answer? In this engagement with eHarmony, we addressed exactly this situation, creating a product that the world was looking for and which can be reused to help many, many more customers going forward.