GithubHelp home page GithubHelp logo

everazurerest / aci-pipelines-agent-linux Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 24 KB

Azure DevOps Pipelines Self Hosted Agent in Azure Container Instance with basic private VNET connectivity

License: MIT License

Dockerfile 6.19% Shell 25.35% Bicep 68.46%
azure-devops azure-devops-agent docker azure-container-registry azure-container-instances vnet self-hosted-agent azure bicep

aci-pipelines-agent-linux's Introduction

aci-pipelines-agent-linux

Azure DevOps Pipelines Self-Hosted Linux Agent in Azure Container Instance with basic private VNET connectivity

Reference Article: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/docker?view=azure-devops#linux

About

This project will build a docker container for an Azure DevOps Pipelines Self-Hosted Linux Agent which can be deployed to Azure Container Instances in a private VNET using the provided template.

This allows you to manage and update your Self Hosted agents as a set of ephimeral compute, yet can still reach inside the VNET to utilize internal pipeline integrations.

How to use

Issue a Azure DevOps PAT by following this article: https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows

Copy the PAT and save it in an Azure KeyVault as a Secret:

az keyvault secret set -n <secretName> --vault-name <keyVault Name> --value <PAT token value>

Make sure you denote the Key Vault Secret Name as it will be used as a parameter in the template deployment

Note: Ensure your PAT has access to write agent pools

The included Bicep template will build a container registry and a container image based on the published DOCKERFILE in this repository. It will automatically push the image to the container registry.

A subnet in a VNET needs to be delegated to the Azure Container Instance service for the VNET integration to work. The template assumes you have a VNET already. It will create a subnet to delegate the Container Instance service the correct permissions so the VNET integration will work. You can reference an existing subnet as well.

To deploy the agent containers to Azure, from the root of the project run:

az deployment group create -n <deploymentName> -g <resourceGroup> --template-file ./main.bicep --parameters ./yourparametersfile.json

An example parameters file is included in this repository

To Do

Windows Version awaiting VNET integration for Windows Containers

aci-pipelines-agent-linux's People

Contributors

everazurerest avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

danielshue

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.