
My favorite task is to automate a process that takes days, manual configs and meetings with SMEs into a pipeline with scripts that complete in minutes. In this article we are using Azure DevOps pipelines, Azure Vault, Azure Blob Storage, Hashicorp’s packer, Chocolatey and Powershell to orchestrate the creation of a gold image that has the latest-patched version of Windows 10 H2, nine applications installed and 2 configurations applied. All of this is built in less than 1 hour and the pipeline can be triggered every month to get new patches and software updates without interaction. The base images can be used for WVD, Citrix machine catalogs, RDSH and scale groups .
First let’s cover the benefits of having a pipeline to build your gold images.
Benefits of having your image as code are:
- The OS and installed software is updated on every build / release.
- Provisioning a full image takes minutes, not days so teams can deliver value rapidly and not waste time on repetitive installation or configuration tasks.
- Reduce errors from installing and adding configurations manually or from outdated documentation.
- Increased team confidence since builds are predictable when making changes.
- Increased team collaboration since everyone can see the documented code and improve it.
- Lighter images since you are not carrying incremental changes.
In this article we will cover how to get the latest windows 10 image from the marketplace, the areas of the packer template code, chocolatey and how to create your custom packages with Azure Blob storage and powershell. Then we will wrap up by creating configuration scripts and image sealing tasks (like sysprep) and we will finish by setting up our pipeline to deploy and get the gold image. You should already have Azure DevOps with a repo and VSCode configured for git actions.
Sources:
Azure Devops: https://docs.microsoft.com/en-us/azure/devops/?view=azure-devops
VSCode: https://code.visualstudio.com/