4.3 Ubuntu VM on Azure
20210814 Azure is the second largest cloud provider, providing access to compute and data storage that can be created in minutes. An enterprise account or credit card (to establish identity) is required to use Azure. A free USD200 credit is available for a one month trial.
After signing up with Azure, the Azure Portal will allow you to create a new Ubuntu server:
- Click on + Create a resource
- Search the Marketplace for Canonical Ubuntu Server 20.04 LTS
- Click on Create to enter the Create a virtual machine page
- Basic Setup:
- Create new resource group to keep all components together;
- Virtual machine name, choosing something appropriate, like the resource group name;
- Select a Region, noting costs vary across regions;
- Choose Azure Spot instance to minimise costs, Capacity only usually;
- Size, D2s v3 (2 vCPUs and 8GiB of memory for as little as 1.25c/hour) is a good baseline
- Authentication type using SSH public key with your public key;
- Choose a Username for your administrator;
- Then Review + create to stand up the server.
Once created click on the Go to resource, then the Overview and provide a DNS name by clicking on the Not configured link. You may be able to provide a DNS name label and click Save. If you see the message This public IP address can’t be updated because it is associated to the IP configuration ‘ipconfig1’, in the network interface ‘abc123’. then do the following (thanks to StackOverflow):
- Click on the Overview from the Public IP address page;
- Take note of the value of Associated to;
- Click the Dissociate at the top and then Yes to confirm;
- Under Configuration add a DNS name label and then Save;
- Back under Overview, choose to Associate the Network Interface with that noted above.
- I like to create a new resource group for each new VM, so that all of its resources (the VM itself, public IP address, Network security group, Virtual network, Network interface, and Disk) can be deleted as required, simply by deleting the resource group.
- I tend to use the same name for the resource group, the machine itself, and the DNS name.
- For an Azure Spot Virtual Machine, you can schedule an Azure Scheduled Event for a 30 second warning of eviction.
Your donation will support ongoing availability and give you access to the PDF version of the book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0.