Choosing a Virtual Machine Image

Now that we have the SSH key we can provision the Azure VM from the Docker on the Ubuntu Server image using the Azure Portal. The portal can be accessed at http://portal.azure.com.

Sign in to the Azure Portal by entering http://portal.azure.com in your browser. Once the homepage has loaded, click the “+ New” button in the upper left corner, enter Docker in the “Search the marketplace” text box and hit “Enter.” Figure 2.5 shows the portal displaying the search results for Docker.

Image

FIGURE 2.5: Search results for Docker in the portal

Next, we click the “Docker on Ubuntu Server (preview)” image. Canonical and Microsoft Open Tech created this image specifically to make it easy to set up an Azure VM as a Docker host. Clicking on this image will take us to a new page, which is called blade in the portal, displaying information about the Azure image. Figure 2.6 shows the Information blade.

Image

FIGURE 2.6: Information blade


Image Deployment Model

Azure knows two deployment models: classic and resource manager. This image is based on the classic deployment model, which means it does not use Azure Resource Manager. The preferred model is Azure Resource Manager, but at the time of writing, the image was for the classic model. If you want to create an Azure VM as Docker host using the resource manager model, you can use the template “docker-simple-on-ubuntu” under Azure-Quickstart-Templates on GitHub.


Clicking the “Create” button opens up the Create VM blade as shown in Figure 2.7.

Image

FIGURE 2.7: Create new VM blade

First we need to enter the Host Name for our virtual machine. For the purpose of this exercise, we can just call it dockerhost. The next textbox requires us to provide a User name.

We need the User name to connect to the Linux virtual machine using the Secure Shell (SSH) client. Enter “dockeradmin” as the User Name. Now we need to choose an authentication type. We can choose between Password and SSH public key. The most common way of connecting to remote Linux servers is SSH. The Azure Portal also enables us to enter a password, but we want to follow some standard security best practices and create a “password-less” virtual machine.

We now open the .pub file that we have created earlier in a text editor like TextEdit, and copy the key into the clipboard (you can delete username@machine at the end of the key).

The last step of the VM generation process is to paste the key into the SSH Public Key text field in the Create VM blade.

We can leave the defaults for pricing tier, optional configuration, resource group, and subscription option. The only thing we should change is the location option. We want to make sure to choose a location close to our location to avoid latency issues when accessing the virtual machine. Finally we can click the “Create” button to start the creation of the Azure VM. The portal homepage will appear and provide a status of the creation as shown in Figure 2.8.

Image

FIGURE 2.8: Status of Azure VM creation

Once the Azure VM is up and running, usually within five minutes or less, the portal opens the Virtual Machine blade that contains useful information such as the status of the machine, DNS name, location, virtual IP address and so on. From this blade, we need to get the full DNS name of the Azure VM. The Azure Portal appends a random string to the host name to make sure the DNS name is unique. Figure 2.9 shows the portal blade with the DNS name of our deployment being dockerhost-3udvgzn4.cloudapp.net.

Image

FIGURE 2.9: Blade with Azure VM information

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.131.10