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
@@ -27,207 +27,54 @@ You can also complete this quickstart using the [Azure portal](quick-create-port
27
27
28
28
## Create an application gateway
29
29
30
-
For the sake of simplicity, this template 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.
30
+
For the sake of simplicity, this template creates 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.
31
31
32
32
### Review the template
33
33
34
-
The template used in this quickstart is from [Azure Quickstart templates](https://github.com/Azure/azure-quickstart-templates/)
34
+
The template used in this quickstart is from [Azure Quickstart templates](https://github.com/Azure/azure-quickstart-templates/blob/master/ag-docs-qs/azuredeploy.json)
Sign in to the [Azure portal](https://portal.azure.com) with your Azure account.
38
+
Multiple Azure resources are defined in the template:
39
39
40
-
## Create an application gateway
41
-
42
-
You'll create the application gateway using the tabs on the **Create an application gateway** page.
43
-
44
-
1. On the Azure portal menu or from the **Home** page, select **Create a resource**. The **New** window appears.
45
-
46
-
2. Select **Networking** and then select **Application Gateway** in the **Featured** list.
47
-
48
-
### Basics tab
49
-
50
-
1. On the **Basics** tab, enter these values for the following application gateway settings:
51
-
52
-
-**Resource group**: Select **myResourceGroupAG** for the resource group. If it doesn't exist, select **Create new** to create it.
53
-
-**Application gateway name**: Enter *myAppGateway* for the name of the application gateway.
54
-
55
-

56
-
57
-
2. For Azure to communicate between the resources that you create, it needs a virtual network. You can either create a new virtual network or use an existing one. In this example, you'll create a new virtual network at the same time that you create the application gateway. Application Gateway instances are created in separate subnets. You create two subnets in this example: one for the application gateway, and another for the backend servers.
58
-
59
-
Under **Configure virtual network**, create a new virtual network by selecting **Create new**. In the **Create virtual network** window that opens, enter the following values to create the virtual network and two subnets:
60
-
61
-
-**Name**: Enter *myVNet* for the name of the virtual network.
62
-
63
-
-**Subnet name** (Application Gateway subnet): The **Subnets** grid will show a subnet named *Default*. Change the name of this subnet to *myAGSubnet*.<br>The application gateway subnet can contain only application gateways. No other resources are allowed.
64
-
65
-
-**Subnet name** (backend server subnet): In the second row of the **Subnets** grid, enter *myBackendSubnet* in the **Subnet name** column.
66
-
67
-
-**Address range** (backend server subnet): In the second row of the **Subnets** Grid, enter an address range that doesn't overlap with the address range of *myAGSubnet*. For example, if the address range of *myAGSubnet* is 10.0.0.0/24, enter *10.0.1.0/24* for the address range of *myBackendSubnet*.
68
-
69
-
Select **OK** to close the **Create virtual network** window and save the virtual network settings.
70
-
71
-

72
-
73
-
3. On the **Basics** tab, accept the default values for the other settings and then select **Next: Frontends**.
74
-
75
-
### Frontends tab
76
-
77
-
1. On the **Frontends** tab, verify **Frontend IP address type** is set to **Public**. <br>You can configure the Frontend IP to be Public or Private as per your use case. In this example, you'll choose a Public Frontend IP.
78
-
> [!NOTE]
79
-
> For the Application Gateway v2 SKU, there must be a **Public** frontend IP configuration. You can still have both a Public and a Private frontend IP configuration, but Private only frontend IP configuration (Only ILB mode) is currently not enabled for the v2 SKU.
80
-
81
-
2. Choose **Create new** for the **Public IP address** and enter *myAGPublicIPAddress* for the public IP address name, and then select **OK**.
82
-
83
-

84
-
85
-
3. Select **Next: Backends**.
86
-
87
-
### Backends tab
88
-
89
-
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.
90
-
91
-
1. On the **Backends** tab, select **+Add a backend pool**.
92
-
93
-
2. In the **Add a backend pool** window that opens, enter the following values to create an empty backend pool:
94
-
95
-
-**Name**: Enter *myBackendPool* for the name of the backend pool.
96
-
-**Add backend pool without targets**: Select **Yes** to create a backend pool with no targets. You'll add backend targets after creating the application gateway.
97
-
98
-
3. In the **Add a backend pool** window, select **Add** to save the backend pool configuration and return to the **Backends** tab.
99
-
100
-

101
-
102
-
4. On the **Backends** tab, select **Next: Configuration**.
103
-
104
-
### Configuration tab
105
-
106
-
On the **Configuration** tab, you'll connect the frontend and backend pool you created using a routing rule.
107
-
108
-
1. Select **Add a rule** in the **Routing rules** column.
109
-
110
-
2. In the **Add a routing rule** window that opens, enter *myRoutingRule* for the **Rule name**.
111
-
112
-
3. A routing rule requires a listener. On the **Listener** tab within the **Add a routing rule** window, enter the following values for the listener:
113
-
114
-
-**Listener name**: Enter *myListener* for the name of the listener.
115
-
-**Frontend IP**: Select **Public** to choose the public IP you created for the frontend.
116
-
117
-
Accept the default values for the other settings on the **Listener** tab, then select the **Backend targets** tab to configure the rest of the routing rule.
118
-
119
-

120
-
121
-
4. On the **Backend targets** tab, select **myBackendPool** for the **Backend target**.
122
-
123
-
5. For the **HTTP setting**, select **Create new** to create a new HTTP setting. The HTTP setting will determine the behavior of the routing rule. In the **Add an HTTP setting** window that opens, enter *myHTTPSetting* for the **HTTP setting name** and *80* for the **Backend port**. Accept the default values for the other settings in the **Add an HTTP setting** window, then select **Add** to return to the **Add a routing rule** window.
124
-
125
-

126
-
127
-
6. On the **Add a routing rule** window, select **Add** to save the routing rule and return to the **Configuration** tab.
128
-
129
-

130
-
131
-
7. Select **Next: Tags** and then **Next: Review + create**.
132
-
133
-
### Review + create tab
134
-
135
-
Review the settings on the **Review + create** tab, and then select **Create** to create the virtual network, the public IP address, and the application gateway. It may take several minutes for Azure to create the application gateway. Wait until the deployment finishes successfully before moving on to the next section.
136
-
137
-
## Add backend targets
138
-
139
-
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.
140
-
141
-
To do this, you'll:
142
-
143
-
1. Create two new VMs, *myVM* and *myVM2*, to be used as backend servers.
144
-
2. Install IIS on the virtual machines to verify that the application gateway was created successfully.
145
-
3. Add the backend servers to the backend pool.
146
-
147
-
### Create a virtual machine
148
-
149
-
1. On the Azure portal menu or from the **Home** page, select **Create a resource**. The **New** window appears.
150
-
2. Select **Windows Server 2016 Datacenter** in the **Popular** list. The **Create a virtual machine** page appears.<br>Application Gateway can route traffic to any type of virtual machine used in its backend pool. In this example, you use a Windows Server 2016 Datacenter.
151
-
3. Enter these values in the **Basics** tab for the following virtual machine settings:
152
-
153
-
-**Resource group**: Select **myResourceGroupAG** for the resource group name.
154
-
-**Virtual machine name**: Enter *myVM* for the name of the virtual machine.
155
-
-**Region**: Select the same region where you created the application gateway.
156
-
-**Username**: Type *azureuser* for the administrator user name.
157
-
-**Password**: Type a password.
158
-
4. Accept the other defaults and then select **Next: Disks**.
159
-
5. Accept the **Disks** tab defaults and then select **Next: Networking**.
160
-
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.
161
-
7. On the **Management** tab, set **Boot diagnostics** to **Off**. Accept the other defaults and then select **Review + create**.
162
-
8. On the **Review + create** tab, review the settings, correct any validation errors, and then select **Create**.
163
-
9. Wait for the virtual machine creation to complete before continuing.
164
-
165
-
### Install IIS for testing
166
-
167
-
In this example, you install IIS on the virtual machines only to verify Azure created the application gateway successfully.
168
-
169
-
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.
3. Create a second virtual machine and install IIS by using the steps that you previously completed. Use *myVM2* for the virtual machine name and for the **VMName** setting of the **Set-AzVMExtension** cmdlet.
188
-
189
-
### Add backend servers to backend pool
190
-
191
-
1. On the Azure portal menu, select **All resources** or search for and select *All resources*. Then select **myAppGateway**.
-[**Microsoft.Network/publicIPAddresses**](/azure/templates/microsoft.network/publicipaddresses) : one for the application gateway, and two for the virtual machines.
[](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-quickstart-templates%2Fmaster%2F101-key-vault-create%2Fazuredeploy.json)
204
54
205
-
6. Select **Save**.
206
55
207
-
7. Wait for the deployment to complete before proceeding to the next step.
208
56
209
-
## Test the application gateway
57
+
## Validate the deployment
210
58
211
-
Although IIS isn't required to create the application gateway, you installed it in this quickstart to verify if Azure successfully created the application gateway. Use IIS to test the application gateway:
59
+
Although IIS isn't required to create the application gateway, it is installed to verify if Azure successfully created the application gateway. Use IIS to test the application gateway:
212
60
213
61
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.
214
62
2. Copy the public IP address, and then paste it into the address bar of your browser to browse that IP address.
215
63
3. Check the response. A valid response verifies that the application gateway was successfully created and can successfully connect with the backend.
Refresh the browser multiple times and you should see connections to both myVM and myVM2.
67
+
Refresh the browser multiple times and you should see connections to both myVM1 and myVM2.
220
68
221
69
## Clean up resources
222
70
223
71
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.
224
72
225
-
To delete the resource group:
73
+
To delete the resource group, call the `Remove-AzResourceGroup` cmdlet:
226
74
227
-
1. On the Azure portal menu, select **Resource groups** or search for and select *Resource groups*.
228
-
2. On the **Resource groups** page, search for **myResourceGroupAG** in the list, then select it.
229
-
3. On the **Resource group page**, select **Delete resource group**.
230
-
4. Enter *myResourceGroupAG* for **TYPE THE RESOURCE GROUP NAME** and then select **Delete**
75
+
```azurepowershell-interactive
76
+
Remove-AzResourceGroup -Name <your resource group name>
0 commit comments