Skip to content

Commit b66ffb1

Browse files
committed
docs: Rewrite VM from Windows/IIS to Ubuntu/NGINX with Run Command
1 parent 0db1058 commit b66ffb1

1 file changed

Lines changed: 29 additions & 60 deletions

File tree

articles/dns/tutorial-alias-pip.md

Lines changed: 29 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ In this tutorial, you learn how to:
2020

2121
> [!div class="checklist"]
2222
> * Create a virtual network and a subnet.
23-
> * Deploy Azure Bastion.
2423
> * Create a web server virtual machine with a public IP.
2524
> * Create an alias record that points to the public IP.
2625
> * Test the alias record.
@@ -75,42 +74,13 @@ Create a virtual network and a subnet to place your web server in.
7574
1. Select the **Review + create** tab or select the **Review + create** button.
7675
1. Select **Create**.
7776

78-
## Deploy Azure Bastion
79-
80-
Azure Bastion uses your browser to connect to VMs in your virtual network over secure shell (SSH) or remote desktop protocol (RDP) by using their private IP addresses. The VMs don't need public IP addresses, client software, or special configuration. For more information about Azure Bastion, see [Azure Bastion](/azure/bastion/bastion-overview).
81-
82-
>[!NOTE]
83-
>[!INCLUDE [Pricing](~/reusable-content/ce-skilling/azure/includes/bastion-pricing.md)]
84-
85-
1. In the search box at the top of the portal, enter **Bastion**. Select **Bastions** in the search results.
86-
87-
1. Select **+ Create**.
88-
89-
1. In the **Basics** tab of **Create a Bastion**, enter, or select the following information:
90-
91-
| Setting | Value |
92-
|---|---|
93-
| **Project details** | |
94-
| Subscription | Select your subscription. |
95-
| Resource group | Select **PIPResourceGroup**. |
96-
| **Instance details** | |
97-
| Name | Enter **bastion**. |
98-
| Region | Select the same region as your virtual network. |
99-
| Tier | Select **Developer**. |
100-
| **Configure virtual networks** | |
101-
| Virtual network | Select **myPIPVNet**. |
102-
103-
1. Select **Review + create**.
104-
105-
1. Select **Create**.
106-
10777
## Create a web server virtual machine
10878

109-
Create a Windows Server virtual machine and then install IIS web server on it.
79+
Create a Linux virtual machine and install NGINX web server on it.
11080

11181
### Create the virtual machine
11282

113-
Create a Windows Server 2019 virtual machine.
83+
Create an Ubuntu virtual machine.
11484

11585
1. In the Azure portal, enter *virtual machine* in the search box at the top of the portal, and then select **Virtual machines** from the search results.
11686
1. In **Virtual machines**, select **+ Create** and then select **Azure virtual machine**.
@@ -122,16 +92,17 @@ Create a Windows Server 2019 virtual machine.
12292
| Subscription | Select your Azure subscription. |
12393
| Resource Group | Select **PIPResourceGroup**. |
12494
| **Instance details** | |
125-
| Virtual machine name | Enter **Web-01**. |
95+
| Virtual machine name | Enter **web-01**. |
12696
| Region | Select **(US) East US**. |
12797
| Availability options | Select **No infrastructure redundancy required**. |
12898
| Security type | Select **Standard**. |
129-
| Image | Select **Windows Server 2019 Datacenter - Gen2**. |
99+
| Image | Select **Ubuntu Server 24.04 LTS - x64 Gen2**. |
130100
| Size | Select your VM size. |
131101
| **Administrator account** | |
102+
| Authentication type | Select **SSH public key**. |
132103
| Username | Enter a username. |
133-
| Password | Enter a password. |
134-
| Confirm password | Reenter the password. |
104+
| SSH public key source | Select **Generate new key pair**. |
105+
| Key pair name | Enter a name for the key pair. |
135106
| **Inbound port rules** | |
136107
| Public inbound ports | Select **None**. |
137108

@@ -156,34 +127,32 @@ Create a Windows Server 2019 virtual machine.
156127
This deployment may take a few minutes to complete.
157128

158129
> [!NOTE]
159-
> **Web-01** virtual machine has an attached NIC with a Standard SKU dynamic public IP that changes every time the virtual machine is restarted.
130+
> The **web-01** virtual machine has an attached NIC with a Standard SKU dynamic public IP that changes every time the virtual machine is restarted.
160131
161-
### Install IIS web server
132+
> [!NOTE]
133+
> The network security group rules block inbound SSH access from the internet. To run commands on the virtual machine, use the **Run command** feature in the Azure portal or deploy Azure Bastion. For more information about Azure Bastion, see [Quickstart: Deploy Azure Bastion with default settings](../bastion/quickstart-host-portal.md).
162134
163-
Install IIS web server on **Web-01**.
135+
### Install NGINX web server
164136

165-
1. In the **Overview** page of **Web-01**, select **Connect** then **Connect via Bastion**.
137+
Install NGINX web server on **web-01** using the **Run command** feature in the Azure portal.
166138

167-
1. In the **Bastion** connection page, enter or select the following information:
139+
1. In the search box at the top of the portal, enter *virtual machine*. Select **Virtual machines** in the search results.
168140

169-
| Setting | Value |
170-
|---|---|
171-
| **Authentication Type** | Select **Password**. |
172-
| **Username** | Enter the username you created during VM creation. |
173-
| **Password** | Enter the password you created during VM creation. |
141+
1. Select the **web-01** virtual machine.
142+
143+
1. In the **Operations** section of the left menu, select **Run command**.
144+
145+
1. Select **RunShellScript**.
174146

175-
1. Select **Connect**.
176-
1. On the **Server Manager** dashboard, select **Manage** then **Add Roles and Features**.
177-
1. Select **Server Roles** or select **Next** three times. On the **Server Roles** screen, select **Web Server (IIS)**.
178-
1. Select **Add Features**, and then select **Next**.
147+
1. In the **Run Command Script** pane, enter the following command:
179148

180-
:::image type="content" source="./media/tutorial-alias-pip/iis-web-server-installation.png" alt-text="Screenshot of Add Roles and Features Wizard in Windows Server 2019 showing how to install the I I S Web Server by adding Web Server role.":::
149+
```bash
150+
sudo apt-get update && sudo apt-get install -y nginx
151+
```
181152

182-
1. Select **Confirmation** or select **Next** three times, and then select **Install**. The installation process takes a few minutes to finish.
183-
1. After the installation finishes, select **Close**.
184-
1. Open a web browser. Browse to **localhost** to verify that the default IIS web page appears.
153+
1. Select **Run**.
185154

186-
:::image type="content" source="./media/tutorial-alias-pip/iis-web-server.png" alt-text="Screenshot of Internet Explorer showing the I I S Web Server default web page.":::
155+
1. Wait for the command to complete. The output displays the installation progress and finishes when NGINX is installed.
187156

188157
## Create an alias record
189158

@@ -194,18 +163,18 @@ Create an alias record that points to the public IP address.
194163
1. In the **Add record set**, enter *web01* in the **Name**.
195164
1. Select **A** for the **Type**.
196165
1. Select **Yes** for the **Alias record set**, and then select the **Azure Resource** for the **Alias type**.
197-
1. Select the **Web-01-ip** public IP address for the **Azure resource**.
166+
1. Select the **web-01-ip** public IP address for the **Azure resource**.
198167
1. Select **OK**.
199168

200-
:::image type="content" source="./media/tutorial-alias-pip/add-public-ip-alias-inline.png" alt-text="Screenshot of adding an alias record to refer to the Azure public IP of the I I S web server using the Add record set page." lightbox="./media/tutorial-alias-pip/add-public-ip-alias-expanded.png":::
169+
:::image type="content" source="./media/tutorial-alias-pip/add-public-ip-alias-inline.png" alt-text="Screenshot of adding an alias record to refer to the Azure public IP of the web server using the Add record set page." lightbox="./media/tutorial-alias-pip/add-public-ip-alias-expanded.png":::
201170

202171
## Test the alias record
203172

204173
1. In the Azure portal, enter *virtual machine* in the search box at the top of the portal, and then select **Virtual machines** from the search results.
205-
1. Select the **Web-01** virtual machine. Note the public IP address in the **Overview** page.
206-
1. From a web browser, browse to `web01.contoso.com`, which is the fully qualified domain name of the **Web-01** virtual machine. You now see the IIS default web page.
174+
1. Select the **web-01** virtual machine. Note the public IP address in the **Overview** page.
175+
1. From a web browser, browse to `web01.contoso.com`, which is the fully qualified domain name of the **web-01** virtual machine. You now see the NGINX default web page.
207176
1. Close the web browser.
208-
1. Stop the **Web-01** virtual machine, and then restart it.
177+
1. Stop the **web-01** virtual machine, and then restart it.
209178
1. After the virtual machine restarts, note the new public IP address for the virtual machine.
210179
1. From a web browser, browse again to `web01.contoso.com`.
211180

0 commit comments

Comments
 (0)