{"id":21842956,"url":"https://github.com/vsingh55/azuredevops-ci-cd","last_synced_at":"2026-04-13T04:05:08.118Z","repository":{"id":229138257,"uuid":"775856073","full_name":"vsingh55/AzureDevOps-CI-CD","owner":"vsingh55","description":"CI/CD pipeline for Microservices using Azure DevOps and ArgoCD to deploy microservices. The pipeline handles building and pushing Docker images to Azure Container Registry and deploying them to a Kubernetes cluster managed by ArgoCD. ","archived":false,"fork":false,"pushed_at":"2024-08-08T10:14:06.000Z","size":733,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-03T07:39:53.987Z","etag":null,"topics":["argocd","azure","azure-devops","azure-kubernetes-service","azurepipeline","bash-script","docker","terrraform","yaml"],"latest_commit_sha":null,"homepage":"https://vijaysingh.cloud/projects/202402-vote-app-azurecicd/","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vsingh55.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-22T07:17:05.000Z","updated_at":"2024-12-08T14:08:34.000Z","dependencies_parsed_at":"2025-01-26T11:36:13.805Z","dependency_job_id":null,"html_url":"https://github.com/vsingh55/AzureDevOps-CI-CD","commit_stats":null,"previous_names":["krvsc/git2azure-pipeline-migration","vsingh55/git2azure-pipeline-migration","vsingh55/git2azure-migration-ci-cd","vsingh55/azuredevops-ci-cd"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vsingh55/AzureDevOps-CI-CD","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsingh55%2FAzureDevOps-CI-CD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsingh55%2FAzureDevOps-CI-CD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsingh55%2FAzureDevOps-CI-CD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsingh55%2FAzureDevOps-CI-CD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vsingh55","download_url":"https://codeload.github.com/vsingh55/AzureDevOps-CI-CD/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsingh55%2FAzureDevOps-CI-CD/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31739055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T03:27:07.512Z","status":"ssl_error","status_checked_at":"2026-04-13T03:26:53.610Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["argocd","azure","azure-devops","azure-kubernetes-service","azurepipeline","bash-script","docker","terrraform","yaml"],"created_at":"2024-11-27T22:13:49.495Z","updated_at":"2026-04-13T04:05:08.089Z","avatar_url":"https://github.com/vsingh55.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure DevOps CI/CD\n\nThis project demonstrates how to set up a **CI/CD pipeline using Azure DevOps and ArgoCD to deploy microservices**. The pipeline handles building and pushing Docker images to Azure Container Registry and deploying them to a Kubernetes cluster managed by ArgoCD. This ensures a streamlined, automated, and scalable deployment process, providing continuous integration and continuous delivery capabilities.\n\n## Table of Contents\n- [Azure DevOps CI/CD](#azure-devops-cicd)\n  - [Table of Contents](#table-of-contents)\n  - [Installation](#installation)\n    - [Prerequisites](#prerequisites)\n    - [Steps](#steps)\n  - [Setup](#setup)\n    - [Provision Azure Resources](#provision-azure-resources)\n    - [Azure DevOps Project](#azure-devops-project)\n  - [Continuous Integration](#continuous-integration)\n    - [Agent Pool Setup](#agent-pool-setup)\n    - [Pipeline Setup](#pipeline-setup)\n  - [Continuous Delivery](#continuous-delivery)\n    - [Create a Kubernetes cluster](#create-a-kubernetes-cluster)\n    - [ArgoCD Setup](#argocd-setup)\n  - [Blog](#blog)\n  - [License](#license)\n  - [Acknowledgement](#acknowledgement)\n\n![diagram-export-9-6-2024-2_17_46-am](https://github.com/vsingh55/Git2Azure-Migration-CI-CD/assets/138707342/659ddc45-2643-4de7-a232-ace9b8a84366)\n## Installation\n\n### Prerequisites\n- Azure account\n- SSH client (e.g., terminal, PuTTY)\n- Git\n- [Azure DevOps self-hosted Linux Agent](https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/linux-agent?view=azure-devops).\n- Basics of Kubernetes\n\n### Steps\n1. **Sign up for an Azure account.**\n   - Visit the Azure website and sign up for an account if you don’t already have one.\n\n2. **Sign in to the Azure portal and Azure DevOps services.**\n   - Navigate to [Azure Portal](https://portal.azure.com/) and [Azure DevOps](https://dev.azure.com/login).\n\n## Setup\n\n### Provision Azure Resources\n- **Approach 1:** Provision resources using [Terraform](Terraform)\n- **Approach 2:** Manually provision resources on the Azure portal.\n  - Create a Linux VM, Azure Container Registry (ACR), and Azure Kubernetes Cluster (AKS).\n\n### Azure DevOps Project\n1. **Create a new project in Azure DevOps.**\n   - Go to Azure DevOps and create a new project.\n2. **Go to the Git section and export [the repository](https://github.com/dockersamples/example-voting-app.git).**\n3. **Obtain 2 personal access tokens (one for Azure agent, one for ArgoCD).**\n   - These tokens will be used for authentication in subsequent steps.\n\n## Continuous Integration\n\n### Agent Pool Setup\n1. **Add the created VM to the agent pool.**\n   - Go to user settings in Azure DevOps, visit settings in the left corner, and look for agent pools.\n2. **Delete any existing agents.**\n3. **Run the necessary commands on the VM to set up the agent pool.**\n   - Use the following commands:\n     ```sh\n     wget https://vstsagentpackage.azureedge.net/agent/3.239.1/vsts-agent-linux-x64-3.239.1.tar.gz\n     sudo apt update\n     sudo apt install docker.io  \n     mkdir myagent \u0026\u0026 cd myagent\n     tar zxvf vsts-agent-linux-x64-3.239.1.tar.gz\n     ./config.sh\n     ```\n   - Provide the server URL (`https://dev.azure.com/{your-organization}`) and the personal access token when prompted.\n   - Start the agent: `./run.sh`.\n4. Ensure the agent is running and listening for jobs and is online on the DevOps portal.\n\n### Pipeline Setup\n1. **Visit the pipeline section in Azure DevOps.**\n2. **Create pipelines for each microservice (voting-app, result-app, worker-app).**\n3. **Select Azure Repo Git and Docker (build and push image to Azure Container Registry option).**\n4. **Use the provided .yml files from the repository for each pipeline.**\n   - The .yml files can be found in the [Pipeline folder](https://github.com/vsingh55/Git2Azure-Pipeline-Migration/tree/main/Pipelines).\n\n## Continuous Delivery\n\n### Create a Kubernetes cluster\n- If Terraform is used, it will be automatically created. Otherwise, manually create it on the portal.\n- Note: For free tier accounts, you might encounter usage quota issues. Provision the cluster in a different region and set node config to default node=1 and max node=2.\n- Enable public IP and set max pods per node to min = 30.\n\n### ArgoCD Setup\n1. **Install ArgoCD on the Kubernetes cluster.**\n   - Run:\n     ```sh\n     kubectl create namespace argocd\n     kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml\n     kubectl get pods -n argocd\n     ```\n   - Ensure all pods are running.\n2. **Configure ArgoCD.**\n   - Retrieve the initial admin password:\n     ```sh\n     kubectl get secrets -n argocd\n     kubectl edit secret argocd-initial-admin-secret -n argocd\n     echo \u003cpassword\u003e | base64 --decode\n     ```\n   - Access the ArgoCD UI:\n     ```\n     kubectl get svc -n argocd\n     kubectl edit svc argocd-server -n argocd\n     ```\n   - Change ClusterIP to NodePort\n     ```\n     kubectl get svc -n argocd\n     kubectl get nodes -o wide\n     ```\n   - Access ArgoCD UI in the browser using `node-external_ip:nodeport`.\n\n3. **Connect ArgoCD to Azure Git Repo.**\n   - In ArgoCD UI, go to settings and add the Git repository using the URL format:\n     ```sh\n     https://\u003cpersonal_access_token\u003e@dev.azure.com/\u003corganization_name\u003e/\u003cproject_name\u003e/_git/\u003cproject_name\u003e\n     ```\n   - Create an application in ArgoCD with the following details:\n     - Name: voteapp\n     - Project: default\n     - Sync policy: automatic\n     - Repository URL, path, and cluster URL will be auto-populated.\n     - Namespace: default\n\n4. **Update Kubernetes manifests using scripts.**\n   - Create a folder for scripts in the Azure repo and write a script to update the manifests with the new image name from the ACR.\n   - Add an update stage in your pipelines to include this script.\n   - Ensure AKS can pull images from ACR by creating a secret:\n     ```sh\n     kubectl create secret docker-registry \u003csecret-name\u003e \\\n     --namespace \u003cnamespace\u003e \\\n     --docker-server=\u003ccontainer-registry-name\u003e.azurecr.io \\\n     --docker-username=\u003cservice-principal-ID\u003e \\\n     --docker-password=\u003cservice-principal-password\u003e\n     ```\n\n## Blog\n- For detailed instructions and documentation, visit the [blog](https://blogs.vijaysingh.cloud/project-building-a-cicd-pipeline-with-azure-devops-and-argocd).\n\n## License\n- This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Acknowledgement\n- Thanks to [Azure DevOps](https://azure.microsoft.com/en-us/services/devops/) \u0026 [ArgoCD](https://argoproj.github.io/argo-cd/) for providing the platform and tools to build this CI/CD pipeline.\n\nFeel free to open issues or pull requests if you have any questions or suggestions!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsingh55%2Fazuredevops-ci-cd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvsingh55%2Fazuredevops-ci-cd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsingh55%2Fazuredevops-ci-cd/lists"}