Skip to content

Files

Latest commit

657e2ed · Jun 3, 2022

History

History
149 lines (83 loc) · 10.2 KB

batch-account-create-portal.md

File metadata and controls

149 lines (83 loc) · 10.2 KB
title description ms.topic ms.date ms.custom
Create an account in the Azure portal
Learn how to create an Azure Batch account in the Azure portal to run large-scale parallel workloads in the cloud.
how-to
08/31/2021
subject-rbac-steps

Create a Batch account with the Azure portal

This topic shows how to create an Azure Batch account in the Azure portal, choosing the account properties that fit your compute scenario. You'll also learn where to find important account properties like access keys and account URLs.

For background about Batch accounts and scenarios, see Batch service workflow and resources.

Create a Batch account

[!INCLUDE batch-account-mode-include]

  1. Sign in to the Azure portal.

  2. From the home page, select Create a resource.

  3. In the Search box, enter Batch Service. Select Batch Service from the results, then select Create.

  4. Enter the following details.

    :::image type="content" source="media/batch-account-create-portal/batch-account-portal.png" alt-text="Screenshot of the New Batch account screen.":::

    a. Subscription: The subscription in which to create the Batch account. If you have only one subscription, it is selected by default.

    b. Resource group: Select an existing resource group for your new Batch account, or optionally create a new one.

    c. Account name: The name you choose must be unique within the Azure region where the account is created (see Location below). The account name can contain only lowercase characters or numbers, and must be 3-24 characters in length.

    d. Location: The Azure region in which to create the Batch account. Only the regions supported by your subscription and resource group are displayed as options.

    e. Storage account: An optional Azure Storage account that you associate with your Batch account. You can select an existing storage account, or create a new one. A general-purpose v2 storage account is recommended for the best performance.

    :::image type="content" source="media/batch-account-create-portal/storage_account.png" alt-text="Screenshot of the options when creating a storage account.":::

  5. If desired, select Advanced to specify Identity type, Pool allocation mode or Authentication mode. For most scenarios, the default options are fine.

  6. If desired, select Networking to configure public network access with your Batch account.

    :::image type="content" source="media/batch-account-create-portal/batch-account-networking.png" alt-text="Screenshot of the networking options when creating a Batch account.":::

  7. Select Review + create, then select Create to create the account.

View Batch account properties

Once the account has been created, select the account to access its settings and properties. You can access all account settings and properties by using the left menu.

Note

The name of the Batch account is its ID and can't be changed. If you need to change the name of a Batch account, you'll need to delete the account and create a new one with the intended name.

:::image type="content" source="media/batch-account-create-portal/batch-blade.png" alt-text="Screenshot of the Batch account page in the Azure portal.":::

When you develop an application with the Batch APIs, you need an account URL and key to access your Batch resources. (Batch also supports Azure Active Directory authentication.) To view the Batch account access information, select Keys.

:::image type="content" source="media/batch-account-create-portal/batch-account-keys.png" alt-text="Screenshot of Batch account keys in the Azure portal.":::

To view the name and keys of the storage account associated with your Batch account, select Storage account.

To view the resource quotas that apply to the Batch account, select Quotas.

Additional configuration for user subscription mode

If you choose to create a Batch account in user subscription mode, perform the following additional steps before creating the account.

Important

The user creating the Batch account in user subscription mode needs to have Contributor or Owner role assignment for the subscription in which the Batch account will be created.

Important

In user subscription mode, you have to accept the legal terms for the image before using the subscription. If you haven’t done this action before, you might get the error Allocation failed due to marketplace purchase eligibility when trying to allocate Batch nodes. For more information, see Accept legal terms.

Allow Azure Batch to access the subscription (one-time operation)

When creating your first Batch account in user subscription mode, you need to register your subscription with Batch. (If you already did this, skip to the next section.)

  1. Sign in to the Azure portal.

  2. Select All services > Subscriptions, and select the subscription you want to use for the Batch account.

  3. In the Subscription page, select Resource providers, and search for Microsoft.Batch. Check that the Microsoft.Batch resource provider is registered in the subscription. If it's not, select the Register link near the top of the screen.

    :::image type="content" source="media/batch-account-create-portal/register_provider.png" alt-text="Screenshot showing the Microsoft.Batch resource provider.":::

  4. Return to the Subscription page, then select Access control (IAM).

  5. Assign the Contributor or Owner role to the Batch API. You can find this account by searching for Microsoft Azure Batch. (The Application ID for this account is ddbf3205-c6bd-46ae-8127-60eb93363864.)

    For detailed steps, see Assign Azure roles using the Azure portal.

Create a Key Vault

In user subscription mode, an Azure Key Vault is required. The Key Vault must be in the same subscription and region as the Batch account to be created.

  1. From the home page of the Azure portal, select Create a resource.
  2. In the Search box, enter Key Vault. Select Key Vault from the results and then select Create.
  3. In the Create key vault page, enter a name for the Key Vault, and create a new resource group in the same region you want for your Batch account. Leave the remaining settings at default values, then select Create.

When creating the Batch account in user subscription mode, specify User subscription as the pool allocation mode, select the Key Vault you created, and check the box to grant Azure Batch access to the Key Vault.

If you prefer to grant access to the Key Vault manually, go to the Access policies section of the Key Vault and select Add Access Policy. Select the link next to Select principal and search for Microsoft Azure Batch (Application ID ddbf3205-c6bd-46ae-8127-60eb93363864). Select that principal, then configure the Secret permissions using the drop-down menu. Azure Batch must be given a minimum of Get, List, Set, and Delete permissions. For Key Vaults with soft-delete enabled, Azure Batch must also be given Recover permission.

:::image type="content" source="media/batch-account-create-portal/secret-permissions.png" alt-text="Screenshot of the Secret permissions selections for Azure Batch":::

Select Add, then ensure that the Azure Virtual Machines for deployment and Azure Resource Manager for template deployment check boxes are selected for the linked Key Vault resource. Select Save to commit your changes.

:::image type="content" source="media/batch-account-create-portal/key-vault-access-policy.png" alt-text="Screenshot of the Access policy screen.":::

Configure subscription quotas

For user subscription Batch accounts, core quotas must be set manually. Standard Batch core quotas do not apply to accounts in user subscription mode, and the quotas in your subscription for regional compute cores, per-series compute cores, and other resources are used and enforced.

  1. In the Azure portal, select your user subscription mode Batch account to display its settings and properties.
  2. From the left menu, select Quotas to view and configure the core quotas associated with your Batch account.

Accept legal terms

In user subscription mode, you need to accept the legal terms for the image before using the subscription. To accept these legal terms, run the commands Get-AzMarketplaceTerms and Set-AzMarketplaceTerms in PowerShell.

Make sure to set the following parameters based on your Batch pool's configuration:

  • Publisher: the image's publisher
  • Product: the image offer
  • Name: the offer SKU

For example:

Get-AzMarketplaceTerms -Publisher 'microsoft-azure-batch' -Product 'ubuntu-server-container' -Name '20-04-lts' | Set-AzMarketplaceTerms -Accept

Other Batch account management options

In addition to using the Azure portal, you can create and manage Batch accounts with tools including the following:

Next steps

  • Learn about the Batch service workflow and primary resources such as pools, nodes, jobs, and tasks.
  • Learn the basics of developing a Batch-enabled application using the Batch .NET client library or Python. These quickstarts guide you through a sample application that uses the Batch service to execute a workload on multiple compute nodes, using Azure Storage for workload file staging and retrieval.