Giter VIP home page Giter VIP logo

az-ado-self-hosted-agent's Introduction

Azure DevOps Self-Hosted Agent

Demo project for following the documentation for Linux.

To create the infrastructure:

terraform init
terraform apply -auto-approve

On Azure DevOps:

  1. Create a project
  2. Create a PAT with Agent Pools and Deployment permissions
  3. In Agent Pools, select the "Default" and Linux
  4. Follow the steps to install the agent
  5. Configure the agent as a service

When completed, the agent will be online:

Create a pipeline based on the app/azure-hello.yaml file in this repo. It is set up to use a self-hosted agent.

Run the pipeline.

๐Ÿ’ก You'll need to give permissions to the pipeline

Docker build/push to ACR

The pipeline app/azure-acr.yaml will build and deploy to ACR.

Create a service connect for Docker Registry and select the option "Others". Create the

Now create the pipeline that will build and push to ACR. Change the containerRegistry attribute as required.

steps:
- task: Docker@2
  inputs:
    containerRegistry: 'acr-docker-others'
    repository: 'myapp'
    command: 'buildAndPush'
    Dockerfile: '**/Dockerfile'

Deploy to a VM environment

Following the VM deploy environment docs, create an environment called "Production".

Register the VM as a resource, like vm-myapp-app.

Create the pipeline referencing app/azure-deploy.yaml with the ACR_ADMIN_PASSWORD secret.

Run the pipeline to pull and run the previously built image.

Develop the local Docker app

To check if the code in app directory is running:

docker build -t hello .
docker run --rm -p 3333:3333 hello

Reference

az-ado-self-hosted-agent's People

Contributors

epomatti avatar

Watchers

 avatar  avatar

Forkers

sathishphcl

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.