Toolkit to run azure agents under linux
Helps running azure-pipeline self-hosted agents.
Features
--once
mode to run the agents with automatic workdir
cleanup and restart
after job-endThis is not
The run-once mode is based on Microsoft's ./run.sh --once
which ensures that an agent only runs 1 job and then stops.
This is used to
This fixes issues like
Requirements
For examples, sets up and starts one agent called agent0
for the pool Default
enabling the run-once
mode
./agent-setup agent0 <PAT> Default 1
You can also add an additional agent, with an MTU (for the docker network) of 1400
./agent-setup agent1 <PAT> Default 1 1400
X agents, creates 15 agents (agent0....agent14) in the pool Default with an MTU of 1400
./batch-setup.sh 0 15 <PAT> Default 1 1400
The below commands does uninstall
So there should be nothing left after running this for one agent.
./agent-uninstall agent0 <PAT>
Uninstalls agent 0..14 from the Default pool
./batch-uninstall.sh 0 15 <PAT> Default
Bug in the agent, see https://github.com/microsoft/azure-pipelines-agent/issues/4215 workaround by blocking the network request
sudo ip route add blackhole 169.254.169.254
This sends the stalling requests into a direct-drop gw and speeds up the start by 100s.
Anytime, just open PRs. Happy to extend whatever we have here.