/pipelineagent

ADO self-hosted pipeline agents.

Primary LanguagePowerShell

Pipeline Agents

Overview

This repository contains the source used to create Azure DevOps (ADO) Self- hosted agents.

Status: working towards an MVP release. Please don't consider this production ready.

There are two major components to the Self-hosted pipeline agents. Image building and agent provisioning.

Image Building

Image building involves building and automating virtual machine (VM) images from scratch. The produced artifact is an Azure managed disk that is generalized and published to an Azure Compute Gallery (formally known as Shared Image Gallery). These images will include all dependencies needed on Azure DevOps (ADO) agents and include any predefined security and configuration settings. These images are leveraging the HashiCorp Packer tool for building the images.

Operating Systems

The following operating systems are supported for VM image builds:

  • Windows 2016 Server
  • Windows 2019 Server
  • Windows 2022 Server
  • Ubuntu 1804
  • Ubuntu 2004

Agent Provisioning

Agent provisioning involves taking the built images and provisioning both self-hosted agents and scale set agents and then associating them to various Agent pools in the Azure DevOps (ADO) organization.

Virtual Machine (VM) Image Definitions

Definition Included Software Notes
Ubuntu 20.04 ubuntu2004 Do not use in production. Product team developed image. Used as a reference to manage updates.
Test Ubuntu 20.04 test-ubuntu2004 Do not use in production. Test image used to compare against ubuntu2004 to take updates.
Ubuntu 18.04 ubuntu1804 Do not use in production. Product team developed image. Used as a reference to manage updated.
Test Ubuntu 18.04 test-ubuntu1804 Do not use in production. Test image used to compare against ubuntu1804 to take updates.
Windows Server 2022[beta] windows2022 Do not use in production. Product team developed image. Used as a reference to manage updates.
Test Windows Server 2022[beta] test-windows2022 Do not use in production. Test image used to compare against windows2022 to take updates.
Windows Server 2019 windows2019 Do not use in production. Product team developed image. Used as a reference to manage updates.
Test Windows Server 2019 test-windowss2019 Do not use in production. Test image used to compare against windows2019 to take updates.
Windows Server 2016 windows2016 Do not use in production. Product team developed image. Used as a reference to manage updates.
Test Windows Server 2016 test-windowss2016 Do not use in production. Test image used to compare against windows2016 to take updates.

Getting Started

  1. Setup RBAC to support Packer image generation
  2. Test Packer image generation builds from user's machine
  3. Setup build pipeline (CI) for the infrastruture
  4. Setup image deploy (CD) pipeline for image building
  5. Setup agent provisioning (CD) for ADO agent deployments
  6. Setup VM Scale set provisioning

Coming soon...more details 😃

This repository uses the actions/virtual-environments repository to help with the Packer image builds. It's maintained by the Azure DevOps (ADO) product team to build the hosted agents provided by Azure DevOps (ADO). This is extremely useful since they automate the install and creation of many dependencies as well as configure the "baseline" images.

Updates from the actions/virtual-environments repository are needed in order to keep internal images up to date. General guidance is to create a temporary git-subtree and compare that against current images in the vm-images directory.

see: actions/virtual-environments Updates for guidance on how to keep this repository updated.

Software and image guidelines

To learn more about tools and images support policy, see the guidelines.