2 Creating a virtual machine

 

Ready to see how quickly you can set up a web server in Azure? In this chapter, we’ll dive straight into one of the most common requests when it comes to VMs: building a basic web server. This workload is a great example of the core Infrastructure as a Service (IaaS) components in Azure.

Assume that you work for a pizza store that wants to expand its operations and accept online orders for pizza delivery or takeout. To build an online presence, you need a website. In the first couple of parts of this book, we’ll explore the different features and services in Azure that let you build and run both IaaS and Platform as a Service (PaaS) web applications. You can start to make informed decisions as to when to build and run a VM to power a website and when you might use PaaS to do so. But the first step is building a web server.

In this chapter, you’ll create an Ubuntu Linux VM and install a basic web server. Don’t worry about using Linux; you’ll create a Windows VM in the end-of-chapter lab exercise! Ubuntu is a common web server platform, and it’s a great way to learn about SSH public-key authentication. Then you’ll see how to open a network port for customers to access your website on the internet. A high-level overview of this basic environment is shown in figure 2.1.

Figure 2.1 In this chapter, you create a basic VM, log in to install a web server, and then open a network port to allow customers to browse to the sample website.

2.1 Virtual machine configuration basics

2.1.1 Regions and availability options

2.1.2 VM images

2.1.3 VM sizes

2.1.4 Azure storage

2.1.5 Virtual networking

2.2 Creating an SSH key pair for authentication

2.3 Creating a VM from your web browser

2.4 Connecting to the VM and installing the web server

2.4.1 Connecting to the VM with SSH

2.4.2 Installing the web server

2.5 Allowing web traffic to reach the VM

2.5.1 Creating a rule to allow web traffic

2.5.2 Viewing the web server in action

2.6 Lab: Creating a Windows VM

sitemap