datadisks: The data disks to attach to the VM. Specify this as either a vector of numeric disk sizes in GB, or a list of datadisk_config objects for more control over the specification.
nsg: The network security group for the scaleset. Can be a call to nsg_config to create a new NSG; an AzureRMR resource object or resource ID to reuse an existing NSG; or NULL to not use an NSG (not recommended).
load_balancer: The load balancer for the scaleset. Can be a call to lb_config to create a new load balancer; an AzureRMR resource object or resource ID to reuse an existing load balancer; or NULL if load balancing is not required.
...: For the specific VM configurations, other customisation arguments to be passed to vm_config. For vmss_config, named arguments that will be folded into the scaleset resource definition in the template.
options: Scaleset options, as obtained via a call to scaleset_options.
image: For vmss_config, the VM image to deploy. This should be an object of class image_config, created by the function of the same name.
vnet: The virtual network for the scaleset. Can be a call to vnet_config to create a new virtual network, or an AzureRMR resource object or resource ID to reuse an existing virtual network. Note that by default, AzureVM will associate the NSG with the virtual network/subnet, not with the VM's network interface.
load_balancer_address: The public IP address for the load balancer. Can be a call to ip_config to create a new IP address, or an AzureRMR resource object or resource ID to reuse an existing address resource. Ignored if load_balancer is NULL.
autoscaler: The autoscaler for the scaleset. Can be a call to autoscaler_config to create a new autoscaler; an AzureRMR resource object or resource ID to reuse an existing autoscaler; or NULL if autoscaling is not required.
other_resources: An optional list of other resources to include in the deployment.
variables: An optional named list of variables to add to the template.
Returns
An object of S3 class vmss_config, that can be used by the create_vm_scaleset method.
Details
These functions are for specifying the details of a new virtual machine scaleset deployment: the base VM image and related options, along with the Azure resources that the scaleset may need. These include the network security group, virtual network, load balancer and associated public IP address, and autoscaler.
Each resource can be specified in a number of ways:
To create a new resource as part of the deployment, call the corresponding *_config function.
To use an existing resource, supply either an AzureRMR::az_resource object (recommended) or a string containing the resource ID.
If the resource is not needed, specify it as NULL.
For the other_resources argument, supply a list of resources, each of which should be a list of resource fields (name, type, properties, sku, etc).
The vmss_config function is the base configuration function, and the others call it to create VM scalesets with specific operating systems and other image details.
ubuntu_dsvm_ss: Data Science Virtual Machine, based on Ubuntu 18.04
windows_dsvm_ss: Data Science Virtual Machine, based on Windows Server 2019
debian_8_backports_ss, debian_9_backports_ss, debian_10_backports_ss, debian_10_backports_gen2_ss: Debian with backports
The VM scaleset configurations with gen2 in the name use generation 2 VMs, which feature several technical improvements over the earlier generation 1. Consider using these for greater efficiency, however note that gen2 VMs are only available for select images and do not support all possible VM sizes.
A VM scaleset configuration defines the following template variables by default, depending on its resources. If a particular resource is created, the corresponding *Name, *Id and *Ref variables will be available. If a resource is referred to but not created, the *Name* and *Id variables will be available. Other variables can be defined via the variables argument.
Default capacity for the autoscaler. Only defined if an autoscaler was created.
Thus, for example, if you are creating a VM scaleset named "myvmss" along with all its associated resources, the NSG is named "myvmss-nsg", the virtual network is "myvmss-vnet", the load balancer is "myvmss-lb", the public IP address is "myvmss-ip", and the autoscaler is "myvm-as".
Examples
# basic Linux (Ubuntu) and Windows configsubuntu_18.04_ss()windows_2019_ss()# Windows DSVM scaleset, no load balancer and autoscalerwindows_dsvm_ss(load_balancer=NULL, autoscaler=NULL)# RHEL VM exposing ports 80 (HTTP) and 443 (HTTPS)rhel_8_ss(nsg=nsg_config(nsg_rule_allow_http, nsg_rule_allow_https))# exposing no ports externallyrhel_8_ss(nsg=nsg_config(list()))# low-priority (spot) VMs, large scaleset (>100 instances allowed), no managed identityrhel_8_ss(options=scaleset_options(priority="spot", large_scaleset=TRUE, managed_identity=FALSE))## Not run:# reusing existing resources: placing a scaleset in an existing vnet/subnet# we don't need a new network security group eithervnet <- AzureRMR::get_azure_login()$ get_subscription("sub_id")$ get_resource_group("rgname")$ get_resource(type="Microsoft.Network/virtualNetworks", name="myvnet")ubuntu_18.04_ss(vnet=vnet, nsg=NULL)## End(Not run)
See Also
scaleset_options for options relating to the scaleset resource itself
nsg_config , ip_config , vnet_config , lb_config , autoscaler_config for other resource configs
build_template for template builder methods
vm_config for configuring an individual virtual machine