algo

Azure cloud setup

The easiest way to get started with the Azure CLI is by running it in an Azure Cloud Shell environment through your browser.

Here you can find some information from the official doc. We put the essential commands together for simplest usage.

Install azure-cli

If your OS is missing or to get more information, see the official doc

Sign in

  1. Run the login command:
    az login
    

If the CLI can open your default browser, it will do so and load a sign-in page.

Otherwise, you need to open a browser page and follow the instructions on the command line to enter an authorization code after navigating to https://aka.ms/devicelogin in your browser.

  1. Sign in with your account credentials in the browser.

There are ways to sign in non-interactively, which are covered in detail in Sign in with Azure CLI.

Select a subscription and region

Algo uses azure_subscription_id when supplied, then AZURE_SUBSCRIPTION_ID, then the active Azure CLI subscription. To choose the CLI subscription, run:

az account set --subscription SUBSCRIPTION_ID

For service principal authentication, set azure_client_id, azure_secret, azure_tenant, and azure_subscription_id, or their AZURE_* environment variables. The subscription must allow reading its locations and creating the deployment’s resources.

Algo loads the subscription’s current physical regions and excludes staging and preview regions. The menu defaults to East US when available, otherwise its first listed region. A region can also be supplied with region. VM size availability and quotas still vary by subscription and region; adjust cloud_providers.azure.size in config.cfg if Azure rejects the selected size.

Algo installs the Azure Python dependencies from uv.lock. Their versions match the Azure Ansible collection pinned in requirements.yml; upgrading individual Azure SDK packages can break collection imports. Update and test the collection and SDK versions together.