Skip to content

Commit bf16332

Browse files
authored
Merge pull request #273980 from mbender-ms/lb-ado250009
load balancer - Update ILB ARM/BICEP quickstart
2 parents 1c22e04 + ea2f4f0 commit bf16332

4 files changed

+92
-45
lines changed

articles/load-balancer/quickstart-load-balancer-standard-internal-bicep.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.custom: template-quickstart, subject-armqs, mode-arm, devx-track-bicep,engage
1212

1313
# Quickstart: Create an internal load balancer to load balance VMs using Bicep
1414

15-
This quickstart describes how to use Bicep to create an internal Azure load balancer.
15+
In this quickstart, you learn to use a BICEP file to create an internal; Azure load balancer. The internal load balancer distributes traffic to virtual machines in a virtual network located in the load balancer's backend pool. Along with the internal load balancer, this template creates a virtual network, network interfaces, a NAT Gateway, and an Azure Bastion instance.
1616

1717
:::image type="content" source="media/quickstart-load-balancer-standard-internal-portal/internal-load-balancer-resources.png" alt-text="Diagram of resources deployed for internal load balancer.":::
1818

@@ -24,18 +24,21 @@ If you don't have an Azure subscription, create a [free account](https://azure.m
2424

2525
## Review the Bicep file
2626

27-
The Bicep file used in this quickstart is from the [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/2-vms-internal-load-balancer/).
27+
The Bicep file used in this quickstart is from the [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/internal-loadbalancer-create/main.bicep).
2828

29-
:::code language="bicep" source="~/quickstart-templates/quickstarts/microsoft.compute/2-vms-internal-load-balancer/main.bicep":::
29+
:::code language="bicep" source="~/quickstart-templates/quickstarts/microsoft.network/internal-loadbalancer-create/main.bicep":::
3030

3131
Multiple Azure resources have been defined in the Bicep file:
3232

33-
- [**Microsoft.Storage/storageAccounts**](/azure/templates/microsoft.storage/storageaccounts): Virtual machine storage accounts for boot diagnostics.
34-
- [**Microsoft.Compute/availabilitySets**](/azure/templates/microsoft.compute/availabilitySets): Availability set for virtual machines.
3533
- [**Microsoft.Network/virtualNetworks**](/azure/templates/microsoft.network/virtualNetworks): Virtual network for load balancer and virtual machines.
3634
- [**Microsoft.Network/networkInterfaces**](/azure/templates/microsoft.network/networkInterfaces): Network interfaces for virtual machines.
3735
- [**Microsoft.Network/loadBalancers**](/azure/templates/microsoft.network/loadBalancers): Internal load balancer.
38-
- [**Microsoft.Compute/virtualMachines**](/azure/templates/microsoft.compute/virtualMachines): Virtual machines.
36+
- [**Microsoft.Network/natGateways**](/azure/templates/microsoft.network/natGateways)
37+
- [**Microsoft.Network/publicIPAddresses**](/azure/templates/microsoft.network/publicipaddresses): Public IP addresses for the NAT Gateway and Azure Bastion.
38+
- [**Microsoft.Compute/virtualMachines**](/azure/templates/microsoft.compute/virtualmachines): Virtual machines in the backend pool.
39+
- [**Microsoft.Network/bastionHosts**](/azure/templates/microsoft.network/bastionhosts): Azure Bastion instance.
40+
- [**Microsoft.Network/virtualNetworks/subnets**](/azure/templates/microsoft.network/virtualnetworks/subnets): Subnets for the virtual network.
41+
- [**Microsoft.Storage/storageAccounts**](/azure/templates/microsoft.storage/storageaccounts): Storage account for the virtual machines.
3942

4043
## Deploy the Bicep file
4144

articles/load-balancer/quickstart-load-balancer-standard-internal-template.md

Lines changed: 80 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,86 +6,136 @@ author: mbender-ms
66
ms.service: load-balancer
77
ms.topic: quickstart
88
ms.author: mbender
9-
ms.date: 05/01/2023
9+
ms.date: 05/08/2024
1010
ms.custom: subject-armqs, mode-arm, template-quickstart, engagement-fy23, devx-track-arm-template
1111
---
1212

1313
# Quickstart: Create an internal load balancer to load balance VMs using an ARM template
1414

15-
This quickstart describes how to use an Azure Resource Manager template (ARM template) to create an internal Azure load balancer.
15+
In this quickstart, you learn to use an Azure Resource Manager template (ARM template) to create an internal Azure load balancer. The internal load balancer distributes traffic to virtual machines in a virtual network located in the load balancer's backend pool. Along with the internal load balancer, this template creates a virtual network, network interfaces, a NAT Gateway, and an Azure Bastion instance.
1616

17-
:::image type="content" source="media/quickstart-load-balancer-standard-internal-portal/internal-load-balancer-resources.png" alt-text="Diagram of resources deployed for internal load balancer.":::
17+
:::image type="content" source="media/quickstart-load-balancer-standard-public-portal/public-load-balancer-resources.png" alt-text="Diagram of resources deployed for a standard public load balancer." lightbox="media/quickstart-load-balancer-standard-public-portal/public-load-balancer-resources.png":::
1818

19+
Using an ARM template takes fewer steps comparing to other deployment methods.
1920

2021
[!INCLUDE [About Azure Resource Manager](../../includes/resource-manager-quickstart-introduction.md)]
2122

2223
If your environment meets the prerequisites and you're familiar with using ARM templates, select the **Deploy to Azure** button. The template opens in the Azure portal.
2324

24-
:::image type="content" source="~/reusable-content/ce-skilling/azure/media/template-deployments/deploy-to-azure-button.svg" alt-text="Button to deploy the Resource Manager template to Azure." border="false" link="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fquickstarts%2Fmicrosoft.compute%2F2-vms-internal-load-balancer%2Fazuredeploy.json":::
25+
:::image type="content" source="~/reusable-content/ce-skilling/azure/media/template-deployments/deploy-to-azure-button.svg" alt-text="Button to deploy the Resource Manager template to Azure." border="false" link="https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2Fquickstarts%2Fmicrosoft.network%2Finternal-loadbalancer-create%2Fazuredeploy.json":::
2526

2627
## Prerequisites
2728

2829
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
2930

3031
## Review the template
3132

32-
The template used in this quickstart is from the [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/2-vms-internal-load-balancer/).
33+
The template used in this quickstart is from the [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/internal-loadbalancer-create/).
3334

34-
:::code language="json" source="~/quickstart-templates/quickstarts/microsoft.compute/2-vms-internal-load-balancer/azuredeploy.json":::
35+
:::code language="json" source="~/quickstart-templates/quickstarts/microsoft.network/internal-loadbalancer-create/azuredeploy.json":::
3536

3637
Multiple Azure resources have been defined in the template:
3738

38-
- [**Microsoft.Storage/storageAccounts**](/azure/templates/microsoft.storage/storageaccounts): Virtual machine storage accounts for boot diagnostics.
39-
- [**Microsoft.Compute/availabilitySets**](/azure/templates/microsoft.compute/availabilitySets): Availability set for virtual machines.
4039
- [**Microsoft.Network/virtualNetworks**](/azure/templates/microsoft.network/virtualNetworks): Virtual network for load balancer and virtual machines.
4140
- [**Microsoft.Network/networkInterfaces**](/azure/templates/microsoft.network/networkInterfaces): Network interfaces for virtual machines.
4241
- [**Microsoft.Network/loadBalancers**](/azure/templates/microsoft.network/loadBalancers): Internal load balancer.
43-
- [**Microsoft.Compute/virtualMachines**](/azure/templates/microsoft.compute/virtualMachines): Virtual machines.
42+
- [**Microsoft.Network/natGateways**](/azure/templates/microsoft.network/natGateways)
43+
- [**Microsoft.Network/publicIPAddresses**](/azure/templates/microsoft.network/publicipaddresses): Public IP addresses for the NAT Gateway and Azure Bastion.
44+
- [**Microsoft.Compute/virtualMachines**](/azure/templates/microsoft.compute/virtualmachines): Virtual machines in the backend pool.
45+
- [**Microsoft.Network/bastionHosts**](/azure/templates/microsoft.network/bastionhosts): Azure Bastion instance.
46+
- [**Microsoft.Network/virtualNetworks/subnets**](/azure/templates/microsoft.network/virtualnetworks/subnets): Subnets for the virtual network.
47+
- [**Microsoft.Storage/storageAccounts**](/azure/templates/microsoft.storage/storageaccounts): Storage account for the virtual machines.
4448

4549
To find more templates that are related to Azure Load Balancer, see [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/?resourceType=Microsoft.Network&pageNumber=1&sort=Popular).
4650

4751
## Deploy the template
4852

49-
**Azure CLI**
53+
In this step, you deploy the template using Azure PowerShell with the `[New-AzResourceGroupDeployment](/powershell/module/az.resources/new-azresourcegroupdeployment)` command.
5054

51-
```azurecli-interactive
52-
read -p "Enter the location (i.e. westcentralus): " location
53-
resourceGroupName="myResourceGroupLB"
54-
templateUri="https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.compute/2-vms-internal-load-balancer/azuredeploy.json"
55+
1. Select **Try it** from the following code block to open Azure Cloud Shell, and then follow the instructions to sign in to Azure.
5556

56-
az group create \
57-
--name $resourceGroupName \
58-
--location $location
57+
1. Deploy the Bicep file using either Azure CLI or Azure PowerShell.
5958

60-
az deployment group create \
61-
--resource-group $resourceGroupName \
62-
--template-uri $templateUri
63-
```
59+
# [CLI](#tab/CLI)
60+
61+
```azurecli
62+
echo "Enter a project name with 12 or less letters or numbers that is used to generate Azure resource names"
63+
read projectName
64+
echo "Enter the location (i.e. centralus)"
65+
read location
66+
67+
resourceGroupName="${projectName}rg"
68+
templateUri="https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.network/internal-loadbalancer-create/azuredeploy.json"
69+
70+
az group create --name $resourceGroupName --location $location
71+
az deployment group create --resource-group $resourceGroupName --template-uri $templateUri --name $projectName --parameters location=$location
72+
73+
read -p "Press [ENTER] to continue."
74+
```
75+
76+
# [PowerShell](#tab/PowerShell)
77+
78+
```azurepowershell
79+
$projectName = Read-Host -Prompt "Enter a project name with 12 or less letters or numbers that is used to generate Azure resource names"
80+
$location = Read-Host -Prompt "Enter the location (i.e. centralus)"
81+
82+
$resourceGroupName = "${projectName}rg"
83+
$templateUri = "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.network/internal-loadbalancer-create/azuredeploy.json"
84+
85+
New-AzResourceGroup -Name $resourceGroupName -Location $location
86+
New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri $templateUri -Name $projectName -location $location
87+
88+
Write-Host "Press [ENTER] to continue."
89+
```
90+
---
91+
92+
You're prompted to enter the following values:
93+
94+
- **projectName**: used for generating resource names.
95+
- **adminUsername**: virtual machine administrator username.
96+
- **adminPassword**: virtual machine administrator password.
97+
98+
It takes about 10 minutes to deploy the template.
99+
100+
Azure PowerShell or Azure CLI is used to deploy the template. You can also use the Azure portal and REST API. To learn other deployment methods, see [Deploy templates](../azure-resource-manager/templates/deploy-portal.md).
64101
65102
## Review deployed resources
66103
67-
1. Sign in to the [Azure portal](https://portal.azure.com).
104+
Use Azure CLI or Azure PowerShell to list the deployed resources in the resource group with the following commands:
68105
69-
1. Select **Resource groups** from the left pane.
106+
# [CLI](#tab/CLI)
70107
71-
1. Select the resource group that you created in the previous section. The default resource group name is **myResourceGroupLB**
108+
```azurecli-interactive
109+
az resource list --resource-group $resourceGroupName
110+
```
111+
# [PowerShell](#tab/PowerShell)
72112

73-
1. Verify the following resources were created in the resource group:
113+
```azurepowershell-interactive
114+
Get-AzResource -ResourceGroupName $resourceGroupName
115+
```
74116

75-
:::image type="content" source="media/quickstart-load-balancer-standard-internal-template/verify-creation.png" alt-text="User Azure portal to verify creation of resources." border="true":::
117+
---
76118

77119
## Clean up resources
78120

79-
When no longer needed, you can use the [az group delete](/cli/azure/group#az-group-delete) command to remove the resource group and all resources contained within.
121+
When no longer needed, use Azure CLI or Azure PowerShell to delete the resource group and its resources with the following commands:
122+
123+
# [CLI](#tab/CLI)
80124

81125
```azurecli-interactive
82-
az group delete \
83-
--name myResourceGroupLB
126+
Remove-AzResourceGroup -Name "${projectName}rg"
84127
```
85128

129+
# [PowerShell](#tab/PowerShell)
130+
131+
```azurepowershell-interactive
132+
Remove-AzResourceGroup -Name CreateIntLBQS-rg
133+
```
134+
---
135+
86136
## Next steps
87137

88138
For a step-by-step tutorial that guides you through the process of creating a template, see:
89139

90140
> [!div class="nextstepaction"]
91-
> [Tutorial: Create and deploy your first ARM template](../azure-resource-manager/templates/template-tutorial-create-first-template.md)
141+
> [Tutorial: Create and deploy your first ARM template](../azure-resource-manager/templates/template-tutorial-create-first-template.md)

articles/load-balancer/quickstart-load-balancer-standard-public-bicep.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ ms.custom: mvc, subject-bicepqs, mode-arm, template-quickstart, devx-track-bicep
1414

1515
# Quickstart: Create a public load balancer to load balance VMs using a Bicep file
1616

17-
Load balancing provides a higher level of availability and scale by spreading incoming requests across multiple virtual machines (VMs).
18-
19-
This quickstart shows you how to deploy a standard load balancer to load balance virtual machines.
17+
In this quickstart, you learn to use a BICEP file to create a public Azure load balancer. The public load balancer distributes traffic to virtual machines in a virtual network located in the load balancer's backend pool. Along with the public load balancer, this template creates a virtual network, network interfaces, a NAT Gateway, and an Azure Bastion instance.
2018

2119
:::image type="content" source="media/quickstart-load-balancer-standard-public-portal/public-load-balancer-resources.png" alt-text="Diagram of resources deployed for a standard public load balancer." lightbox="media/quickstart-load-balancer-standard-public-portal/public-load-balancer-resources.png":::
2220

@@ -71,7 +69,6 @@ To find more Bicep files or ARM templates that are related to Azure Load Balance
7169
New-AzResourceGroup -Name exampleRG -Location EastUS
7270
New-AzResourceGroupDeployment -ResourceGroupName exampleRG -TemplateFile ./main.bicep
7371
```
74-
7572
---
7673
7774
> [!NOTE]

articles/load-balancer/quickstart-load-balancer-standard-public-template.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ ms.custom: mvc, subject-armqs, mode-arm, template-quickstart, engagement-fy23, d
1515

1616
# Quickstart: Create a public load balancer to load balance VMs using an ARM template
1717

18-
Load balancing provides a higher level of availability and scale by spreading incoming requests across multiple virtual machines (VMs).
19-
20-
This quickstart shows you how to deploy a standard load balancer to load balance virtual machines.
18+
This quickstart shows you how to deploy a standard load balancer to load balance virtual machines. The load balancer distributes traffic across multiple virtual machines in a backend pool. The template also creates a virtual network, network interfaces, a NAT Gateway, and an Azure Bastion instance.
2119

2220
:::image type="content" source="media/quickstart-load-balancer-standard-public-portal/public-load-balancer-resources.png" alt-text="Diagram of resources deployed for a standard public load balancer." lightbox="media/quickstart-load-balancer-standard-public-portal/public-load-balancer-resources.png":::
2321

@@ -57,7 +55,6 @@ Multiple Azure resources have been defined in the template:
5755
5856
> [!INCLUDE [Pricing](../../includes/bastion-pricing.md)]
5957
60-
>
6158

6259
To find more templates that are related to Azure Load Balancer, see [Azure Quickstart Templates](https://azure.microsoft.com/resources/templates/?resourceType=Microsoft.Network&pageNumber=1&sort=Popular).
6360

@@ -75,7 +72,7 @@ To find more templates that are related to Azure Load Balancer, see [Azure Quick
7572
$templateUri = "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/quickstarts/microsoft.network/load-balancer-standard-create/azuredeploy.json"
7673
7774
New-AzResourceGroup -Name $resourceGroupName -Location $location
78-
New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri $templateUri -projectName $projectName -location $location -adminUsername $adminUsername -adminPassword $adminPassword
75+
New-AzResourceGroupDeployment -ResourceGroupName $resourceGroupName -TemplateUri $templateUri -Name $projectName -location $location -adminUsername $adminUsername -adminPassword $adminPassword
7976
8077
Write-Host "Press [ENTER] to continue."
8178
```

0 commit comments

Comments
 (0)