Goal: In this project, my goal was to migrate our existing GitHub CI pipeline to Azure CI Pipelines, taking advantage of the robust features and scalability offered by Azure DevOps.
Tools and Services: To achieve this goal, I utilized the following tools and services:
-
Azure DevOps: A comprehensive platform for collaborative software development, delivery, and deployment.
-
Azure VMs: Virtual machines that provide a flexible and scalable infrastructure for building and deploying applications.
-
Container Registry: A managed registry service that enables secure, scalable, and reliable container image management.
Steps: To set up the CI pipeline, I followed these steps:
-
Creating an Azure Resource Group: I created a new resource group in Azure, which served as a logical container for all the resources required for the pipeline.
-
Creating a VM: I provisioned a new Azure VM, which would act as the build agent for the pipeline.
-
Creating 3 Pipelines on Azure DevOps: I created three separate pipelines in Azure DevOps: worker, result, and vote. Each pipeline had its own specific tasks and responsibilities.{Perform built stages which is Docker Image creation }
-
-
Installing Docker on the VM via SSH CLI: I installed Docker on the VM using the SSH CLI, which enabled me to containerize my application and leverage the benefits of Docker.
-
Remember, when connecting to the VM via SSH CLI, save the .pem file in the folder from which you are trying to access it.
Challenges: During the implementation, I faced two significant challenges:
-
Creating the Worker Pipeline: Configuring the worker pipeline to perform the desired tasks and integrate with the other pipelines was a complex task.
-
-
Managing the Dockerfile: Crafting a Dockerfile that would correctly build and package my application was a challenge, especially when it came to managing dependencies and optimizing the build process.
Benefits: By migrating to Azure CI Pipelines, I achieved the following benefits:
-
Smaller Code Changes: With Azure CI Pipelines, I can now make smaller, more frequent code changes, which reduces the risk of errors and improves overall code quality.
-
Fault Isolation: The pipeline’s automated testing and deployment processes help isolate faults, making it easier to identify and resolve issues quickly.
-
Smaller Backlog: The automated pipeline reduces the backlog of tasks, allowing me to focus on more critical aspects of the project.
Let me know if this meets your expectations, and I’ll proceed with the second part of the blog post, covering the CD (Continuous Deployment) pipeline!