5.3. Azure VMs
We have now successfully created and mounted our 20 GB EBS volume on the
new instance. One shortcoming of EBS storage is that it can be mounted only on
one instance at a time. However, we can detach an EBS volume from one instance
and then reattach it to a different instance in the same availability zone.
If you want a volume to be shared with multiple instances, then you can use
the third typ e of instance storage, called Elastic File System, that implements the
Network File System (NFS) standard. This takes a few extra steps to create and
mount, a s shown in the companion Jupyter notebook.
How much do you want to pay?
When it comes to paying for cloud computing,
public cloud services present a bewildering range of options. On Amazon, for example,
these range from less than a cent per hour for a nano instance to several dollars per
hour for a big-storage or graphical processing unit (GPU) system. And that is just
for
on-demand instances
, instances that you request when you need them and pay
for by the hour.
Reserved instances
provide lower costs (by up to 75%) when you
reserve for between one and three years. And
spot instances
allow you to bid on
spare Amazon EC2 computing cap acity. You indicate the price that you are prepared
to pay, and if Amazon has unused instances and your bid is above the current bid
price, you get the machines that you asked for—with the proviso that if your bid
price is exceeded during the lifetime of your instances, the instances are terminated
and any work executing is lost. Spot prices vary considerably; but you can save a lot
of money in this way, especially if your computations are not urgent.
Further complicating things is the fact that prices for different instance typ es,
and especially for spot instances, can vary across Amazon regions. Thus, a really
cost-conscious cloud user might be tempted to search across different instance types
and regions for the best deal for a particular application. That would be a time-
consuming pro cess if you had to do it yourself, but researchers have built tools to do
just that. Ryan Chard, for example, has developed a cost-aware elastic provisioner
that can reduce costs by up to 95% relative to a less sophisticated approach [90].
5.3 Azure VMs
Microsoft’s VM service was announced as Windows Azure in 2008, released to
the public in 2010, extended to support Linux and its Python API in 2012, and
rebranded as Microsoft Azure in 2014. As in the other public clouds, launching and
managing a VM on Azure via the portal is straightforward. As seen in figure 5.4
on the following page, you have many VMs to choose from. Of special interest
to us is the “Linux Data Science VM,” which contains the R server, Anaconda
Python, Jupyter, Postgres database, SQL server, Power BI desktop, and Azure
command l in e tools, and many machine learning tools.
80