Skip to content

Commit fb3695b

Browse files
author
Michael Bender
committed
acrolinx and additional articles
1 parent 5f9c45f commit fb3695b

4 files changed

+54
-51
lines changed

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

Lines changed: 44 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ description: This quickstart shows how to create an internal load balancer using
55
author: mbender-ms
66
ms.service: load-balancer
77
ms.topic: quickstart
8-
ms.date: 05/31/2023
8+
ms.date: 07/23/2024
99
ms.author: mbender
1010
ms.custom: devx-track-azurepowershell, mode-api, template-quickstart
1111
#Customer intent: I want to create a load balancer so that I can load balance internal traffic to VMs.
1212
---
1313

14-
# Quickstart: Create an internal load balancer to load balance VMs using Azure PowerShell
14+
# Quickstart: Create an internal load balancer to load balance virtual machines using Azure PowerShell
1515

16-
Get started with Azure Load Balancer by using Azure PowerShell to create an internal load balancer and two virtual machines.Additional resources include Azure Bastion, NAT Gateway, a virtual network, and the required subnets.
16+
Get started with Azure Load Balancer creating an internal load balancer and two virtual machines with Azure PowerShell. Also, you deploy other resources including Azure Bastion, NAT Gateway, a virtual network, and the required subnets.
1717

1818
:::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." lightbox="media/quickstart-load-balancer-standard-internal-portal/internal-load-balancer-resources.png":::
1919

@@ -32,7 +32,11 @@ An Azure resource group is a logical container into which Azure resources are de
3232
Create a resource group with [New-AzResourceGroup](/powershell/module/az.resources/new-azresourcegroup).
3333

3434
```azurepowershell-interactive
35-
New-AzResourceGroup -Name 'CreateIntLBQS-rg' -Location 'eastus'
35+
$rg = @{
36+
Name = 'CreateINTLBQS-rg'
37+
Location = 'westus2'
38+
}
39+
New-AzResourceGroup @rg
3640
```
3741

3842
## Configure virtual network
@@ -55,8 +59,8 @@ Use [New-AzPublicIpAddress](/powershell/module/az.network/new-azpublicipaddress)
5559
## Create public IP address for NAT gateway and place IP in variable ##
5660
$gwpublicip = @{
5761
Name = 'myNATgatewayIP'
58-
ResourceGroupName = 'CreateIntLBQS-rg'
59-
Location = 'eastus'
62+
ResourceGroupName = $rg.name
63+
Location = 'westus2'
6064
Sku = 'Standard'
6165
AllocationMethod = 'static'
6266
Zone = 1,2,3
@@ -70,8 +74,8 @@ To create a zonal public IP address in zone 1, use the following command:
7074
## Create a zonal public IP address for NAT gateway and place IP in variable ##
7175
$gwpublicip = @{
7276
Name = 'myNATgatewayIP'
73-
ResourceGroupName = 'CreateIntLBQS-rg'
74-
Location = 'eastus'
77+
ResourceGroupName = $rg.name
78+
Location = 'westus2'
7579
Sku = 'Standard'
7680
AllocationMethod = 'static'
7781
Zone = 1
@@ -101,11 +105,11 @@ $gwpublicip = New-AzPublicIpAddress @gwpublicip
101105
102106
## Create NAT gateway resource ##
103107
$nat = @{
104-
ResourceGroupName = 'CreateIntLBQS-rg'
108+
ResourceGroupName = $rg.name
105109
Name = 'myNATgateway'
106110
IdleTimeoutInMinutes = '10'
107111
Sku = 'Standard'
108-
Location = 'eastus'
112+
Location = 'westus2'
109113
PublicIpAddress = $gwpublicip
110114
}
111115
$natGateway = New-AzNatGateway @nat
@@ -128,8 +132,8 @@ $bastsubnetConfig = New-AzVirtualNetworkSubnetConfig @bastsubnet
128132
## Create the virtual network ##
129133
$net = @{
130134
Name = 'myVNet'
131-
ResourceGroupName = 'CreateIntLBQS-rg'
132-
Location = 'eastus'
135+
ResourceGroupName = $rg.name
136+
Location = 'westus2'
133137
AddressPrefix = '10.1.0.0/16'
134138
Subnet = $subnetConfig,$bastsubnetConfig
135139
}
@@ -138,16 +142,16 @@ $vnet = New-AzVirtualNetwork @net
138142
## Create public IP address for bastion host. ##
139143
$bastionip = @{
140144
Name = 'myBastionIP'
141-
ResourceGroupName = 'CreateIntLBQS-rg'
142-
Location = 'eastus'
145+
ResourceGroupName = $rg.name
146+
Location = 'westus2'
143147
Sku = 'Standard'
144148
AllocationMethod = 'Static'
145149
}
146150
$bastionip = New-AzPublicIpAddress @bastionip
147151
148152
## Create bastion host ##
149153
$bastion = @{
150-
ResourceGroupName = 'CreateIntLBQS-rg'
154+
ResourceGroupName = $rg.name
151155
Name = 'myBastion'
152156
PublicIpAddress = $bastionip
153157
VirtualNetwork = $vnet
@@ -172,8 +176,8 @@ $rule1 = New-AzNetworkSecurityRuleConfig @nsgrule
172176
## Create network security group ##
173177
$nsg = @{
174178
Name = 'myNSG'
175-
ResourceGroupName = 'CreateIntLBQS-rg'
176-
Location = 'eastus'
179+
ResourceGroupName = $rg.name
180+
Location = 'westus2'
177181
SecurityRules = $rule1
178182
}
179183
New-AzNetworkSecurityGroup @nsg
@@ -197,7 +201,7 @@ This section details how you can create and configure the following components o
197201
## Place virtual network created in previous step into a variable. ##
198202
$net = @{
199203
Name = 'myVNet'
200-
ResourceGroupName = 'CreateIntLBQS-rg'
204+
ResourceGroupName = $rg.name
201205
}
202206
$vnet = Get-AzVirtualNetwork @net
203207
@@ -236,9 +240,9 @@ $rule = New-AzLoadBalancerRuleConfig @lbrule -EnableTcpReset
236240
237241
## Create the load balancer resource. ##
238242
$loadbalancer = @{
239-
ResourceGroupName = 'CreateIntLBQS-rg'
243+
ResourceGroupName = $rg.name
240244
Name = 'myLoadBalancer'
241-
Location = 'eastus'
245+
Location = 'westus2'
242246
Sku = 'Standard'
243247
FrontendIpConfiguration = $feip
244248
BackendAddressPool = $bePool
@@ -276,32 +280,32 @@ $cred = Get-Credential
276280
## Place virtual network created in previous step into a variable. ##
277281
$net = @{
278282
Name = 'myVNet'
279-
ResourceGroupName = 'CreateIntLBQS-rg'
283+
ResourceGroupName = $rg.name
280284
}
281285
$vnet = Get-AzVirtualNetwork @net
282286
283287
## Place the load balancer into a variable. ##
284288
$lb = @{
285289
Name = 'myLoadBalancer'
286-
ResourceGroupName = 'CreateIntLBQS-rg'
290+
ResourceGroupName = $rg.name
287291
}
288292
$bepool = Get-AzLoadBalancer @lb | Get-AzLoadBalancerBackendAddressPoolConfig
289293
290294
## Place the network security group into a variable. ##
291-
$sg = {
295+
$sg = @{
292296
Name = 'myNSG'
293-
ResourceGroupName = 'CreateIntLBQS-rg' @sg
297+
ResourceGroupName = $rg.name
294298
}
295-
$nsg = Get-AzNetworkSecurityGroup
299+
$nsg = Get-AzNetworkSecurityGroup @sg
296300
297301
## For loop with variable to create virtual machines for load balancer backend pool. ##
298302
for ($i=1; $i -le 2; $i++)
299303
{
300304
## Command to create network interface for VMs ##
301305
$nic = @{
302306
Name = "myNicVM$i"
303-
ResourceGroupName = 'CreateIntLBQS-rg'
304-
Location = 'eastus'
307+
ResourceGroupName = $rg.name
308+
Location = 'westus2'
305309
Subnet = $vnet.Subnets[0]
306310
NetworkSecurityGroup = $nsg
307311
LoadBalancerBackendAddressPool = $bepool
@@ -330,8 +334,8 @@ for ($i=1; $i -le 2; $i++)
330334
331335
## Create the virtual machine for VMs ##
332336
$vm = @{
333-
ResourceGroupName = 'CreateIntLBQS-rg'
334-
Location = 'eastus'
337+
ResourceGroupName = $rg.name
338+
Location = 'westus2'
335339
VM = $vmConfig
336340
Zone = "$i"
337341
}
@@ -370,9 +374,9 @@ for ($i=1; $i -le 2; $i++)
370374
Publisher = 'Microsoft.Compute'
371375
ExtensionType = 'CustomScriptExtension'
372376
ExtensionName = 'IIS'
373-
ResourceGroupName = 'CreateIntLBQS-rg'
377+
ResourceGroupName = $rg.name
374378
VMName = "myVM$i"
375-
Location = 'eastus'
379+
Location = 'westus2'
376380
TypeHandlerVersion = '1.8'
377381
SettingString = '{"commandToExecute":"powershell Add-WindowsFeature Web-Server; powershell Add-Content -Path \"C:\\inetpub\\wwwroot\\Default.htm\" -Value $($env:computername)"}'
378382
}
@@ -414,22 +418,22 @@ $cred = Get-Credential
414418
## Place the virtual network into a variable. ##
415419
$net = @{
416420
Name = 'myVNet'
417-
ResourceGroupName = 'CreateIntLBQS-rg'
421+
ResourceGroupName = $rg.name
418422
}
419423
$vnet = Get-AzVirtualNetwork @net
420424
421425
## Place the network security group into a variable. ##
422-
$sg = {
426+
$sg = @{
423427
Name = 'myNSG'
424-
ResourceGroupName = 'CreateIntLBQS-rg' @sg
428+
ResourceGroupName = $rg.name
425429
}
426-
$nsg = Get-AzNetworkSecurityGroup
430+
$nsg = Get-AzNetworkSecurityGroup @sg
427431
428432
## Command to create network interface for VM ##
429433
$nic = @{
430434
Name = "myNicTestVM"
431-
ResourceGroupName = 'CreateIntLBQS-rg'
432-
Location = 'eastus'
435+
ResourceGroupName = $rg.name
436+
Location = 'westus2'
433437
Subnet = $vnet.Subnets[0]
434438
NetworkSecurityGroup = $nsg
435439
}
@@ -457,8 +461,8 @@ $vmConfig = New-AzVMConfig @vmsz `
457461
458462
## Create the virtual machine for VMs ##
459463
$vm = @{
460-
ResourceGroupName = 'CreateIntLBQS-rg'
461-
Location = 'eastus'
464+
ResourceGroupName = $rg.name
465+
Location = 'westus2'
462466
VM = $vmConfig
463467
}
464468
New-AzVM @vm
@@ -491,7 +495,7 @@ To see the load balancer distribute traffic across all three VMs, you can force-
491495
When no longer needed, you can use the [Remove-AzResourceGroup](/powershell/module/az.resources/remove-azresourcegroup) command to remove the resource group, load balancer, and the remaining resources.
492496

493497
```azurepowershell-interactive
494-
Remove-AzResourceGroup -Name 'CreateIntLBQS-rg'
498+
Remove-AzResourceGroup -Name $rg.name
495499
```
496500

497501
## Next steps

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.custom: devx-track-azurepowershell, mode-api, template-quickstart, engagement
1313

1414
# Quickstart: Create a public load balancer to load balance VMs using Azure PowerShell
1515

16-
Get started with Azure Load Balancer by using Azure PowerShell to create a public load balancer and two virtual machines. Other resources include Azure Bastion, NAT Gateway, a virtual network, and the required subnets.
16+
Get started with Azure Load Balancer by using Azure PowerShell to create a public load balancer and two virtual machines. Also, you deploy other resources including Azure Bastion, NAT Gateway, a virtual network, and the required subnets.
1717

1818
:::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":::
1919
## Prerequisites

articles/load-balancer/tutorial-cross-region-cli.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: mbender-ms
66
ms.author: mbender
77
ms.service: load-balancer
88
ms.topic: tutorial
9-
ms.date: 06/27/2023
9+
ms.date: 07/23/2024
1010
ms.custom: template-tutorial, devx-track-azurecli, engagement-fy23
1111
ROBOTS: NOINDEX
1212
#Customer intent: As a administrator, I want to deploy a cross-region load balancer for global high availability of my application or service.
@@ -50,7 +50,7 @@ az login
5050
``````
5151
## Create cross-region load balancer
5252
53-
In this section, you'll create a cross-region load balancer, public IP address, and load balancing rule.
53+
In this section, you create a cross-region load balancer, public IP address, and load balancing rule.
5454
5555
### Create a resource group
5656
@@ -112,14 +112,14 @@ Create a load balancer rule with [az network cross-region-lb rule create](/cli/a
112112

113113
## Create backend pool
114114

115-
In this section, you'll add two regional standard load balancers to the backend pool of the cross-region load balancer.
115+
In this section, you add two regional standard load balancers to the backend pool of the cross-region load balancer.
116116

117117
> [!IMPORTANT]
118118
> To complete these steps, ensure that two regional load balancers with backend pools have been deployed in your subscription. For more information, see, **[Quickstart: Create a public load balancer to load balance VMs using Azure CLI](quickstart-load-balancer-standard-public-cli.md)**.
119119
120120
### Add the regional frontends to load balancer
121121

122-
In this section, you'll place the resource IDs of two regional load balancers frontends into variables. You'll then use the variables to add the frontends to the backend address pool of the cross-region load balancer.
122+
In this section, you place the resource IDs of two regional load balancers frontends into variables, and then use the variables to add the frontends to the backend address pool of the cross-region load balancer.
123123

124124
Retrieve the resource IDs with [az network lb frontend-ip show](/cli/azure/network/lb/frontend-ip#az-network-lb-frontend-ip-show).
125125

@@ -157,7 +157,7 @@ Use [az network cross-region-lb address-pool address add](/cli/azure/network/cro
157157

158158
## Test the load balancer
159159

160-
In this section, you'll test the cross-region load balancer. You'll connect to the public IP address in a web browser. You'll stop the virtual machines in one of the regional load balancer backend pools and observe the failover.
160+
In this section, you test the cross-region load balancer. You connect to the public IP address in a web browser. You stop the virtual machines in one of the regional load balancer backend pools and observe the failover.
161161

162162
1. To get the public IP address of the load balancer, use [az network public-ip show](/cli/azure/network/public-ip#az-network-public-ip-show):
163163

articles/load-balancer/tutorial-cross-region-powershell.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: mbender-ms
66
ms.author: mbender
77
ms.service: load-balancer
88
ms.topic: tutorial
9-
ms.date: 06/27/2023
9+
ms.date: 07/23/2023
1010
ms.custom: devx-track-azurepowershell, template-tutorial, engagement-fy23
1111
ROBOTS: NOINDEX
1212
#Customer intent: As a administrator, I want to deploy a cross-region load balancer for global high availability of my application or service.
@@ -31,7 +31,6 @@ If you don’t have an Azure subscription, create a [free account](https://azure
3131
- An Azure subscription.
3232
- Two **standard** sku Azure Load Balancers with backend pools deployed in two different Azure regions.
3333
- For information on creating a regional standard load balancer and virtual machines for backend pools, see [Quickstart: Create a public load balancer to load balance VMs using Azure PowerShell](quickstart-load-balancer-standard-public-powershell.md).
34-
- Append the name of the load balancers and virtual machines in each region with a **-R1** and **-R2**.
3534
- Azure PowerShell installed locally or Azure Cloud Shell.
3635

3736

@@ -58,7 +57,7 @@ New-AzResourceGroup @rg
5857

5958
### Create cross-region load balancer resources
6059

61-
In this section, you'll create the resources needed for the cross-region load balancer.
60+
In this section, you create the resources needed for the cross-region load balancer.
6261

6362
A global standard sku public IP is used for the frontend of the cross-region load balancer.
6463

@@ -124,7 +123,7 @@ $lb = New-AzLoadBalancer @lbp`
124123

125124
## Configure backend pool
126125

127-
In this section, you'll add two regional standard load balancers to the backend pool of the cross-region load balancer.
126+
In this section, you add two regional standard load balancers to the backend pool of the cross-region load balancer.
128127

129128
> [!IMPORTANT]
130129
> To complete these steps, ensure that two regional load balancers with backend pools have been deployed in your subscription. For more information, see, **[Quickstart: Create a public load balancer to load balance VMs using Azure PowerShell](quickstart-load-balancer-standard-public-powershell.md)**.
@@ -191,7 +190,7 @@ Set-AzLoadBalancerBackendAddressPool @bepoolcr
191190

192191
## Test the load balancer
193192

194-
In this section, you'll test the cross-region load balancer. You'll connect to the public IP address in a web browser. You'll stop the virtual machines in one of the regional load balancer backend pools and observe the failover.
193+
In this section, you test the cross-region load balancer. You connect to the public IP address in a web browser. You stop the virtual machines in one of the regional load balancer backend pools and observe the failover.
195194

196195
1. Use [Get-AzPublicIpAddress](/powershell/module/az.network/get-azpublicipaddress) to get the public IP address of the load balancer:
197196

0 commit comments

Comments
 (0)