Skip to content

Instantly share code, notes, and snippets.

View greatbody's full-sized avatar

Rui Sun greatbody

View GitHub Profile
@greatbody
greatbody / setup-agent-tools.sh
Last active September 9, 2026 10:07
setup-agent-tools.sh
#!/usr/bin/env bash
# Ubuntu 24.04 Azure VM/VMSS pipeline agent setup: Azure CLI + Docker Engine.
# Usage (as the agent user): curl -fsSL https://<host>/setup-agent-tools.sh | bash
# Also supports sudo bash; direct root execution uses Azure's AzDevOps account.
# Requires outbound HTTPS and passwordless sudo for non-root execution.
# Repeated runs verify existing tools without upgrading them or restarting Docker.
# Docker group/socket access is root-equivalent on this VM.
# Parse the complete block before starting, including when streamed into Bash.
{