azure
Azure cloud deployment and configuration scripts.
Use it on boxctl
- On the dashboard, pick azure in the Template picker and click Boot box.
- The box boots, then runs
azure/agent-pool.shon itself. The button reads Booting… until the script has finished. - Open the box's Terminal and follow the guide below. The box's row keeps a link back to this page under the template's name.
The guide is shared with the onctl CLI, so it starts from an onctl up -a azure/agent-pool.sh command. Booting a box with this template replaces that command; everything the guide runs on the VM itself applies as written.
Options
This template needs
TOKEN,URLandAGENT_POOL_NAME, and boxctl cannot pass options to a template yet. Booted from the dashboard, its script runs without them.
| Option | Required | What it sets |
|---|---|---|
TOKEN | Yes | Azure DevOps personal access token. |
URL | Yes | Azure DevOps organization URL, e.g. https://dev.azure.com/<org>. |
AGENT_POOL_NAME | Yes | Agent pool to register into. |
AGENT_NAME | No | Agent name (default: hostname). |
Azure DevOps self-hosted Agents
using .env file
- Create a dot-env file.
copy
.env.exampleto ".env.test" and fill in your variables:TOKEN=<Yout_PAT_token> AGENT_POOL_NAME=<POOL_NAME> URL=https://dev.azure.com/<ORG_NAME> - Run onctl command with --dot-env parameter.
onctl up -n agent1 -a azure/agent-pool.sh --dot-env .env.test
parameters in command line
onctl up -n agent1 -a azure/agent-pool.sh -e TOKEN=<Yout_PAT_token> -e AGENT_NAME=<unique_name> -e AGENT_POOL_NAME=<POOL_NAME> -e URL=https://dev.azure.com/<ORG_NAME>
See the template's source for exactly what it runs.