Code Monkey home page Code Monkey logo

vmss-build-pool's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.