An Azure DevOps Build Agent for use on Linux. Intended for use within Kubernetes.
10K+
Firstly, create a new namespace called "build-agents" to hold the new agents and associated PAT.
kubectl create ns build-agents
If desired, add details about your Docker account if you wish to user your account for unlimited pulls.
kubectl create secret docker-registry dockerhub-account --docker-username=dockerhub-account-name --docker-password=dockerhub-account-password --docker-email= --namespace build-agents
In the above script, dockerhub-account will be the name of the secret in Kubernetes, dockerhub-account-name should be changed to your Docker Hub account name and dockerhub-account-password should be changed to your Docker Hub password or token.
Next create a simple YAML file with the following values:
image:
pullPolicy: Always
pullSecrets:
- dockerhub-account
personalAccessToken: "your-ads-pat"
agent:
organisationUrl: "https://dev.azure.com/your-org-name/"
pool: "Default"
dockerNodes: true
In the above file, you should change your-ads-pat to a Personal Access Token (PAT) you've generated which has "Read & manage" agent permissions. You should also change your-org-name to the name of your ADS organisation. If you wish to deploy the agent to a pool other than the "Default" one, you should also update that value. The image section can be completely removed or either of the sub-values if desired. If you're not running Docker for your container hosting (Kubernetes 1.22+ will no longer support Docker), set dockerNodes to false.
Once you are done, it's time to install the first agent:
helm install -n build-agents -f buildagent-settings.yaml linux-agent-1 oci://registry-1.docker.io/jabbermouth/azuredevops-buildagent-helm
To add additional build agents, simply run the following:
helm install -n build-agents -f buildagent-settings.yaml linux-agent-2 oci://registry-1.docker.io/jabbermouth/azuredevops-buildagent-helm
Content type
Image
Digest
sha256:a0b55b8ba…
Size
216.4 MB
Last updated
almost 4 years ago
docker pull jabbermouth/ads-linux-agent