You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/application-gateway/quick-create-cli.md
+19-17Lines changed: 19 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,40 +6,41 @@ services: application-gateway
6
6
author: vhorne
7
7
ms.service: application-gateway
8
8
ms.topic: quickstart
9
-
ms.date: 11/14/2019
9
+
ms.date: 03/05/2020
10
10
ms.author: victorh
11
11
ms.custom: mvc
12
12
---
13
13
14
14
# Quickstart: Direct web traffic with Azure Application Gateway - Azure CLI
15
15
16
-
This quickstart shows you how to use Azure CLI to create an application gateway. After creating the application gateway, you test it to make sure it's working correctly. With Azure Application Gateway, you direct your application web traffic to specific resources by assigning listeners to ports, creating rules, and adding resources to a backend pool. This article uses a simple setup with a public front-end IP, a basic listener to host a single site on the application gateway, two virtual machines used for the backend pool, and a basic request routing rule.
16
+
In this quickstart, you use Azure CLI to create an application gateway. Then you test it to make sure it works correctly.
17
17
18
-
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
18
+
The application gateway directs application web traffic to specific resources in a backend pool. You assign listeners to ports, create rules, and add resources to a backend pool. For the sake of simplicity, this article uses a simple setup with a public front-end IP, a basic listener to host a single site on the application gateway, a basic request routing rule, and two virtual machines in the backend pool.
19
+
20
+
You can also complete this quickstart using [Azure PowerShell](quick-create-powershell.md) or the [Azure portal](quick-create-portal.md).
If you choose to install and use the CLI locally, run Azure CLI version 2.0.4 or later. To find the version, run **az --version**. For information about installing or upgrading, see [Install Azure CLI](/cli/azure/install-azure-cli).
26
+
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
27
+
-[Azure CLI version 2.0.4 or later](/cli/azure/install-azure-cli) (if you run Azure CLI locally).
27
28
28
-
### Resource group
29
+
##Create resource group
29
30
30
-
In Azure, you allocate related resources to a resource group. Create a resource group by using [az group create](/cli/azure/group#az-group-create).
31
+
In Azure, you allocate related resources to a resource group. Create a resource group by using `az group create`.
31
32
32
33
The following example creates a resource group named *myResourceGroupAG* in the *eastus* location.
33
34
34
35
```azurecli-interactive
35
36
az group create --name myResourceGroupAG --location eastus
36
37
```
37
38
38
-
### Required network resources
39
+
##Create network resources
39
40
40
-
For Azure to communicate between the resources that you create, it needs a virtual network. The application gateway subnet can contain only application gateways. No other resources are allowed. You can either create a new subnet for Application Gateway or use an existing one. In this example, you create two subnets in this example: one for the application gateway, and another for the backend servers. You can configure the Frontend IP of the Application Gateway to be Public or Private as per your use case. In this example, you'll choose a Public Frontend IP.
41
+
For Azure to communicate between the resources that you create, it needs a virtual network. The application gateway subnet can contain only application gateways. No other resources are allowed. You can either create a new subnet for Application Gateway or use an existing one. In this example, you create two subnets: one for the application gateway, and another for the backend servers. You can configure the Frontend IP of the Application Gateway to be Public or Private as per your use case. In this example, you'll choose a Public Frontend IP address.
41
42
42
-
To create the virtual network and subnet, you use [az network vnet create](/cli/azure/network/vnet#az-network-vnet-create). Run [az network public-ip create](/cli/azure/network/public-ip) to create the public IP address.
43
+
To create the virtual network and subnet, use `az network vnet create`. Run `az network public-ip create` to create the public IP address.
43
44
44
45
```azurecli-interactive
45
46
az network vnet create \
@@ -61,13 +62,14 @@ az network public-ip create \
61
62
--sku Standard
62
63
```
63
64
64
-
### Backend servers
65
+
##Create the backend servers
65
66
66
67
A backend can have NICs, virtual machine scale sets, public IPs, internal IPs, fully qualified domain names (FQDN), and multi-tenant back-ends like Azure App Service. In this example, you create two virtual machines to use as backend servers for the application gateway. You also install IIS on the virtual machines to test the application gateway.
67
68
68
69
#### Create two virtual machines
69
70
70
-
Install the [NGINX web server](https://docs.nginx.com/nginx/) on the virtual machines to verify the application gateway was successfully created. You can use a cloud-init configuration file to install NGINX and run a "Hello World" Node.js app on a Linux virtual machine. For more information about cloud-init, see [Cloud-init support for virtual machines in Azure](https://docs.microsoft.com/azure/virtual-machines/linux/using-cloud-init).
71
+
Install the NGINX web server on the virtual machines to verify the application gateway was successfully created. You can use a cloud-init configuration file to install NGINX and run a "Hello World" Node.js app on a Linux virtual machine. For more information about cloud-init, see
72
+
[Cloud-init support for virtual machines in Azure](../virtual-machines/linux/using-cloud-init.md).
71
73
72
74
In your Azure Cloud Shell, copy and paste the following configuration into a file named *cloud-init.txt*. Enter *editor cloud-init.txt* to create the file.
73
75
@@ -113,7 +115,7 @@ runcmd:
113
115
- nodejs index.js
114
116
```
115
117
116
-
Create the network interfaces with [az network nic create](/cli/azure/network/nic#az-network-nic-create). To create the virtual machines, you use [az vm create](/cli/azure/vm#az-vm-create).
118
+
Create the network interfaces with `az network nic create`. To create the virtual machines, you use `az vm create`.
117
119
118
120
```azurecli-interactive
119
121
for i in `seq 1 2`; do
@@ -135,7 +137,7 @@ done
135
137
136
138
## Create the application gateway
137
139
138
-
Create an application gateway by using [az network application-gateway create](/cli/azure/network/application-gateway). When you create an application gateway with the Azure CLI, you specify configuration information, such as capacity, SKU, and HTTP settings. Azure then adds the private IP addresses of the network interfaces as servers in the backend pool of the application gateway.
140
+
Create an application gateway using `az network application-gateway create`. When you create an application gateway with the Azure CLI, you specify configuration information, such as capacity, SKU, and HTTP settings. Azure then adds the private IP addresses of the network interfaces as servers in the backend pool of the application gateway.
139
141
140
142
```azurecli-interactive
141
143
address1=$(az network nic show --name myNic1 --resource-group myResourceGroupAG | grep "\"privateIpAddress\":" | grep -oE '[^ ]+$' | tr -d '",')
@@ -163,7 +165,7 @@ It can take up to 30 minutes for Azure to create the application gateway. After
163
165
164
166
## Test the application gateway
165
167
166
-
Although Azure doesn't require an NGINX web server to create the application gateway, you installed it in this quickstart to verify whether Azure successfully created the application gateway. To get the public IP address of the new application gateway, use [az network public-ip show](/cli/azure/network/public-ip#az-network-public-ip-show).
168
+
Although Azure doesn't require an NGINX web server to create the application gateway, you installed it in this quickstart to verify whether Azure successfully created the application gateway. To get the public IP address of the new application gateway, use `az network public-ip show`.
167
169
168
170
```azurepowershell-interactive
169
171
az network public-ip show \
@@ -181,7 +183,7 @@ When you refresh the browser, you should see the name of the second VM. This ind
181
183
182
184
## Clean up resources
183
185
184
-
When you no longer need the resources that you created with the application gateway, use the [az group delete](/cli/azure/group#az-group-delete) command to remove the resource group. By removing the resource group, you also remove the application gateway and all its related resources.
186
+
When you no longer need the resources that you created with the application gateway, use the `az group delete` command to delete the resource group. When you delete the resource group, you also delete the application gateway and all its related resources.
Copy file name to clipboardExpand all lines: articles/application-gateway/quick-create-portal.md
+23-12Lines changed: 23 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,26 +6,35 @@ services: application-gateway
6
6
author: vhorne
7
7
ms.service: application-gateway
8
8
ms.topic: quickstart
9
-
ms.date: 11/14/2019
9
+
ms.date: 03/05/2020
10
10
ms.author: victorh
11
11
ms.custom: mvc
12
12
---
13
13
14
14
# Quickstart: Direct web traffic with Azure Application Gateway - Azure portal
15
15
16
-
This quickstart shows you how to use the Azure portal to create an application gateway. After creating the application gateway, you test it to make sure it's working correctly. With Azure Application Gateway, you direct your application web traffic to specific resources by assigning listeners to ports, creating rules, and adding resources to a backend pool. For the sake of simplicity, this article uses a simple setup with a public front-end IP, a basic listener to host a single site on this application gateway, two virtual machines used for the backend pool, and a basic request routing rule.
16
+
In this quickstart, you use the Azure portal to create an application gateway. Then you test it to make sure it works correctly.
17
17
18
-
If you don't have an Azure subscription, create a [free account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
18
+
The application gateway directs application web traffic to specific resources in a backend pool. You assign listeners to ports, create rules, and add resources to a backend pool. For the sake of simplicity, this article uses a simple setup with a public front-end IP, a basic listener to host a single site on the application gateway, a basic request routing rule, and two virtual machines in the backend pool.
19
19
20
+
You can also complete this quickstart using [Azure PowerShell](quick-create-powershell.md) or [Azure CLI](quick-create-cli.md).
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
29
+
30
+
## Sign in to the Azure portal
24
31
25
32
Sign in to the [Azure portal](https://portal.azure.com) with your Azure account.
26
33
27
34
## Create an application gateway
28
35
36
+
You'll create the application gateway using the tabs on the **Create an application gateway** page.
37
+
29
38
1. On the Azure portal menu or from the **Home** page, select **Create a resource**. The **New** window appears.
30
39
31
40
2. Select **Networking** and then select **Application Gateway** in the **Featured** list.
@@ -71,7 +80,7 @@ Sign in to the [Azure portal](https://portal.azure.com) with your Azure account.
71
80
72
81
### Backends tab
73
82
74
-
The backend pool is used to route requests to the backend servers that serve the request. Backend pools can be composed of NICs, virtual machine scale sets, public IPs, internal IPs, fully qualified domain names (FQDN), and multi-tenant back-ends like Azure App Service. In this example, you will create an empty backend pool with your application gateway and then add backend targets to the backend pool.
83
+
The backend pool is used to route requests to the backend servers that serve the request. Backend pools can be composed of NICs, virtual machine scale sets, public IPs, internal IPs, fully qualified domain names (FQDN), and multi-tenant back-ends like Azure App Service. In this example, you'll create an empty backend pool with your application gateway and then add backend targets to the backend pool.
75
84
76
85
1. On the **Backends** tab, select **+Add a backend pool**.
77
86
@@ -121,7 +130,7 @@ Review the settings on the **Review + create** tab, and then select **Create** t
121
130
122
131
## Add backend targets
123
132
124
-
In this example, you'll use virtual machines as the target backend. You can either use existing virtual machines or create new ones. You'll create two virtual machines that Azure uses as backend servers for the application gateway.
133
+
In this example, you'll use virtual machines as the target backend. You can either use existing virtual machines or create new ones. You'll create two virtual machines as backend servers for the application gateway.
125
134
126
135
To do this, you'll:
127
136
@@ -137,8 +146,8 @@ To do this, you'll:
137
146
138
147
-**Resource group**: Select **myResourceGroupAG** for the resource group name.
139
148
-**Virtual machine name**: Enter *myVM* for the name of the virtual machine.
140
-
-**Username**: Enter*azureuser* for the administrator user name.
141
-
-**Password**: Enter *Azure123456!* for the administrator password.
149
+
-**Username**: Type*azureuser* for the administrator user name.
150
+
-**Password**: Type the password.
142
151
4. Accept the other defaults and then select **Next: Disks**.
143
152
5. Accept the **Disks** tab defaults and then select **Next: Networking**.
144
153
6. On the **Networking** tab, verify that **myVNet** is selected for the **Virtual network** and the **Subnet** is set to **myBackendSubnet**. Accept the other defaults and then select **Next: Management**.<br>Application Gateway can communicate with instances outside of the virtual network that it is in, but you need to ensure there's IP connectivity.
@@ -150,7 +159,7 @@ To do this, you'll:
150
159
151
160
In this example, you install IIS on the virtual machines only to verify Azure created the application gateway successfully.
152
161
153
-
1. Open [Azure PowerShell](https://docs.microsoft.com/azure/cloud-shell/quickstart-powershell). To do so, select**Cloud Shell** from the top navigation bar of the Azure portal and then select **PowerShell** from the drop-down list.
162
+
1. Open Azure PowerShell. Select**Cloud Shell** from the top navigation bar of the Azure portal and then select **PowerShell** from the drop-down list.
@@ -194,13 +203,15 @@ Although IIS isn't required to create the application gateway, you installed it
194
203
195
204
1. Find the public IP address for the application gateway on its **Overview** page. Or, you can select **All resources**, enter *myAGPublicIPAddress* in the search box, and then select it in the search results. Azure displays the public IP address on the **Overview** page.
196
205
2. Copy the public IP address, and then paste it into the address bar of your browser.
197
-
3. Check the response. A valid response verifies that the application gateway was successfully created and can successfully connect with the backend.
206
+
3. Check the response. A valid response verifies that the application gateway was successfully created and can successfully connect with the backend.
When you no longer need the resources that you created with the application gateway, remove the resource group. By removing the resource group, you also remove the application gateway and all its related resources.
212
+
When you no longer need the resources that you created with the application gateway, delete the resource group. When you delete the resource group, you also remove the application gateway and all the related resources.
202
213
203
-
To remove the resource group:
214
+
To delete the resource group:
204
215
205
216
1. On the Azure portal menu, select **Resource groups** or search for and select *Resource groups*.
206
217
2. On the **Resource groups** page, search for **myResourceGroupAG** in the list, then select it.
0 commit comments