Skip to content

Instantly share code, notes, and snippets.

@jakebrinkmann
Last active February 11, 2025 20:12
Show Gist options
  • Select an option

  • Save jakebrinkmann/ae14c47ee7fd77ec03f5f78879dedda9 to your computer and use it in GitHub Desktop.

Select an option

Save jakebrinkmann/ae14c47ee7fd77ec03f5f78879dedda9 to your computer and use it in GitHub Desktop.

Revisions

  1. jakebrinkmann revised this gist Feb 11, 2025. 2 changed files with 27 additions and 1 deletion.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -1 +1 @@
    .
    # setup-azure-devops-agent-self-hosted-on-linux-server
    26 changes: 26 additions & 0 deletions setup.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    #!/usr/bin/env bash
    INSTALL_PATH=~/.devops-agent
    mkdir -p $INSTALL_PATH

    URL='https://vstsagentpackage.azureedge.net/agent/4.251.0/vsts-agent-linux-x64-4.251.0.tar.gz'
    curl -O $URL
    FILENAME=$(readlink -f $(basename $URL))

    tar zxvf $FILENAME -C $INSTALL_PATH

    # NOTE: Need to make a Personal Access Token (PAT) with Agent Pool (read, manage) permissions
    cd $INSTALL_PATH
    ./config.sh \
    --unattended \
    --agent inhouse-linux-$USER-agent \
    --pool "In-House Deployments" \
    --url https://dev.azure.com/$AZ_ORGANIZATION_NAME \
    --auth PAT \
    --token $AZ_DEVOPS_PAT

    # Start the agent (interactive)
    ./run.sh

    # Start the agent (as a service)
    # needs devops-agent user
    sudo ./svc.sh install devops-agent
  2. jakebrinkmann created this gist Feb 11, 2025.
    1 change: 1 addition & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    .