In my day job, I’ve been tasked with utilising Azure DevOps (ADO) pipelines for a business process. The pipeline isn’t building or deploying anything, so in my honest opinion, it’s not really CI/CD.
The pipelines are being used to assist in the daily migration of databases from one data centre to another. It’s a different kind of task than what I’ve done before — but I enjoy breaking the rules and using tools beyond their intended purpose. For example, I once wrote a PowerShell script to ping me football results for a particular team, just so I could wind up a mate whenever his beloved side lost.
At the moment, I’m conducting analysis to design one or more pipelines that will efficiently transfer nightly backups over 10Gbps circuits, though a few databases are unfortunately stuck at 1Gbps.
At a high level, the process is as follows:
- Collate the list of databases to be copied.
- Check if each database has been successfully backed up.
- If backed up, copy it to the other data centre.
- Restore the database.
- A third party then carries out their part of the process to ensure everything is ready for the customer at the start of the working day.
The first problem I hit during testing was that ADO agents don’t like running concurrent processes. The workaround? Set up multiple agents and invoke them within the pipeline.
On the first attempt, running a pipeline agent against three ADO agents on a single server resulted in an epic fail — it seemed like they were fighting for some sort of exclusive control. The temporary fix was to introduce 30- and 60-second delays, which allowed the pipeline to run initially without errors.
So, this evening I’ve scheduled the pipeline to run in the early hours. I’ll update you in due course to let you know if it worked!
Leave a Reply