by Hong Ooi, senior data scientist, Microsoft Azure
I'm happy to announce version 2.0 of AzureVM, a package for deploying and managing virtual machines in Azure. This is a complete rewrite of the package, with the objective of making it a truly generic and flexible tool for working with VMs and VM scale sets (clusters).
AzureVM 1.0 was a rather limited package in many respects: it came with only a small selection of DSVM templates, and didn't give you many options for changing them. While you could deploy any arbitrary template, this functionality was actually provided by the underlying AzureRMR package, rather than something that AzureVM added.
Here are the main changes in AzureVM 2.0:
- Separate out deployment of VMs and VM clusters; the latter are implemented as scalesets, rather than simplistic arrays of individual VMs. The methods to work with scalesets are named
get_vm_scaleset
,create_vm_scaleset
anddelete_vm_scaleset
;get/create/delete_vm_cluster
are now defunct. - New UI for VM/scaleset creation, with many more ways to fine-tune the deployment options, including specifying the base VM image; networking details like security rules, load balancers and autoscaling; datadisks to attach; use of low-priority VMs for scalesets; etc.
- Several predefined configurations supplied to allow quick deployment of commonly used images (Ubuntu, Windows Server, RHEL, Debian, Centos, DSVM).
- Allow referring to existing resources in a deployment (eg placing VMs into an existing vnet), by supplying
AzureRMR::az_resource
objects as arguments. - Clear distinction between a VM deployment template and a resource.
get_vm
andget_vm_scaleset
will always attempt to retrieve the template; to get the resource, useget_vm_resource
andget_vm_scaleset_resource
. - New VM resource methods:
get_public_ip_address
,get_private_ip_address
. - New cluster/scaleset resource methods:
get_public_ip_address
(technically the address for the load balancer, if present),get_vm_public_ip_addresses
,get_vm_private_ip_addresses
,list_instances
,get_instance
. - Use a pool of background processes to talk to scalesets in parallel when carrying out instance operations. The pool size can be controlled with the global options
azure_vm_minpoolsize
andazure_vm_maxpoolsize
.
See the README and/or the vignette for more information.
Here are some example deployments. A basic Ubuntu VM:
A more complex deployment (Windows 10 Pro):
Creating a scaleset:
Sharing a subnet between a VM and a scaleset:
AzureVM 2.0 is available on CRAN now. If you have any questions, or if you run into problems, please feel free to email me or file an issue at the Github repo.