Skip to content

Latest commit

 

History

History
101 lines (64 loc) · 3.42 KB

quick-create-bicep.md

File metadata and controls

101 lines (64 loc) · 3.42 KB
title description author ms.date ms.topic ms.author ms.custom tags
Azure Quickstart - Create a Batch account - Bicep file
This quickstart shows how to create a Batch account by using a Bicep file.
FuzziWumpus
04/11/2023
quickstart
padmalathas
subject-armqs, mode-arm, devx-track-bicep
azure-resource-manager, bicep

Quickstart: Create a Batch account by using a Bicep file

Get started with Azure Batch by using a Bicep file to create a Batch account, including storage. You need a Batch account to create compute resources (pools of compute nodes) and Batch jobs. You can link an Azure Storage account with your Batch account, which is useful to deploy applications and store input and output data for most real-world workloads.

After completing this quickstart, you'll understand the key concepts of the Batch service and be ready to try Batch with more realistic workloads at larger scale.

[!INCLUDE About Bicep]

Prerequisites

You must have an active Azure subscription.

Review the Bicep file

The Bicep file used in this quickstart is from Azure Quickstart Templates.

:::code language="bicep" source="~/quickstart-templates/quickstarts/microsoft.batch/batchaccount-with-storage/main.bicep":::

Two Azure resources are defined in the Bicep file:

Deploy the Bicep file

  1. Save the Bicep file as main.bicep to your local computer.

  2. Deploy the Bicep file using either Azure CLI or Azure PowerShell.

    az group create --name exampleRG --location eastus
    az deployment group create --resource-group exampleRG --template-file main.bicep
    
    New-AzResourceGroup -Name exampleRG -Location eastus
    New-AzResourceGroupDeployment -ResourceGroupName exampleRG -TemplateFile ./main.bicep
    

    When the deployment finishes, you should see a message indicating the deployment succeeded.

Validate the deployment

Use the Azure portal, Azure CLI, or Azure PowerShell to list the deployed resources in the resource group.

az resource list --resource-group exampleRG
Get-AzResource -ResourceGroupName exampleRG

Clean up resources

If you plan to continue on with more of our tutorials, you may want to leave these resources in place. When no longer needed, use the Azure portal, Azure CLI, or Azure PowerShell to delete the resource group and all of its resources.

az group delete --name exampleRG
Remove-AzResourceGroup -Name exampleRG

Next steps

In this quickstart, you created a Batch account and a storage account using Bicep. To learn more about Azure Batch, continue to the Azure Batch tutorials.

[!div class="nextstepaction"] Azure Batch tutorials