Skip to content

Commit 07c04b0

Browse files
authored
Merge pull request #189993 from carlrab/azurecli_traffic_manager
standardize parent article for CLI sample
2 parents 8af7e39 + eab8718 commit 07c04b0

File tree

2 files changed

+18
-13
lines changed

2 files changed

+18
-13
lines changed

articles/traffic-manager/scripts/traffic-manager-cli-websites-high-availability.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,43 @@ services: traffic-manager
55
documentationcenter: traffic-manager
66
author: asudbring
77
manager: twooley
8-
98
tags: azure-infrastructure
10-
119
ms.assetid:
1210
ms.service: traffic-manager
1311
ms.devlang: azurecli
1412
ms.topic: article
1513
ms.tgt_pltfrm: na
1614
ms.workload: traffic-manager
17-
ms.date: 04/26/2018
15+
ms.date: 02/28/2022
1816
ms.author: allensu
1917
---
2018

2119
# Route traffic for high availability of applications using Azure CLI
2220

2321
This script creates a resource group, two app service plans, two web apps, a traffic manager profile, and two traffic manager endpoints. Traffic Manager directs traffic to the application in one region as the primary region, and to the secondary region when the application in the primary region is unavailable. Before executing the script, you must change the MyWebApp, MyWebAppL1 and MyWebAppL2 values to unique values across Azure. After running the script, you can access the app in the primary region with the URL mywebapp.trafficmanager.net.
2422

25-
[!INCLUDE [sample-cli-install](../../../includes/sample-cli-install.md)]
26-
2723
[!INCLUDE [quickstarts-free-trial-note](../../../includes/quickstarts-free-trial-note.md)]
2824

25+
[!INCLUDE [azure-cli-prepare-your-environment.md](../../../includes/azure-cli-prepare-your-environment.md)]
26+
2927
## Sample script
3028

31-
[!code-azurecli-interactive[main](../../../cli_scripts/traffic-manager/direct-traffic-for-increased-application-availability/direct-traffic-for-increased-application-availability.sh "Route traffic for high availability")]
29+
[!INCLUDE [cli-launch-cloud-shell-sign-in.md](../../../includes/cli-launch-cloud-shell-sign-in.md)]
30+
31+
### Run the script
3232

33+
:::code language="azurecli" source="~/azure_cli_scripts/traffic-manager/direct-traffic-for-increased-application-availability/direct-traffic-for-increased-application-availability.sh" id="FullScript":::
3334

34-
## Clean up deployment
35+
## Clean up resources
3536

36-
After the script sample has been run, the follow command can be used to remove the resource group, App Service app, and all related resources.
37+
[!INCLUDE [cli-clean-up-resources.md](../../../includes/cli-clean-up-resources.md)]
3738

3839
```azurecli
39-
az group delete --name myResourceGroup1 --yes
40-
az group delete --name myResourceGroup2 --yes
40+
az group delete --name $resourceGroup1
41+
az group delete --name $resourceGroup2
4142
```
4243

43-
## Script explanation
44+
## Sample reference
4445

4546
This script uses the following commands to create a resource group, web app, traffic manager profile, and all related resources. Each command in the table links to command specific documentation.
4647

@@ -56,4 +57,4 @@ This script uses the following commands to create a resource group, web app, tra
5657

5758
For more information on the Azure CLI, see [Azure CLI documentation](/cli/azure).
5859

59-
Additional App Service CLI script samples can be found in the [Azure Networking documentation](../cli-samples.md).
60+
Additional App Service CLI script samples can be found in the [Azure Networking documentation](../cli-samples.md).

articles/traffic-manager/toc.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@
3535
- name: Samples
3636
items:
3737
- name: Azure CLI
38-
href: cli-samples.md
38+
items:
39+
- name: Overview
40+
href: cli-samples.md
41+
- name: Direct traffic across regions for HA
42+
href: scripts/traffic-manager-cli-websites-high-availability.md
3943
- name: Azure PowerShell
4044
href: powershell-samples.md
4145
- name: Concepts

0 commit comments

Comments
 (0)