Skip to content

Commit 34994c3

Browse files
authored
Merge pull request #232491 from duongau/afdcliqs
Azure Front Door - update CLI commands
2 parents a790434 + 4b970d7 commit 34994c3

File tree

2 files changed

+11
-27
lines changed

2 files changed

+11
-27
lines changed
15.1 KB
Loading

articles/frontdoor/quickstart-create-front-door-cli.md

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ manager: KumudD
77
ms.service: frontdoor
88
ms.topic: quickstart
99
ms.workload: infrastructure-services
10-
ms.date: 4/19/2021
10+
ms.date: 3/28/2023
1111
ms.author: duau
1212
ms.custom: mode-api, devx-track-azurecli
1313
ms.devlang: azurecli
@@ -18,9 +18,9 @@ ms.devlang: azurecli
1818

1919
Get started with Azure Front Door by using Azure CLI to create a highly available and high-performance global web application.
2020

21-
The Front Door directs web traffic to specific resources in a backend pool. You defined the frontend domain, add resources to a backend pool, and create a routing rule. This article uses a simple configuration of one backend pool with two web app resources and a single routing rule using default path matching "/*".
21+
The Front Door directs web traffic to specific resources in a backend pool. You defined the frontend domain, add resources to a backend pool, and create a routing rule. This article uses a simple configuration of one backend pool with a web app resource and a single routing rule using default path matching "/*".
2222

23-
:::image type="content" source="media/quickstart-create-front-door/environment-diagram.png" alt-text="Diagram of Front Door deployment environment using the Azure CLI." border="false":::
23+
:::image type="content" source="media/quickstart-create-front-door-cli/environment-diagram.png" alt-text="Diagram of Front Door deployment environment using the Azure CLI." border="false":::
2424

2525
## Prerequisites
2626

@@ -40,18 +40,14 @@ If you choose to install and use the CLI locally, this quickstart requires Azure
4040

4141
In Azure, you allocate related resources to a resource group. You can either use an existing resource group or create a new one.
4242

43-
For this quickstart, you need two resource groups. One in *Central US* and the second in *South Central US*.
43+
For this quickstart, you need a resource group in *Central US*.
4444

4545
Create a resource group with [az group create](/cli/azure/group#az-group-create):
4646

4747
```azurecli-interactive
4848
az group create \
4949
--name myRGFDCentral \
5050
--location centralus
51-
52-
az group create \
53-
--name myRGFDEast \
54-
--location eastus
5551
```
5652

5753
## Create two instances of a web app
@@ -62,23 +58,19 @@ If you don't already have a web app, use the following script to set up two exam
6258

6359
### Create app service plans
6460

65-
Before you can create the web apps you will need two app service plans, one in *Central US* and the second in *East US*.
61+
Before you can create the web app you will need an app service plan in *Central US*.
6662

6763
Create app service plans with [az appservice plan create](/cli/azure/appservice/plan#az-appservice-plan-create&preserve-view=true):
6864

6965
```azurecli-interactive
7066
az appservice plan create \
7167
--name myAppServicePlanCentralUS \
7268
--resource-group myRGFDCentral
73-
74-
az appservice plan create \
75-
--name myAppServicePlanEastUS \
76-
--resource-group myRGFDEast
7769
```
7870

7971
### Create web apps
8072

81-
Running the following commands will create a web app in each of the app service plans in the previous step. Web app names have to be globally unique.
73+
Running the following commands will create a web app in the app service plans in the previous step. Web app names have to be globally unique.
8274

8375
Create web app with [az webapp create](/cli/azure/webapp#az-webapp-create&preserve-view=true):
8476

@@ -87,14 +79,9 @@ az webapp create \
8779
--name WebAppContoso-1 \
8880
--resource-group myRGFDCentral \
8981
--plan myAppServicePlanCentralUS
90-
91-
az webapp create \
92-
--name WebAppContoso-2 \
93-
--resource-group myRGFDEast \
94-
--plan myAppServicePlanEastUS
9582
```
9683

97-
Make note of the default host name of each web app so you can define the backend addresses when you deploy the Front Door in the next step.
84+
Make note of the default host name of the web app so you can define the backend addresses when you deploy the Front Door in the next step.
9885

9986
## Create the Front Door
10087

@@ -107,7 +94,7 @@ az network front-door create \
10794
--resource-group myRGFDCentral \
10895
--name contoso-frontend \
10996
--accepted-protocols Http Https \
110-
--backend-address webappcontoso-1.azurewebsites.net webappcontoso-2.azurewebsites.net
97+
--backend-address webappcontoso-1.azurewebsites.net
11198
```
11299

113100
**--resource-group:** Specify a resource group where you want to deploy the Front Door.
@@ -116,7 +103,7 @@ az network front-door create \
116103

117104
**--accepted-protocols:** Accepted values are **Http** and **Https**. If you want to use both, specific both separated by a space.
118105

119-
**--backend-address:** Define both web apps host name here separated by a space.
106+
**--backend-address:** Define the web app host name.
120107

121108
Once the deployment has successfully completed, make note of the host name in the *frontEndpoints* section.
122109

@@ -134,17 +121,14 @@ To delete the resource group use [az group delete](/cli/azure/group#az-group-del
134121

135122
```azurecli-interactive
136123
az group delete \
137-
--name myRGFDCentral
138-
139-
az group delete \
140-
--name myRGFDEast
124+
--name myRGFDCentral
141125
```
142126

143127
## Next steps
144128

145129
In this quickstart, you created a:
146130
* Front Door
147-
* Two web apps
131+
* A web app
148132

149133
To learn how to add a custom domain to your Front Door, continue to the Front Door tutorials.
150134

0 commit comments

Comments
 (0)