Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomconte/vmss-build-pool
Deploy an Azure DevOps Agent Pool on a VM Scale Set
https://github.com/tomconte/vmss-build-pool
Last synced: 12 days ago
JSON representation
Deploy an Azure DevOps Agent Pool on a VM Scale Set
- Host: GitHub
- URL: https://github.com/tomconte/vmss-build-pool
- Owner: tomconte
- License: mit
- Created: 2020-01-15T08:02:28.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-04T15:51:05.000Z (almost 5 years ago)
- Last Synced: 2024-10-26T09:47:01.538Z (25 days ago)
- Language: Shell
- Homepage:
- Size: 18.6 KB
- Stars: 13
- Watchers: 3
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Azure DevOps Agent Pool on VM Scale Set
This repository contains infrastructure deployment scripts that can be used to create a Virtual Machine Scale Set (VMSS) running a set of DevOps build agents. Each node in the scale set is based on a VM image that can be customized to add any necessary pre-requisites. Upon node start, the DevOps agent is installed and registered in a Build Pool.
Before running the scripts below, create a resource group named `vmss-build-pool`; for example:
```
az group create -n vmss-build-pool -l westeurope
```## Creating the VM image
The Packer configuration can be used to build a new Azure VM Image. The image is based on Ubuntu 18.04 LTS and installs some basic build tools (`build-essential`, Docker, ...) The installation script used is `install-build-agent.sh`.
The managed image is called `build-agent-image` and will be created in the `vmss-build-pool` resource group.
```
packer build -force agent-image.json
```## Starting the VM Scale Set
`azuredeploy.json` is an ARM Template that will spin up a VM Scale Set based on the image created in the previous step.
To deploy it:
```
az group deployment create -g vmss-build-pool \
--template-file azuredeploy.json \
--parameters @deploy-parameters.json
```Upon deployment, every node of the scale set will run `start-agent.sh` to configure the Azure DevOps agent. It can also perform some other initialization tasks, like pre-pulling some Docker images or pre-populating other caches.
You will need to edit `deploy-parameters.json` to change the deployment parameters:
- `adminUsername`: the name for the administrative user account created on the VM.
- `adminPassword`: the password for the administrative user account.
- `subnetId`: the resource ID of the Virtual Network subnet where the nodes will be created.
- `managedImageResourceUri`: the resource ID of the custom VM image to use for the nodes.
- `agentOrgUrl`: the URL of the Azure DevOps organization.
- `agentPat`: the Personal Access Token (PAT) used to configure the agent.
- `agentPool`: the name of the Agent Pool where the agent should register.