Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
CI/CD with DevTest Labs is a variant of Design a CI/CD pipeline using Azure DevOps. This article focuses on the specifics of deploying to a DevTest Labs staging environment.
DevTest Labs enables you to provision Windows and Linux environments by using reusable templates and artifacts. These environments are useful for developers, but you can also use them in CI/CD pipelines for provisioning staging environments. See Azure DevTest Labs scenarios to determine if DevTest Labs is a good fit for your scenario.
This article describes a high-level DevOps workflow for deploying application changes by using continuous integration (CI) and continuous deployment (CD) practices with Azure Pipelines. A DevTest Labs environment is used for the staging environment.
Architecture
Download a Visio file of this architecture.
Dataflow
This section assumes you read Azure Pipelines baseline architecture and only focuses on the specifics of deploying a workload to DevTest Labs for staging.
PR pipeline - Same as the baseline
CI pipeline - Same as the baseline
CD pipeline trigger - Same as the baseline
CD create DevTest Labs staging environment - This step creates the DevTest Labs environment which acts as the staging environment. The step includes:
- Create DevTest Labs environment in a staging subscription.
- Deploy an Azure Resource Manager template to the DevTest Labs environment. Virtual machine images can be stored in a shared image gallery.
- Perform any post deployment steps to properly configure the staging environment.
CD release to staging - Same as the baseline with one exception. The staging environment is a DevTest Labs environment.
CD release to production - Same as the baseline
Monitoring - same as the baseline
Components
This section assumes you read Azure Pipelines baseline architecture components section and only focuses on the specifics of deploying a workload to DevTest Labs for staging.
- Azure DevTest Labs is a service for creating, using, and managing environments for development, testing, and deployment purposes. The service allows you to easily deploy pre-configured environments in a cost-effective manner.
Alternatives
Instead of creating the DevTest Labs staging environment as part of the CD process, pre-create the environment outside of the pipeline. This approach speeds up the pipeline. However, this approach stops the ability to tear down the environment after the pipeline is complete, which increases the cost.
In situations where Azure VM Image Builder and a Shared Image Gallery don't work, set up an image factory to build VM images from the CI/CD pipeline and distribute them automatically to any DevTest Labs registered to those images. For more information, see Run an image factory from Azure DevOps.
You can create and deploy additional environments beyond staging as part of the CD pipeline. These environments can support activities like performance testing and user acceptance testing.
Considerations
This section assumes you read the considerations section in Azure Pipelines baseline architecture and only focuses on the specifics of deploying a workload to DevTest Labs for staging.
Cost Optimization
- Consider using Azure DevTest Labs policies and procedures to control costs.
Operational Excellence
- Consider implementing environments beyond just staging and production to enable rollbacks, manual acceptance testing, and performance testing. Using staging as the rollback environment prevents you from using that environment for other purposes.