CI/CD for Azure VMs

Solution Idea

If you'd like to see us expand this article with more information (implementation details, pricing guidance, code examples, etc), let us know with GitHub Feedback!

Azure is a world-class cloud for hosting virtual machines running Windows or Linux. Whether you use ASP.NET, Java, Node.js, or PHP to develop applications, you'll need a continuous integration and continuous deployment (CI/CD) pipeline to push changes to these virtual machines automatically.

Azure DevOps provides the CI/CD pipeline, starting with a Git repository for managing your application source code and infrastructure code (ARM templates), a Build system for producing packages and other build artifacts, and a Release Management system for setting up a pipeline to deploy your changes through dev, test, and production environments. The pipeline uses ARM templates to provision or update your infrastructure as necessary in each environment, and then deploys the updated build. You can also use Azure DevTest Labs to automatically tear down test resources that are not in use.

Architecture

Architecture diagram Download an SVG of this architecture.

Data Flow

  1. Change application source code
  2. Commit Application Code and Azure Resource Manager (ARM) Template
  3. Continuous integration triggers application build and unit tests
  4. Continuous deployment trigger orchestrates deployment of application artifacts with environment-specific parameters
  5. Deployment to QA environment
  6. Deployment to staging environment
  7. Deployment to production environment
  8. Application Insights collects and analyses health, performance, and usage data
  9. Review health, performance and usage information
  10. Update backlog item

Components

  • Virtual Machines: Provision Windows and Linux virtual machines in seconds
  • Azure DevTest Labs: Quickly create environments using reusable templates and artifacts
  • Application Insights: Detect, triage, and diagnose issues in your web apps and services.
  • Azure DevOps: Build and deploy multi-platform apps to get the most from Azure services

Next steps