Creating an Application Gateway
Log in to theAzure portal.
- From the tree in the left pane of the Azure portal, select Create a resource.
- On the Create a resource page, select Networking from the left pane, and then select Application Gateway under Popular Azure services.
- Select the Basics tab and follow these steps:
Perform the following actions for the application gateway settings:
Field
Action
Subscription
Select your subscription.
Resource group
Select the following resource group name: amiai-resouce-group.
Application gateway name
Enter amiai-app-gateway.
Region
Select East US.
Tier
Select WAF V2.
HTTP2
Select Disabled.
WAF Policy
- Click Create new and perform the following actions in the Create Web Application Firewall Policy window:
The Create Web Application Firewall Policy window opens.
- In the Name field, enter the following name for the new policy: amiai-ag-waf-policy.
- Select the Add Bot Protection check box.
- Click OK.
A basic WAF policy with a managed Core Rule Set (CRS) is created.
Virtual network
- Click Create new.
In the Create virtual network window, perform the following actions:
Field
Action
Name
Select amiai-virtual-network.
Subnet name (Application Gateway subnet)
- Click Manage subnet configuration.
- On the Subnets page, click +Subnet.
- In the Add a subnet dialog box, follow these steps:
- In the Name field, enter amiai-app-gateway-subnet.
- Enter IPv4 address range that does not overlap with that of default.
- Accept the defaults and click OK.
- Return to Create application gateway page, and select amiai-app-gateway-subnet.
- Click OK to save the virtual network settings.
- Click Create new and perform the following actions in the Create Web Application Firewall Policy window:
- Click Next: Frontends.
- On the Frontends tab, follow these steps:
Perform the following actions:
Field
Action
Frontend IP address type
Verify that Public is selected.
Public IPv4 address
- Click Add new.
- In Name field in the Add a public IP dialog box, enter amiai-public-ip.
- Click OK.
- Click Next: Backends.
- On the Backends tab, follow these steps to create an empty backend pool:
- Click Add a backend pool.
In the Add a backend pool section, perform the following actions:
Field
Action
Name
Enter amiai-backend-target.
Add backend pool without targets
Select Yes.
- Click Add.
- Click Next: Configuration.
- On the Configuration tab, follow these steps to create a routing rule to connect the frontend and backend pool that you created:
- In the Routing rules area, click Add a routing rule.
In the Add a routing rule window, perform the following actions:
Field
Action
Rule name
Enter amiai-routing.
Priority
Enter 1.
On the Listener tab in the Add a routing rule window, perform the following actions:
Field
Action
Listener name
Enter amiai-listener.
Frontend IP
Select Public IPv4 to choose the public IP that you created for the frontend.
Protocol
Select HTTPS.
Port
Enter 443.
Https Settings
Choose a certificate
Select Upload a certificate.
Cert name
Enter your certificate name.
PFX certificate file
Select the PFX certificate file.
Password
Enter your password for the PFX file.
For the other fields on the Listener tab, leave the default values.
On the Backend targets tab in the Add a routing rule window, perform the following actions:
Field
Action
Backend target
Select amiai-backend-target from the menu.
Backend settings
- Click Add new to create a new backend setting, which determines the behavior of the routing rule.
In the Add Backend setting window, perform the following actions:
Field
Action
Backend settings name
Enter amiai-backend-settings.
Backend port
Enter 8000.
For the other fields in this dialog box, leave the default values. You will create custom probes later.
- In the Add Backend setting window, click Add.
- In the Add a routing rule window, click Add to save the routing rule and return to the Configuration tab.
- In the Routing rules area, click Add a routing rule.
- Click Next: Tags and then, on the next tab, click Next: Review + create.
- Review the settings on the Review + create tab, and then click Create to create the virtual network, the public IP address, and the application gateway.
- Wait until the deployment finishes successfully before proceeding to the next step.
- Click amiai-app-gateway.
- Note down the Frontend Public IP address. You will use it to access the BMC AMI AI Application over the web.
- In the left pane, click SSL settings.
- Click +SSL Profiles to add a new SSL policy.
- Enter a name for your SSL profile, such as AMIAI-SSL-Policy.
- On the Client Authentication tab, click Upload a new certificate and upload your certificate.
- On the SSL Policy tab:
- Select the Enable listener-specific SSL Policy checkbox.
- Select the Predefined radio button.
- From the Policy name menu, select the recommended policy.
- Click Add.
To create a DNS zone
A DNS zone contains the DNS entries for a domain. To start hosting your domain in Azure DNS, you create a DNS zone for that domain name.
- From the Home page, select Create a resource, enter DNS zone into Search services and marketplace, and then select DNS zone.
- In the DNS zone window, select Create.
- From the menu, select the Subscription and Resource group.
- In the Name field, enter the domain name. For example, amiaiazure.com.
- Review the settings on the Review + create tab, and then click Create.
- Wait for the deployment to finish.
To create a DNS record
DNS records are created for your domain inside the DNS zone. A new address record, known as an A record, is created to resolve a host name to an IPv4 address.
- Using the search bar at the top of the window, search for your resource group and select it.
On the Resources tab, click the DNS zone name that you just created.
- At the top of the amiaiazure.com DNS zone page, click Record sets.
- On the next page, click +Add.
In the Add record set window, enter or select the following values:
Field
Action
Name
Enter www.
Type
Select A.
TTL
Enter 1.
TTL unit
Select Hours.
IP address
Enter the Public IP address of the application gateway created.
- At the bottom of the dialog box, click Add.
To create Health probes
- From the search bar at the top, in the Resource groups window, follow these steps:
- Select your resource group.
- Click the gateway service you created. In this example, it is amiai-app-gateway.
- Select your resource group.
- In the left pane in the amiai-app-gateway window, expand Settings, click Health probes, and then click +Add.
In the Add health probe window, perform the following actions, and then click Add:
Field
Action
Name
Enter health-probe-vm.
Protocol
Select HTTP.
Host
Enter Private IP of the virtual machine.
Port (Select No for Pick port from backend settings)
Enter 8000.
Path
Enter /admin/
Backend settings
Select amiai-backend-settings.
I want to test the backend health before adding the health probe
Clear this check box.
- In the left pane in the amiai-app-gateway window, expand Settings, and select Backend settings > amiai-backend-settings.
- In the Host name section in the Add Backend setting window, follow these steps:
- For the Use custom probe option, select Yes.
- From the Custom probe menu, select health-probe-vm.
- Click Save.
- In the left pane in the amiai-app-gateway window, expand Settings, and select Backend pools > amiai-backend-target.
- In the Edit backend pool window, follow these steps:
- For the Add backend pool without targets toggle option, select No.
- For Target type, select Virtual machine, and in the Target field, select the VM.
- Click Save.
- On the toolbar in the amiai-app-gateway window, select Backend health.
The Backend health window now indicates that the health status is unhealthy. - The health status becomes healthy only after you have successfully run all the steps in this runbook and deployed the BMC AMI AI Services.