The primary goal of this work was to assess whether an AI system could define and support the entire migration process, from design through script creation to execution.
This effort was not limited to faster code generation. The experiment aimed to determine whether AI could practically support all migration stages, including analysis, process structuring, task automation, documentation, and execution support.
For this experiment, I migrated from Azure DevOps Server to Azure DevOps Services using Microsoft’s official Data Migration Tool. This scenario was selected for its complexity, which includes technical dependencies, validation points, identity management, infrastructure setup, and post-migration verification. Such migrations are prone to errors if the process is unclear or not repeatable.
The objective was to automate as much of the end-to-end migration flow as possible. Typically, such migrations require several days for planning, scripting, testing, documentation, troubleshooting, and execution. In this case, the solution was designed and built in approximately three hours, providing a strong test of AI’s practical value in engineering work.
The final deliverable was a production-ready automation package with 10 PowerShell scripts, 11 orchestration scripts for dry-run and production workflows, 16 Markdown documentation files, and 2 configuration files. This totalled approximately 4,500 lines of PowerShell and 3,000 lines of documentation. This is a comprehensive migration framework that enables structured, repeatable execution. The output is publicly available on GitHub in the vulnerable/azure-devops-migration repository and was successfully tested in a dedicated environment.
One key design decision was to centralise configuration in a single file. This approach ensures the environment is configured once and all scripts use consistent parameters throughout the migration. The automation scope is broad and covers the most important migration phases. It starts with pre-flight validation. This includes SQL connectivity, tool paths, disk space, server version, and Azure region checks. Next, it exports on-premises users, group memberships, and access levels through the Azure DevOps REST API. After this, it cross-references users with Entra ID and can optionally create missing accounts where needed.
The solution automates the Migrator validate and prepare steps, analyses the identity map, detaches the collection, generates the DACPAC using SqlPackage.exe, uploads required artefacts to Azure Storage, creates the SAS token, updates the import definition, and executes the import for either DryRun or ProductionRun. After migration, it validates the target cloud organisation and compares results to a pre-cutover baseline.
Post-migration validation is essential. Migration involves not only moving data but also confirming the target state is correct. Automation verifies projects, repositories, work items, build counts, and restores access levels. An 11-point automated pre-cutover check helps prevent last-minute problems. Some areas were intentionally left manual. For example, Entra ID Connect setup remains an IT responsibility, collection detach still requires human confirmation, Entra ID sign-in during import is interactive, and some post-migration tasks, such as billing setup, agent reconfiguration, service connections, secrets re-entry, and extension reinstallations, still need manual work. This was also part of the experiment. I wanted to understand not only where AI helps, but also where human control should remain in the process.
The productivity gain was substantial. Using GitHub Copilot, the entire process took about three hours. Without AI, it would have required an estimated 10 to 16 days for one engineer, including research, planning, development, orchestration, documentation, testing, debugging, execution, and updates. This represents a 25- to 40-fold increase in speed.
AI delivered the most value in handling repetitive patterns and supporting rapid iteration. Boilerplate code, configuration loading, REST API calls, parameter validation, and error handling were generated consistently across all scripts. Documentation, including guides, checklists, rollback plans, and troubleshooting content, was produced much faster. Additionally, AI facilitated live debugging, allowing about 10 issues to be identified and resolved in real time. This demonstrated AI’s usefulness both in preparation and during the migration itself.
The experiment showed that AI dramatically sped up delivery and handled repetitive tasks effectively, but human oversight was crucial for architectural, security, and critical validation decisions. The best outcomes combined AI's efficiency with human judgment, ensuring quality and control.
Lessons learned
- AI can help not only with code generation, but also with defining and structuring an end-to-end migration process.
- A migration plan becomes much stronger when processes, scripts, documentation, and validation are designed together.
- Documentation generation is one of the biggest productivity gains, not only code generation.
- Real-time AI debugging can markedly reduce troubleshooting time.
- A single configuration model improves consistency and decreases operational mistakes.
- Security separation between config and secrets should be designed from the beginning.
- Not every step should be automated. Some actions should remain manual for control and risk reasons.
- Post-migration validation is as important as the migration itself.
- AI can accelerate delivery a lot, but human review is still necessary for quality and judgment.
Repository:
https://github.com/vunvulear/azure-devops-migration
https://github.com/vunvulear/azure-devops-migration
Comments
Post a Comment