Learn to Create Custom Azure DevOps Agent using Packer

A production grade project from design to implementation


What you’ll learn

  • Create a template in packer to build a customized windows image.
  • Create Azure DevOps pipeline to automate the image building process.
  • Create virtual machine scale set and automate it using ARM template.
  • Using keyvault to keep project secrets.

Course Content

  • Introduction –> 1 lecture • 15min.
  • Getting started with Packer –> 7 lectures • 38min.
  • Phase1 – Create a Custom Windows Image with Packer & Azure DevOps YAML pipelines –> 9 lectures • 53min.
  • Phase2 – Deploy Azure Scale Set VM –> 4 lectures • 33min.
  • Phase3 – Deploy Azure DevOps Agent –> 2 lectures • 10min.
  • Final touch & Test & Entire solution –> 3 lectures • 33min.

Auto Draft



This is a unique course designed to help you to create a customized Azure DevOps agents from the ground up. Currently, most software teams that are using Azure DevOps to build their software choose to use Azure-hosted agents as their build server. This comes with a lot of benefits. Many libraries are already installed on these agents so it’s quite compatible with most projects’ specifications. For every build, you get a new agent that is provisioned and after the build will be destroyed. However, this has its own limitations. Azure Hosted Agents are using a specific type of VM so it is not possible to increase hardware specifications. If your projects also have libraries that are not supported by Azure Hosted agents, you need to install them on the agents. This might not be an issue for projects that have started in recent years, but if you have a legacy code that takes an hour to build then you might start to think about how you can speed up the build process. For such a situation, there are a lot of solutions like reconsidering the architecture of software and so on which is not the scope of this article. In this article, I am going to focus on how you can create a custom self-hosted agent.


With Azure DevOps, it is possible to create an agent pool and add our own agents. These agents can be your personal laptop, on-premise server, or virtual machine. What we want to do in this course is to see how we can create a fully automated process in which we create a custom Windows image. This gives us the benefit of having an image containing all the applications and settings we need. Additionally, we can provision a virtual machine/virtual machine scale set using this image with desired hardware specifications.


What makes this course unique is that you understand the design process before you jump into the implementation. It is important to know why we choose certain ways and then learn how to implement it. I walk you through all required steps and you get along with me to implement this solution while watching me coding.


These days it is quite important to have everything as code. It is the same for pipelines. In this course, I am using PowerShell scripts, Packer, Azure DevOps YAML pipelines and Azure ARM templates. So you learn how to use all these tools in a project and I explain everything in detail.


This course if very useful for different purposes. It can help you to learn:

  • How to create a customized Windows Image using Packer
  • How to create a Virtual Machine Set using customized image
  • How to use Azure Keyvault for secrets in the Azure DevOps YAML pipelines

And so many other things you would need to know when you implement projects like these.


During the course, I am always available to help you with your questions and perhaps problems you are facing. The aim of this course is to equip you with enough knowledge to understand the CI/CD concept and additionally get familiar with Azure DevOps tools. With these, you are able to start creating your pipelines in different scenarios and bring added value to your projects and your companies.

Get Tutorial