зеркало из https://github.com/Azure/AzureVM.git
Image update (#20)
- Update preset VM configs with new images - Fix bug in Windows scaleset creation - Include gen2 images in list of preset configs
This commit is contained in:
Родитель
9fad8b15b7
Коммит
bb39d3d34d
|
@ -18,7 +18,9 @@ Imports:
|
||||||
jsonlite
|
jsonlite
|
||||||
Suggests:
|
Suggests:
|
||||||
knitr,
|
knitr,
|
||||||
|
rmarkdown,
|
||||||
testthat,
|
testthat,
|
||||||
|
parallel,
|
||||||
AzureKeyVault,
|
AzureKeyVault,
|
||||||
AzureVMmetadata
|
AzureVMmetadata
|
||||||
Roxygen: list(markdown=TRUE, r6=FALSE, old_usage=TRUE)
|
Roxygen: list(markdown=TRUE, r6=FALSE, old_usage=TRUE)
|
||||||
|
|
18
NAMESPACE
18
NAMESPACE
|
@ -16,7 +16,13 @@ export(centos_7.5)
|
||||||
export(centos_7.5_ss)
|
export(centos_7.5_ss)
|
||||||
export(centos_7.6)
|
export(centos_7.6)
|
||||||
export(centos_7.6_ss)
|
export(centos_7.6_ss)
|
||||||
|
export(centos_8.1)
|
||||||
|
export(centos_8.1_ss)
|
||||||
export(datadisk_config)
|
export(datadisk_config)
|
||||||
|
export(debian_10_backports)
|
||||||
|
export(debian_10_backports_gen2)
|
||||||
|
export(debian_10_backports_gen2_ss)
|
||||||
|
export(debian_10_backports_ss)
|
||||||
export(debian_8_backports)
|
export(debian_8_backports)
|
||||||
export(debian_8_backports_ss)
|
export(debian_8_backports_ss)
|
||||||
export(debian_9_backports)
|
export(debian_9_backports)
|
||||||
|
@ -63,6 +69,14 @@ export(nsg_rule_allow_ssh)
|
||||||
export(rhel_7.6)
|
export(rhel_7.6)
|
||||||
export(rhel_7.6_ss)
|
export(rhel_7.6_ss)
|
||||||
export(rhel_8)
|
export(rhel_8)
|
||||||
|
export(rhel_8.1)
|
||||||
|
export(rhel_8.1_gen2)
|
||||||
|
export(rhel_8.1_gen2_ss)
|
||||||
|
export(rhel_8.1_ss)
|
||||||
|
export(rhel_8.2)
|
||||||
|
export(rhel_8.2_gen2)
|
||||||
|
export(rhel_8.2_gen2_ss)
|
||||||
|
export(rhel_8.2_ss)
|
||||||
export(rhel_8_ss)
|
export(rhel_8_ss)
|
||||||
export(scaleset_options)
|
export(scaleset_options)
|
||||||
export(subnet_config)
|
export(subnet_config)
|
||||||
|
@ -71,8 +85,12 @@ export(ubuntu_16.04_ss)
|
||||||
export(ubuntu_18.04)
|
export(ubuntu_18.04)
|
||||||
export(ubuntu_18.04_ss)
|
export(ubuntu_18.04_ss)
|
||||||
export(ubuntu_20.04)
|
export(ubuntu_20.04)
|
||||||
|
export(ubuntu_20.04_gen2)
|
||||||
|
export(ubuntu_20.04_gen2_ss)
|
||||||
export(ubuntu_20.04_ss)
|
export(ubuntu_20.04_ss)
|
||||||
export(ubuntu_dsvm)
|
export(ubuntu_dsvm)
|
||||||
|
export(ubuntu_dsvm_gen2)
|
||||||
|
export(ubuntu_dsvm_gen2_ss)
|
||||||
export(ubuntu_dsvm_ss)
|
export(ubuntu_dsvm_ss)
|
||||||
export(user_config)
|
export(user_config)
|
||||||
export(vm_config)
|
export(vm_config)
|
||||||
|
|
5
NEWS.md
5
NEWS.md
|
@ -1,7 +1,10 @@
|
||||||
# AzureVM 2.1.1.9000
|
# AzureVM 2.1.1.9000
|
||||||
|
|
||||||
- Add ability to retrieve an SSH public key from an Azure resource object. See `?user_config` for more information.
|
- Add ability to retrieve an SSH public key from an Azure resource object. See `?user_config` for more information.
|
||||||
- Add Ubuntu 20.04 as a predefined configuration.
|
- New predefined configurations for VMs and VM scalesets: Ubuntu 20.04; Debian 10 (w/backports); Centos 8.1; RHEL 8.1 and 8.2; Windows Server 2019. All new configurations except Centos are available as both generation 1 and generation 2 VMs. See `?vm_config` and `?vmss_config` for more information.
|
||||||
|
- Update the DSVM configuration functions `linux_dsvm` and `windows_dsvm` to use the latest images. The Linux DSVM no longer has a built-in data disk, so the `dsvm_disk_type` argument has been removed.
|
||||||
|
- New `linux_dsvm_gen2` configuration to create a gen2 Linux DSVM.
|
||||||
|
- Fix a bug that prevented Windows scalesets from being created.
|
||||||
|
|
||||||
# AzureVM 2.1.1
|
# AzureVM 2.1.1
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
# virtual machine images ========================
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
centos_7.5 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("OpenLogic", "CentOS", "7.5"),
|
||||||
|
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
centos_7.6 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("OpenLogic", "CentOS", "7.6"),
|
||||||
|
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
centos_8.1 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("OpenLogic", "CentOS", "8_1"),
|
||||||
|
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# virtual machine scaleset images ===============
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
centos_7.5_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
||||||
|
probes=list(lb_probe_ssh)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vmss_config(image_config("OpenLogic", "CentOS", "7.5"),
|
||||||
|
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
centos_7.6_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
||||||
|
probes=list(lb_probe_ssh)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vmss_config(image_config("OpenLogic", "CentOS", "7.6"),
|
||||||
|
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
centos_8.1_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
||||||
|
probes=list(lb_probe_ssh)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vmss_config(image_config("OpenLogic", "CentOS", "8_1"),
|
||||||
|
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,89 @@
|
||||||
|
# virtual machine images ========================
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
debian_8_backports <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("Credativ", "Debian", "8-backports"),
|
||||||
|
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
debian_9_backports <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("Credativ", "Debian", "9-backports"),
|
||||||
|
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
debian_10_backports <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("Debian", "Debian-10", "10-backports"),
|
||||||
|
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
debian_10_backports_gen2 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("Debian", "Debian-10", "10-backports-gen2"),
|
||||||
|
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# virtual machine scaleset images ===============
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
debian_8_backports_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
||||||
|
probes=list(lb_probe_ssh)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vmss_config(image_config("Credativ", "Debian", "8-backports"),
|
||||||
|
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
debian_9_backports_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
||||||
|
probes=list(lb_probe_ssh)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vmss_config(image_config("Credativ", "Debian", "9-backports"),
|
||||||
|
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
debian_10_backports_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
||||||
|
probes=list(lb_probe_ssh)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vmss_config(image_config("Debian", "Debian-10", "10-backports"),
|
||||||
|
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
debian_10_backports_gen2_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
||||||
|
probes=list(lb_probe_ssh)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vmss_config(image_config("Debian", "Debian-10", "10-backports-gen2"),
|
||||||
|
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,71 @@
|
||||||
|
# virtual machine images ========================
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
ubuntu_dsvm <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh, nsg_rule_allow_jupyter, nsg_rule_allow_rstudio)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("microsoft-dsvm", "ubuntu-1804", "1804"),
|
||||||
|
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
ubuntu_dsvm_gen2 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh, nsg_rule_allow_jupyter, nsg_rule_allow_rstudio)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("microsoft-dsvm", "ubuntu-1804", "1804-gen2"),
|
||||||
|
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
windows_dsvm <- function(keylogin=FALSE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_rdp)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("microsoft-dsvm", "dsvm-win-2019", "server-2019"),
|
||||||
|
keylogin=FALSE, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# virtual machine scaleset images ===============
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
ubuntu_dsvm_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh, nsg_rule_allow_jupyter, nsg_rule_allow_rstudio)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_ssh, lb_rule_jupyter, lb_rule_rstudio),
|
||||||
|
probes=list(lb_probe_ssh, lb_probe_jupyter, lb_probe_rstudio)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vmss_config(image_config("microsoft-dsvm", "ubuntu-1804", "1804"),
|
||||||
|
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
ubuntu_dsvm_gen2_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh, nsg_rule_allow_jupyter, nsg_rule_allow_rstudio)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_ssh, lb_rule_jupyter, lb_rule_rstudio),
|
||||||
|
probes=list(lb_probe_ssh, lb_probe_jupyter, lb_probe_rstudio)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vmss_config(image_config("microsoft-dsvm", "ubuntu-1804", "1804-gen2"),
|
||||||
|
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
windows_dsvm_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_rdp)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_rdp), probes=list(lb_probe_rdp)),
|
||||||
|
options=scaleset_options(keylogin=FALSE),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
options$keylogin <- FALSE
|
||||||
|
vmss_config(image_config("microsoft-dsvm", "dsvm-win-2019", "server-2019"),
|
||||||
|
options=options, datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,132 @@
|
||||||
|
# virtual machine images ========================
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
rhel_7.6 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("RedHat", "RHEL", "7-RAW"),
|
||||||
|
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
rhel_8 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("RedHat", "RHEL", "8"),
|
||||||
|
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
rhel_8.1 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("RedHat", "RHEL", "8.1"),
|
||||||
|
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
rhel_8.1_gen2 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("RedHat", "RHEL", "81gen2"),
|
||||||
|
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
rhel_8.2 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("RedHat", "RHEL", "8.2"),
|
||||||
|
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
rhel_8.2_gen2 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("RedHat", "RHEL", "82gen2"),
|
||||||
|
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# virtual machine scaleset images ===============
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
rhel_7.6_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
||||||
|
probes=list(lb_probe_ssh)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vmss_config(image_config("RedHat", "RHEL", "7-RAW"),
|
||||||
|
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
rhel_8_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
||||||
|
probes=list(lb_probe_ssh)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vmss_config(image_config("RedHat", "RHEL", "8"),
|
||||||
|
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
rhel_8.1_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
||||||
|
probes=list(lb_probe_ssh)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vmss_config(image_config("RedHat", "RHEL", "8.1"),
|
||||||
|
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
rhel_8.1_gen2_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
||||||
|
probes=list(lb_probe_ssh)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vmss_config(image_config("RedHat", "RHEL", "81gen2"),
|
||||||
|
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
rhel_8.2_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
||||||
|
probes=list(lb_probe_ssh)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vmss_config(image_config("RedHat", "RHEL", "8.2"),
|
||||||
|
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
rhel_8.2_gen2_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
||||||
|
probes=list(lb_probe_ssh)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vmss_config(image_config("RedHat", "RHEL", "82gen2"),
|
||||||
|
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,90 @@
|
||||||
|
# virtual machine images ========================
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
ubuntu_16.04 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("Canonical", "UbuntuServer", "16.04-LTS"),
|
||||||
|
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
ubuntu_18.04 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("Canonical", "UbuntuServer", "18.04-LTS"),
|
||||||
|
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
ubuntu_20.04 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("Canonical", "0001-com-ubuntu-server-focal", "20_04-LTS"),
|
||||||
|
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
ubuntu_20.04_gen2 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("Canonical", "0001-com-ubuntu-server-focal", "20_04-LTS-gen2"),
|
||||||
|
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# virtual machine scaleset images ===============
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
ubuntu_16.04_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
||||||
|
probes=list(lb_probe_ssh)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vmss_config(image_config("Canonical", "UbuntuServer", "16.04-LTS"),
|
||||||
|
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
ubuntu_18.04_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
||||||
|
probes=list(lb_probe_ssh)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vmss_config(image_config("Canonical", "UbuntuServer", "18.04-LTS"),
|
||||||
|
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
ubuntu_20.04_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
||||||
|
probes=list(lb_probe_ssh)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vmss_config(image_config("Canonical", "0001-com-ubuntu-server-focal", "20_04-LTS"),
|
||||||
|
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
ubuntu_20.04_gen2_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
||||||
|
probes=list(lb_probe_ssh)),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
vmss_config(image_config("Canonical", "0001-com-ubuntu-server-focal", "20_04-LTS-gen2"),
|
||||||
|
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,73 @@
|
||||||
|
# virtual machine images ========================
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
windows_2016 <- function(keylogin=FALSE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_rdp)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("MicrosoftWindowsServer", "WindowsServer", "2016-Datacenter"),
|
||||||
|
keylogin=FALSE, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
windows_2019 <- function(keylogin=FALSE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_rdp)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("MicrosoftWindowsServer", "WindowsServer", "2019-Datacenter"),
|
||||||
|
keylogin=FALSE, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vm_config
|
||||||
|
#' @export
|
||||||
|
windows_2019_gen2 <- function(keylogin=FALSE, managed_identity=TRUE, datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_rdp)), ...)
|
||||||
|
{
|
||||||
|
vm_config(image_config("MicrosoftWindowsServer", "WindowsServer", "2019-Datacenter-gensecond"),
|
||||||
|
keylogin=FALSE, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# virtual machine scaleset images ===============
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
windows_2016_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_rdp)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_rdp),
|
||||||
|
probes=list(lb_probe_rdp)),
|
||||||
|
options=scaleset_options(keylogin=FALSE),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
options$keylogin <- FALSE
|
||||||
|
vmss_config(image_config("MicrosoftWindowsServer", "WindowsServer", "2016-Datacenter"),
|
||||||
|
options=options, datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
windows_2019_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_rdp)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_rdp),
|
||||||
|
probes=list(lb_probe_rdp)),
|
||||||
|
options=scaleset_options(keylogin=FALSE),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
options$keylogin <- FALSE
|
||||||
|
vmss_config(image_config("MicrosoftWindowsServer", "WindowsServer", "2019-Datacenter"),
|
||||||
|
options=options, datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
||||||
|
|
||||||
|
#' @rdname vmss_config
|
||||||
|
#' @export
|
||||||
|
windows_2019_gen2_ss <- function(datadisks=numeric(0),
|
||||||
|
nsg=nsg_config(list(nsg_rule_allow_rdp)),
|
||||||
|
load_balancer=lb_config(rules=list(lb_rule_rdp),
|
||||||
|
probes=list(lb_probe_rdp)),
|
||||||
|
options=scaleset_options(keylogin=FALSE),
|
||||||
|
...)
|
||||||
|
{
|
||||||
|
options$keylogin <- FALSE
|
||||||
|
vmss_config(image_config("MicrosoftWindowsServer", "WindowsServer", "2019-Datacenter-gensecond"),
|
||||||
|
options=options, datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
||||||
|
}
|
136
R/vm_config.R
136
R/vm_config.R
|
@ -5,7 +5,6 @@
|
||||||
#' @param managed_identity Whether to provide a managed system identity for the VM.
|
#' @param managed_identity Whether to provide a managed system identity for the VM.
|
||||||
#' @param 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.
|
#' @param 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.
|
||||||
#' @param os_disk_type The type of primary disk for the VM. Can be "Premium_LRS" (the default), "StandardSSD_LRS", or "Standard_LRS". Of these, "Standard_LRS" uses hard disks and the others use SSDs as the underlying hardware. Change this to "StandardSSD_LRS" or "Standard_LRS" if the VM size doesn't support premium storage.
|
#' @param os_disk_type The type of primary disk for the VM. Can be "Premium_LRS" (the default), "StandardSSD_LRS", or "Standard_LRS". Of these, "Standard_LRS" uses hard disks and the others use SSDs as the underlying hardware. Change this to "StandardSSD_LRS" or "Standard_LRS" if the VM size doesn't support premium storage.
|
||||||
#' @param dsvm_disk_type The Ubuntu DSVM image comes with one additional datadisk that holds some installed tools. This argument sets what type of disk is used. Change this to "StandardSSD_LRS" or "Standard_LRS" if the VM size doesn't support premium storage.
|
|
||||||
#' @param nsg The network security group for the VM. 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).
|
#' @param nsg The network security group for the VM. 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).
|
||||||
#' @param ip The public IP address for the VM. Can be a call to `ip_config` to create a new IP address; an AzureRMR resource object or resource ID to reuse an existing address resource; or NULL if the VM should not be accessible from outside its subnet.
|
#' @param ip The public IP address for the VM. Can be a call to `ip_config` to create a new IP address; an AzureRMR resource object or resource ID to reuse an existing address resource; or NULL if the VM should not be accessible from outside its subnet.
|
||||||
#' @param vnet The virtual network for the VM. 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.
|
#' @param vnet The virtual network for the VM. 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.
|
||||||
|
@ -17,12 +16,14 @@
|
||||||
#' @details
|
#' @details
|
||||||
#' These functions are for specifying the details of a new virtual machine deployment: the VM image and related options, along with the Azure resources that the VM may need. These include the datadisks, network security group, public IP address (if the VM is to be accessible from outside its subnet), virtual network, and network interface. `vm_config` is the base configuration function, and the others call it to create VMs with specific operating systems and other image details.
|
#' These functions are for specifying the details of a new virtual machine deployment: the VM image and related options, along with the Azure resources that the VM may need. These include the datadisks, network security group, public IP address (if the VM is to be accessible from outside its subnet), virtual network, and network interface. `vm_config` is the base configuration function, and the others call it to create VMs with specific operating systems and other image details.
|
||||||
#' - `ubuntu_dsvm`: Data Science Virtual Machine, based on Ubuntu 18.04
|
#' - `ubuntu_dsvm`: Data Science Virtual Machine, based on Ubuntu 18.04
|
||||||
#' - `windows_dsvm`: Data Science Virtual Machine, based on Windows Server 2016
|
#' - `windows_dsvm`: Data Science Virtual Machine, based on Windows Server 2019
|
||||||
#' - `ubuntu_16.04`, `ubuntu_18.04`: Ubuntu LTS
|
#' - `ubuntu_16.04`, `ubuntu_18.04`, `ubuntu_20.04`, `ubuntu_20.04_gen2`: Ubuntu LTS
|
||||||
#' - `windows_2016`, `windows_2019`: Windows Server Datacenter edition
|
#' - `windows_2016`, `windows_2019`: Windows Server Datacenter edition
|
||||||
#' - `rhel_7.6`, `rhel_8`: Red Hat Enterprise Linux
|
#' - `rhel_7.6`, `rhel_8`, `rhel_8.1`, `rhel_8.1_gen2`, `rhel_8.2`, ``rhel_8.2_gen2: Red Hat Enterprise Linux
|
||||||
#' - `centos_7.5`, `centos_7.6`: CentOS
|
#' - `centos_7.5`, `centos_7.6`, `centos_8.1`: CentOS
|
||||||
#' - `debian_8_backports`, `debian_9_backports`: Debian with backports
|
#' - `debian_8_backports`, `debian_9_backports`, `debian_10_backports`, `debian_10_backports_gen2`: Debian with backports
|
||||||
|
#'
|
||||||
|
#' The VM configurations with `gen2` in the name are [generation 2 VMs](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/generation-2), 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.
|
||||||
#'
|
#'
|
||||||
#' Each resource can be specified in a number of ways:
|
#' 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 _create_ a new resource as part of the deployment, call the corresponding `*_config` function.
|
||||||
|
@ -196,126 +197,3 @@ vm_fixup_ip <- function(ip)
|
||||||
ip
|
ip
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#' @rdname vm_config
|
|
||||||
#' @export
|
|
||||||
ubuntu_dsvm <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
|
||||||
dsvm_disk_type=c("Premium_LRS", "StandardSSD_LRS", "Standard_LRS"),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_ssh, nsg_rule_allow_jupyter, nsg_rule_allow_rstudio)),
|
|
||||||
...)
|
|
||||||
{
|
|
||||||
if(is.numeric(datadisks))
|
|
||||||
datadisks <- lapply(datadisks, datadisk_config)
|
|
||||||
dsvm_disk_type <- match.arg(dsvm_disk_type)
|
|
||||||
disk0 <- datadisk_config(NULL, NULL, "fromImage", dsvm_disk_type)
|
|
||||||
vm_config(image_config("microsoft-dsvm", "linux-data-science-vm-ubuntu", "linuxdsvmubuntu"),
|
|
||||||
keylogin=keylogin, managed_identity=managed_identity, datadisks=c(list(disk0), datadisks), nsg=nsg, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vm_config
|
|
||||||
#' @export
|
|
||||||
windows_dsvm <- function(keylogin=FALSE, managed_identity=TRUE, datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_rdp)), ...)
|
|
||||||
{
|
|
||||||
vm_config(image_config("microsoft-dsvm", "dsvm-windows", "server-2016"),
|
|
||||||
keylogin=FALSE, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vm_config
|
|
||||||
#' @export
|
|
||||||
ubuntu_16.04 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
|
||||||
{
|
|
||||||
vm_config(image_config("Canonical", "UbuntuServer", "16.04-LTS"),
|
|
||||||
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vm_config
|
|
||||||
#' @export
|
|
||||||
ubuntu_18.04 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
|
||||||
{
|
|
||||||
vm_config(image_config("Canonical", "UbuntuServer", "18.04-LTS"),
|
|
||||||
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vm_config
|
|
||||||
#' @export
|
|
||||||
windows_2016 <- function(keylogin=FALSE, managed_identity=TRUE, datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_rdp)), ...)
|
|
||||||
{
|
|
||||||
vm_config(image_config("MicrosoftWindowsServer", "WindowsServer", "2016-Datacenter"),
|
|
||||||
keylogin=FALSE, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vm_config
|
|
||||||
#' @export
|
|
||||||
windows_2019 <- function(keylogin=FALSE, managed_identity=TRUE, datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_rdp)), ...)
|
|
||||||
{
|
|
||||||
vm_config(image_config("MicrosoftWindowsServer", "WindowsServer", "2019-Datacenter"),
|
|
||||||
keylogin=FALSE, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vm_config
|
|
||||||
#' @export
|
|
||||||
rhel_7.6 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
|
||||||
{
|
|
||||||
vm_config(image_config("RedHat", "RHEL", "7-RAW"),
|
|
||||||
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vm_config
|
|
||||||
#' @export
|
|
||||||
rhel_8 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
|
||||||
{
|
|
||||||
vm_config(image_config("RedHat", "RHEL", "8"),
|
|
||||||
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vm_config
|
|
||||||
#' @export
|
|
||||||
centos_7.5 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
|
||||||
{
|
|
||||||
vm_config(image_config("OpenLogic", "CentOS", "7.5"),
|
|
||||||
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vm_config
|
|
||||||
#' @export
|
|
||||||
centos_7.6 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
|
||||||
{
|
|
||||||
vm_config(image_config("OpenLogic", "CentOS", "7.6"),
|
|
||||||
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vm_config
|
|
||||||
#' @export
|
|
||||||
debian_8_backports <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
|
||||||
{
|
|
||||||
vm_config(image_config("Credativ", "Debian", "8-backports"),
|
|
||||||
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vm_config
|
|
||||||
#' @export
|
|
||||||
debian_9_backports <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
|
||||||
{
|
|
||||||
vm_config(image_config("Credativ", "Debian", "9-backports"),
|
|
||||||
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vm_config
|
|
||||||
#' @export
|
|
||||||
ubuntu_20.04 <- function(keylogin=TRUE, managed_identity=TRUE, datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_ssh)), ...)
|
|
||||||
{
|
|
||||||
vm_config(image_config("Canonical", "0001-com-ubuntu-server-focal", "20_04-LTS"),
|
|
||||||
keylogin=keylogin, managed_identity=managed_identity, datadisks=datadisks, nsg=nsg, ...)
|
|
||||||
}
|
|
||||||
|
|
185
R/vmss_config.R
185
R/vmss_config.R
|
@ -3,7 +3,6 @@
|
||||||
#' @param 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.
|
#' @param 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.
|
||||||
#' @param options Scaleset options, as obtained via a call to `scaleset_options`.
|
#' @param options Scaleset options, as obtained via a call to `scaleset_options`.
|
||||||
#' @param 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.
|
#' @param 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.
|
||||||
#' @param dsvm_disk_type The Ubuntu DSVM image comes with one additional datadisk that holds some installed tools. This argument sets what type of disk is used. Change this to "StandardSSD_LRS" or "Standard_LRS" if the VM size doesn't support premium storage.
|
|
||||||
#' @param 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).
|
#' @param 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).
|
||||||
#' @param 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.
|
#' @param 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.
|
||||||
#' @param 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.
|
#' @param 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.
|
||||||
|
@ -23,13 +22,15 @@
|
||||||
#' - 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).
|
#' - 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.
|
#' 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 16.04
|
#' - `ubuntu_dsvm_ss`: Data Science Virtual Machine, based on Ubuntu 18.04
|
||||||
#' - `windows_dsvm_ss`: Data Science Virtual Machine, based on Windows Server 2016
|
#' - `windows_dsvm_ss`: Data Science Virtual Machine, based on Windows Server 2019
|
||||||
#' - `ubuntu_16.04_ss`, `ubuntu_18.04`: Ubuntu LTS
|
#' - `ubuntu_16.04_ss`, `ubuntu_18.04_ss`, `ubuntu_20.04_ss`, `ubuntu_20.04_gen2_ss`: Ubuntu LTS
|
||||||
#' - `windows_2016_ss`, `windows_2019`: Windows Server Datacenter edition
|
#' - `windows_2016_ss`, `windows_2019_ss`: Windows Server Datacenter edition
|
||||||
#' - `rhel_7.6_ss`, `rhel_8_ss`: Red Hat Enterprise Linux
|
#' - `rhel_7.6_ss`, `rhel_8_ss`, `rhel_8.1_ss`, `rhel_8.1_gen2_ss`, `rhel_8.2_ss`, `rhel_8.2_gen2_ss`: Red Hat Enterprise Linux
|
||||||
#' - `centos_7.5_ss`, `centos_7.6_ss`: CentOS
|
#' - `centos_7.5_ss`, `centos_7.6_ss`, `centos_8.1_ss`: CentOS
|
||||||
#' - `debian_8_backports_ss`, `debian_9_backports_ss`: Debian with backports
|
#' - `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](https://docs.microsoft.com/en-us/azure/virtual-machines/windows/generation-2), 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.
|
#' 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.
|
||||||
#'
|
#'
|
||||||
|
@ -223,174 +224,6 @@ vmss_fixup_ip <- function(options, lb, ip)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#' @rdname vmss_config
|
|
||||||
#' @export
|
|
||||||
ubuntu_dsvm_ss <- function(datadisks=numeric(0),
|
|
||||||
dsvm_disk_type=c("Premium_LRS", "StandardSSD_LRS", "Standard_LRS"),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_ssh, nsg_rule_allow_jupyter, nsg_rule_allow_rstudio)),
|
|
||||||
load_balancer=lb_config(rules=list(lb_rule_ssh, lb_rule_jupyter, lb_rule_rstudio),
|
|
||||||
probes=list(lb_probe_ssh, lb_probe_jupyter, lb_probe_rstudio)),
|
|
||||||
...)
|
|
||||||
{
|
|
||||||
if(is.numeric(datadisks))
|
|
||||||
datadisks <- lapply(datadisks, datadisk_config)
|
|
||||||
dsvm_disk_type <- match.arg(dsvm_disk_type)
|
|
||||||
disk0 <- datadisk_config(NULL, NULL, "fromImage", dsvm_disk_type)
|
|
||||||
vmss_config(image_config("microsoft-dsvm", "linux-data-science-vm-ubuntu", "linuxdsvmubuntu"),
|
|
||||||
datadisks=c(list(disk0), datadisks), nsg=nsg, load_balancer=load_balancer, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vmss_config
|
|
||||||
#' @export
|
|
||||||
windows_dsvm_ss <- function(datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_rdp)),
|
|
||||||
load_balancer=lb_config(rules=list(lb_rule_rdp),
|
|
||||||
probes=list(lb_probe_rdp)),
|
|
||||||
options=scaleset_options(keylogin=FALSE),
|
|
||||||
...)
|
|
||||||
{
|
|
||||||
options$keylogin <- FALSE
|
|
||||||
vmss_config(image_config("microsoft-dsvm", "dsvm-windows", "server-2016"),
|
|
||||||
options=options, datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vmss_config
|
|
||||||
#' @export
|
|
||||||
ubuntu_16.04_ss <- function(datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
|
||||||
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
|
||||||
probes=list(lb_probe_ssh)),
|
|
||||||
...)
|
|
||||||
{
|
|
||||||
vmss_config(image_config("Canonical", "UbuntuServer", "16.04-LTS"),
|
|
||||||
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vmss_config
|
|
||||||
#' @export
|
|
||||||
ubuntu_18.04_ss <- function(datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
|
||||||
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
|
||||||
probes=list(lb_probe_ssh)),
|
|
||||||
...)
|
|
||||||
{
|
|
||||||
vmss_config(image_config("Canonical", "UbuntuServer", "18.04-LTS"),
|
|
||||||
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vmss_config
|
|
||||||
#' @export
|
|
||||||
windows_2016_ss <- function(datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_rdp)),
|
|
||||||
load_balancer=lb_config(rules=list(lb_rule_rdp),
|
|
||||||
probes=list(lb_probe_rdp)),
|
|
||||||
options=scaleset_options(keylogin=FALSE),
|
|
||||||
...)
|
|
||||||
{
|
|
||||||
options$keylogin <- FALSE
|
|
||||||
vmss_config(image_config("MicrosoftWindowsServer", "WindowsServer", "2016-Datacenter"),
|
|
||||||
options=options, datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vmss_config
|
|
||||||
#' @export
|
|
||||||
windows_2019_ss <- function(datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_rdp)),
|
|
||||||
load_balancer=lb_config(rules=list(lb_rule_rdp),
|
|
||||||
probes=list(lb_probe_rdp)),
|
|
||||||
options=scaleset_options(keylogin=FALSE),
|
|
||||||
...)
|
|
||||||
{
|
|
||||||
options$keylogin <- FALSE
|
|
||||||
vmss_config(image_config("MicrosoftWindowsServer", "WindowsServer", "2019-Datacenter"),
|
|
||||||
options=options, datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vmss_config
|
|
||||||
#' @export
|
|
||||||
rhel_7.6_ss <- function(datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
|
||||||
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
|
||||||
probes=list(lb_probe_ssh)),
|
|
||||||
...)
|
|
||||||
{
|
|
||||||
vmss_config(image_config("RedHat", "RHEL", "7-RAW"),
|
|
||||||
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vmss_config
|
|
||||||
#' @export
|
|
||||||
rhel_8_ss <- function(datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
|
||||||
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
|
||||||
probes=list(lb_probe_ssh)),
|
|
||||||
...)
|
|
||||||
{
|
|
||||||
vmss_config(image_config("RedHat", "RHEL", "8"),
|
|
||||||
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vmss_config
|
|
||||||
#' @export
|
|
||||||
centos_7.5_ss <- function(datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
|
||||||
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
|
||||||
probes=list(lb_probe_ssh)),
|
|
||||||
...)
|
|
||||||
{
|
|
||||||
vmss_config(image_config("OpenLogic", "CentOS", "7.5"),
|
|
||||||
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vmss_config
|
|
||||||
#' @export
|
|
||||||
centos_7.6_ss <- function(datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
|
||||||
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
|
||||||
probes=list(lb_probe_ssh)),
|
|
||||||
...)
|
|
||||||
{
|
|
||||||
vmss_config(image_config("OpenLogic", "CentOS", "7.6"),
|
|
||||||
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vmss_config
|
|
||||||
#' @export
|
|
||||||
debian_8_backports_ss <- function(datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
|
||||||
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
|
||||||
probes=list(lb_probe_ssh)),
|
|
||||||
...)
|
|
||||||
{
|
|
||||||
vmss_config(image_config("Credativ", "Debian", "8-backports"),
|
|
||||||
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vmss_config
|
|
||||||
#' @export
|
|
||||||
debian_9_backports_ss <- function(datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
|
||||||
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
|
||||||
probes=list(lb_probe_ssh)),
|
|
||||||
...)
|
|
||||||
{
|
|
||||||
vmss_config(image_config("Credativ", "Debian", "9-backports"),
|
|
||||||
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
#' @rdname vmss_config
|
|
||||||
#' @export
|
|
||||||
ubuntu_20.04_ss <- function(datadisks=numeric(0),
|
|
||||||
nsg=nsg_config(list(nsg_rule_allow_ssh)),
|
|
||||||
load_balancer=lb_config(rules=list(lb_rule_ssh),
|
|
||||||
probes=list(lb_probe_ssh)),
|
|
||||||
...)
|
|
||||||
{
|
|
||||||
vmss_config(image_config("Canonical", "0001-com-ubuntu-server-focal", "20_04-LTS"),
|
|
||||||
datadisks=datadisks, nsg=nsg, load_balancer=load_balancer, ...)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#' Virtual machine scaleset options
|
#' Virtual machine scaleset options
|
||||||
#'
|
#'
|
||||||
#' @param keylogin Whether to use an SSH public key to login (TRUE) or a password (FALSE). Note that Windows does not support SSH key logins.
|
#' @param keylogin Whether to use an SSH public key to login (TRUE) or a password (FALSE). Note that Windows does not support SSH key logins.
|
||||||
|
|
|
@ -29,7 +29,7 @@ add_template_variables.vmss_config <- function(config, ...)
|
||||||
location="[resourceGroup().location]",
|
location="[resourceGroup().location]",
|
||||||
vmId="[resourceId('Microsoft.Compute/virtualMachineScalesets', parameters('vmName'))]",
|
vmId="[resourceId('Microsoft.Compute/virtualMachineScalesets', parameters('vmName'))]",
|
||||||
vmRef="[concat('Microsoft.Compute/virtualMachineScalesets/', parameters('vmName'))]",
|
vmRef="[concat('Microsoft.Compute/virtualMachineScalesets/', parameters('vmName'))]",
|
||||||
vmPrefix="[concat(parameters('vmName'), '-instance')]"
|
vmPrefix="[parameters('vmName')]"
|
||||||
)
|
)
|
||||||
|
|
||||||
for(res in c("nsg", "vnet", "lb", "ip", "as"))
|
for(res in c("nsg", "vnet", "lb", "ip", "as"))
|
||||||
|
|
150
man/vm_config.Rd
150
man/vm_config.Rd
|
@ -1,83 +1,121 @@
|
||||||
% Generated by roxygen2: do not edit by hand
|
% Generated by roxygen2: do not edit by hand
|
||||||
% Please edit documentation in R/vm_config.R
|
% Please edit documentation in R/img_centos.R, R/img_debian.R, R/img_dsvm.R,
|
||||||
\name{vm_config}
|
% R/img_rhel.R, R/img_ubuntu.R, R/img_windows.R, R/vm_config.R
|
||||||
\alias{vm_config}
|
\name{centos_7.5}
|
||||||
\alias{ubuntu_dsvm}
|
|
||||||
\alias{windows_dsvm}
|
|
||||||
\alias{ubuntu_16.04}
|
|
||||||
\alias{ubuntu_18.04}
|
|
||||||
\alias{windows_2016}
|
|
||||||
\alias{windows_2019}
|
|
||||||
\alias{rhel_7.6}
|
|
||||||
\alias{rhel_8}
|
|
||||||
\alias{centos_7.5}
|
\alias{centos_7.5}
|
||||||
\alias{centos_7.6}
|
\alias{centos_7.6}
|
||||||
|
\alias{centos_8.1}
|
||||||
\alias{debian_8_backports}
|
\alias{debian_8_backports}
|
||||||
\alias{debian_9_backports}
|
\alias{debian_9_backports}
|
||||||
|
\alias{debian_10_backports}
|
||||||
|
\alias{debian_10_backports_gen2}
|
||||||
|
\alias{ubuntu_dsvm}
|
||||||
|
\alias{ubuntu_dsvm_gen2}
|
||||||
|
\alias{windows_dsvm}
|
||||||
|
\alias{rhel_7.6}
|
||||||
|
\alias{rhel_8}
|
||||||
|
\alias{rhel_8.1}
|
||||||
|
\alias{rhel_8.1_gen2}
|
||||||
|
\alias{rhel_8.2}
|
||||||
|
\alias{rhel_8.2_gen2}
|
||||||
|
\alias{ubuntu_16.04}
|
||||||
|
\alias{ubuntu_18.04}
|
||||||
\alias{ubuntu_20.04}
|
\alias{ubuntu_20.04}
|
||||||
|
\alias{ubuntu_20.04_gen2}
|
||||||
|
\alias{windows_2016}
|
||||||
|
\alias{windows_2019}
|
||||||
|
\alias{vm_config}
|
||||||
\title{VM configuration functions}
|
\title{VM configuration functions}
|
||||||
\usage{
|
\usage{
|
||||||
vm_config(image, keylogin, managed_identity = TRUE,
|
|
||||||
os_disk_type = c("Premium_LRS", "StandardSSD_LRS", "Standard_LRS"),
|
|
||||||
datadisks = numeric(0), nsg = nsg_config(), ip = ip_config(),
|
|
||||||
vnet = vnet_config(), nic = nic_config(), other_resources = list(),
|
|
||||||
variables = list(), ...)
|
|
||||||
|
|
||||||
ubuntu_dsvm(keylogin = TRUE, managed_identity = TRUE,
|
|
||||||
datadisks = numeric(0), dsvm_disk_type = c("Premium_LRS",
|
|
||||||
"StandardSSD_LRS", "Standard_LRS"),
|
|
||||||
nsg = nsg_config(list(nsg_rule_allow_ssh, nsg_rule_allow_jupyter,
|
|
||||||
nsg_rule_allow_rstudio)), ...)
|
|
||||||
|
|
||||||
windows_dsvm(keylogin = FALSE, managed_identity = TRUE,
|
|
||||||
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_rdp)), ...)
|
|
||||||
|
|
||||||
ubuntu_16.04(keylogin = TRUE, managed_identity = TRUE,
|
|
||||||
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
|
||||||
|
|
||||||
ubuntu_18.04(keylogin = TRUE, managed_identity = TRUE,
|
|
||||||
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
|
||||||
|
|
||||||
windows_2016(keylogin = FALSE, managed_identity = TRUE,
|
|
||||||
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_rdp)), ...)
|
|
||||||
|
|
||||||
windows_2019(keylogin = FALSE, managed_identity = TRUE,
|
|
||||||
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_rdp)), ...)
|
|
||||||
|
|
||||||
rhel_7.6(keylogin = TRUE, managed_identity = TRUE,
|
|
||||||
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
|
||||||
|
|
||||||
rhel_8(keylogin = TRUE, managed_identity = TRUE, datadisks = numeric(0),
|
|
||||||
nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
|
||||||
|
|
||||||
centos_7.5(keylogin = TRUE, managed_identity = TRUE,
|
centos_7.5(keylogin = TRUE, managed_identity = TRUE,
|
||||||
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
|
||||||
centos_7.6(keylogin = TRUE, managed_identity = TRUE,
|
centos_7.6(keylogin = TRUE, managed_identity = TRUE,
|
||||||
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
|
||||||
|
centos_8.1(keylogin = TRUE, managed_identity = TRUE,
|
||||||
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
|
||||||
debian_8_backports(keylogin = TRUE, managed_identity = TRUE,
|
debian_8_backports(keylogin = TRUE, managed_identity = TRUE,
|
||||||
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
|
||||||
debian_9_backports(keylogin = TRUE, managed_identity = TRUE,
|
debian_9_backports(keylogin = TRUE, managed_identity = TRUE,
|
||||||
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
|
||||||
|
debian_10_backports(keylogin = TRUE, managed_identity = TRUE,
|
||||||
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
|
||||||
|
debian_10_backports_gen2(keylogin = TRUE, managed_identity = TRUE,
|
||||||
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
|
||||||
|
ubuntu_dsvm(keylogin = TRUE, managed_identity = TRUE,
|
||||||
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh,
|
||||||
|
nsg_rule_allow_jupyter, nsg_rule_allow_rstudio)), ...)
|
||||||
|
|
||||||
|
ubuntu_dsvm_gen2(keylogin = TRUE, managed_identity = TRUE,
|
||||||
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh,
|
||||||
|
nsg_rule_allow_jupyter, nsg_rule_allow_rstudio)), ...)
|
||||||
|
|
||||||
|
windows_dsvm(keylogin = FALSE, managed_identity = TRUE,
|
||||||
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_rdp)), ...)
|
||||||
|
|
||||||
|
rhel_7.6(keylogin = TRUE, managed_identity = TRUE,
|
||||||
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
|
||||||
|
rhel_8(keylogin = TRUE, managed_identity = TRUE, datadisks = numeric(0),
|
||||||
|
nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
|
||||||
|
rhel_8.1(keylogin = TRUE, managed_identity = TRUE,
|
||||||
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
|
||||||
|
rhel_8.1_gen2(keylogin = TRUE, managed_identity = TRUE,
|
||||||
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
|
||||||
|
rhel_8.2(keylogin = TRUE, managed_identity = TRUE,
|
||||||
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
|
||||||
|
rhel_8.2_gen2(keylogin = TRUE, managed_identity = TRUE,
|
||||||
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
|
||||||
|
ubuntu_16.04(keylogin = TRUE, managed_identity = TRUE,
|
||||||
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
|
||||||
|
ubuntu_18.04(keylogin = TRUE, managed_identity = TRUE,
|
||||||
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
|
||||||
ubuntu_20.04(keylogin = TRUE, managed_identity = TRUE,
|
ubuntu_20.04(keylogin = TRUE, managed_identity = TRUE,
|
||||||
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
|
||||||
|
ubuntu_20.04_gen2(keylogin = TRUE, managed_identity = TRUE,
|
||||||
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_ssh)), ...)
|
||||||
|
|
||||||
|
windows_2016(keylogin = FALSE, managed_identity = TRUE,
|
||||||
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_rdp)), ...)
|
||||||
|
|
||||||
|
windows_2019(keylogin = FALSE, managed_identity = TRUE,
|
||||||
|
datadisks = numeric(0), nsg = nsg_config(list(nsg_rule_allow_rdp)), ...)
|
||||||
|
|
||||||
|
vm_config(image, keylogin, managed_identity = TRUE,
|
||||||
|
os_disk_type = c("Premium_LRS", "StandardSSD_LRS", "Standard_LRS"),
|
||||||
|
datadisks = numeric(0), nsg = nsg_config(), ip = ip_config(),
|
||||||
|
vnet = vnet_config(), nic = nic_config(), other_resources = list(),
|
||||||
|
variables = list(), ...)
|
||||||
}
|
}
|
||||||
\arguments{
|
\arguments{
|
||||||
\item{image}{For \code{vm_config}, the VM image to deploy. This should be an object of class \code{image_config}, created by the function of the same name.}
|
|
||||||
|
|
||||||
\item{keylogin}{Whether to use an SSH public key to login (TRUE) or a password (FALSE). Note that Windows does not support SSH key logins.}
|
\item{keylogin}{Whether to use an SSH public key to login (TRUE) or a password (FALSE). Note that Windows does not support SSH key logins.}
|
||||||
|
|
||||||
\item{managed_identity}{Whether to provide a managed system identity for the VM.}
|
\item{managed_identity}{Whether to provide a managed system identity for the VM.}
|
||||||
|
|
||||||
\item{os_disk_type}{The type of primary disk for the VM. Can be "Premium_LRS" (the default), "StandardSSD_LRS", or "Standard_LRS". Of these, "Standard_LRS" uses hard disks and the others use SSDs as the underlying hardware. Change this to "StandardSSD_LRS" or "Standard_LRS" if the VM size doesn't support premium storage.}
|
|
||||||
|
|
||||||
\item{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 \code{datadisk_config} objects for more control over the specification.}
|
\item{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 \code{datadisk_config} objects for more control over the specification.}
|
||||||
|
|
||||||
\item{nsg}{The network security group for the VM. Can be a call to \code{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).}
|
\item{nsg}{The network security group for the VM. Can be a call to \code{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).}
|
||||||
|
|
||||||
|
\item{...}{For the specific VM configurations, other customisation arguments to be passed to \code{vm_config}. For \code{vm_config}, named arguments that will be folded into the VM resource definition in the template. In particular use \verb{properties=list(*)} to set additional properties for the VM, beyond those set by the various configuration functions.}
|
||||||
|
|
||||||
|
\item{image}{For \code{vm_config}, the VM image to deploy. This should be an object of class \code{image_config}, created by the function of the same name.}
|
||||||
|
|
||||||
|
\item{os_disk_type}{The type of primary disk for the VM. Can be "Premium_LRS" (the default), "StandardSSD_LRS", or "Standard_LRS". Of these, "Standard_LRS" uses hard disks and the others use SSDs as the underlying hardware. Change this to "StandardSSD_LRS" or "Standard_LRS" if the VM size doesn't support premium storage.}
|
||||||
|
|
||||||
\item{ip}{The public IP address for the VM. Can be a call to \code{ip_config} to create a new IP address; an AzureRMR resource object or resource ID to reuse an existing address resource; or NULL if the VM should not be accessible from outside its subnet.}
|
\item{ip}{The public IP address for the VM. Can be a call to \code{ip_config} to create a new IP address; an AzureRMR resource object or resource ID to reuse an existing address resource; or NULL if the VM should not be accessible from outside its subnet.}
|
||||||
|
|
||||||
\item{vnet}{The virtual network for the VM. Can be a call to \code{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.}
|
\item{vnet}{The virtual network for the VM. Can be a call to \code{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.}
|
||||||
|
@ -87,10 +125,6 @@ ubuntu_20.04(keylogin = TRUE, managed_identity = TRUE,
|
||||||
\item{other_resources}{An optional list of other resources to include in the deployment.}
|
\item{other_resources}{An optional list of other resources to include in the deployment.}
|
||||||
|
|
||||||
\item{variables}{An optional named list of variables to add to the template.}
|
\item{variables}{An optional named list of variables to add to the template.}
|
||||||
|
|
||||||
\item{...}{For the specific VM configurations, other customisation arguments to be passed to \code{vm_config}. For \code{vm_config}, named arguments that will be folded into the VM resource definition in the template. In particular use \verb{properties=list(*)} to set additional properties for the VM, beyond those set by the various configuration functions.}
|
|
||||||
|
|
||||||
\item{dsvm_disk_type}{The Ubuntu DSVM image comes with one additional datadisk that holds some installed tools. This argument sets what type of disk is used. Change this to "StandardSSD_LRS" or "Standard_LRS" if the VM size doesn't support premium storage.}
|
|
||||||
}
|
}
|
||||||
\value{
|
\value{
|
||||||
An object of S3 class \code{vm_config}, that can be used by the \code{create_vm} method.
|
An object of S3 class \code{vm_config}, that can be used by the \code{create_vm} method.
|
||||||
|
@ -102,14 +136,16 @@ VM configuration functions
|
||||||
These functions are for specifying the details of a new virtual machine deployment: the VM image and related options, along with the Azure resources that the VM may need. These include the datadisks, network security group, public IP address (if the VM is to be accessible from outside its subnet), virtual network, and network interface. \code{vm_config} is the base configuration function, and the others call it to create VMs with specific operating systems and other image details.
|
These functions are for specifying the details of a new virtual machine deployment: the VM image and related options, along with the Azure resources that the VM may need. These include the datadisks, network security group, public IP address (if the VM is to be accessible from outside its subnet), virtual network, and network interface. \code{vm_config} is the base configuration function, and the others call it to create VMs with specific operating systems and other image details.
|
||||||
\itemize{
|
\itemize{
|
||||||
\item \code{ubuntu_dsvm}: Data Science Virtual Machine, based on Ubuntu 18.04
|
\item \code{ubuntu_dsvm}: Data Science Virtual Machine, based on Ubuntu 18.04
|
||||||
\item \code{windows_dsvm}: Data Science Virtual Machine, based on Windows Server 2016
|
\item \code{windows_dsvm}: Data Science Virtual Machine, based on Windows Server 2019
|
||||||
\item \code{ubuntu_16.04}, \code{ubuntu_18.04}: Ubuntu LTS
|
\item \code{ubuntu_16.04}, \code{ubuntu_18.04}, \code{ubuntu_20.04}, \code{ubuntu_20.04_gen2}: Ubuntu LTS
|
||||||
\item \code{windows_2016}, \code{windows_2019}: Windows Server Datacenter edition
|
\item \code{windows_2016}, \code{windows_2019}: Windows Server Datacenter edition
|
||||||
\item \code{rhel_7.6}, \code{rhel_8}: Red Hat Enterprise Linux
|
\item \code{rhel_7.6}, \code{rhel_8}, \code{rhel_8.1}, \code{rhel_8.1_gen2}, \code{rhel_8.2}, ``rhel_8.2_gen2: Red Hat Enterprise Linux
|
||||||
\item \code{centos_7.5}, \code{centos_7.6}: CentOS
|
\item \code{centos_7.5}, \code{centos_7.6}, \code{centos_8.1}: CentOS
|
||||||
\item \code{debian_8_backports}, \code{debian_9_backports}: Debian with backports
|
\item \code{debian_8_backports}, \code{debian_9_backports}, \code{debian_10_backports}, \code{debian_10_backports_gen2}: Debian with backports
|
||||||
}
|
}
|
||||||
|
|
||||||
|
The VM configurations with \code{gen2} in the name are \href{https://docs.microsoft.com/en-us/azure/virtual-machines/windows/generation-2}{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.
|
||||||
|
|
||||||
Each resource can be specified in a number of ways:
|
Each resource can be specified in a number of ways:
|
||||||
\itemize{
|
\itemize{
|
||||||
\item To \emph{create} a new resource as part of the deployment, call the corresponding \verb{*_config} function.
|
\item To \emph{create} a new resource as part of the deployment, call the corresponding \verb{*_config} function.
|
||||||
|
|
|
@ -1,69 +1,32 @@
|
||||||
% Generated by roxygen2: do not edit by hand
|
% Generated by roxygen2: do not edit by hand
|
||||||
% Please edit documentation in R/vmss_config.R
|
% Please edit documentation in R/img_centos.R, R/img_debian.R, R/img_dsvm.R,
|
||||||
\name{vmss_config}
|
% R/img_rhel.R, R/img_ubuntu.R, R/img_windows.R, R/vmss_config.R
|
||||||
\alias{vmss_config}
|
\name{centos_7.5_ss}
|
||||||
\alias{ubuntu_dsvm_ss}
|
|
||||||
\alias{windows_dsvm_ss}
|
|
||||||
\alias{ubuntu_16.04_ss}
|
|
||||||
\alias{ubuntu_18.04_ss}
|
|
||||||
\alias{windows_2016_ss}
|
|
||||||
\alias{windows_2019_ss}
|
|
||||||
\alias{rhel_7.6_ss}
|
|
||||||
\alias{rhel_8_ss}
|
|
||||||
\alias{centos_7.5_ss}
|
\alias{centos_7.5_ss}
|
||||||
\alias{centos_7.6_ss}
|
\alias{centos_7.6_ss}
|
||||||
|
\alias{centos_8.1_ss}
|
||||||
\alias{debian_8_backports_ss}
|
\alias{debian_8_backports_ss}
|
||||||
\alias{debian_9_backports_ss}
|
\alias{debian_9_backports_ss}
|
||||||
|
\alias{debian_10_backports_ss}
|
||||||
|
\alias{debian_10_backports_gen2_ss}
|
||||||
|
\alias{ubuntu_dsvm_ss}
|
||||||
|
\alias{ubuntu_dsvm_gen2_ss}
|
||||||
|
\alias{windows_dsvm_ss}
|
||||||
|
\alias{rhel_7.6_ss}
|
||||||
|
\alias{rhel_8_ss}
|
||||||
|
\alias{rhel_8.1_ss}
|
||||||
|
\alias{rhel_8.1_gen2_ss}
|
||||||
|
\alias{rhel_8.2_ss}
|
||||||
|
\alias{rhel_8.2_gen2_ss}
|
||||||
|
\alias{ubuntu_16.04_ss}
|
||||||
|
\alias{ubuntu_18.04_ss}
|
||||||
\alias{ubuntu_20.04_ss}
|
\alias{ubuntu_20.04_ss}
|
||||||
|
\alias{ubuntu_20.04_gen2_ss}
|
||||||
|
\alias{windows_2016_ss}
|
||||||
|
\alias{windows_2019_ss}
|
||||||
|
\alias{vmss_config}
|
||||||
\title{Virtual machine scaleset configuration functions}
|
\title{Virtual machine scaleset configuration functions}
|
||||||
\usage{
|
\usage{
|
||||||
vmss_config(image, options = scaleset_options(), datadisks = numeric(0),
|
|
||||||
nsg = nsg_config(), vnet = vnet_config(), load_balancer = lb_config(),
|
|
||||||
load_balancer_address = ip_config(), autoscaler = autoscaler_config(),
|
|
||||||
other_resources = list(), variables = list(), ...)
|
|
||||||
|
|
||||||
ubuntu_dsvm_ss(datadisks = numeric(0), dsvm_disk_type = c("Premium_LRS",
|
|
||||||
"StandardSSD_LRS", "Standard_LRS"),
|
|
||||||
nsg = nsg_config(list(nsg_rule_allow_ssh, nsg_rule_allow_jupyter,
|
|
||||||
nsg_rule_allow_rstudio)), load_balancer = lb_config(rules =
|
|
||||||
list(lb_rule_ssh, lb_rule_jupyter, lb_rule_rstudio), probes =
|
|
||||||
list(lb_probe_ssh, lb_probe_jupyter, lb_probe_rstudio)), ...)
|
|
||||||
|
|
||||||
windows_dsvm_ss(datadisks = numeric(0),
|
|
||||||
nsg = nsg_config(list(nsg_rule_allow_rdp)),
|
|
||||||
load_balancer = lb_config(rules = list(lb_rule_rdp), probes =
|
|
||||||
list(lb_probe_rdp)), options = scaleset_options(keylogin = FALSE), ...)
|
|
||||||
|
|
||||||
ubuntu_16.04_ss(datadisks = numeric(0),
|
|
||||||
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
|
||||||
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
|
||||||
list(lb_probe_ssh)), ...)
|
|
||||||
|
|
||||||
ubuntu_18.04_ss(datadisks = numeric(0),
|
|
||||||
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
|
||||||
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
|
||||||
list(lb_probe_ssh)), ...)
|
|
||||||
|
|
||||||
windows_2016_ss(datadisks = numeric(0),
|
|
||||||
nsg = nsg_config(list(nsg_rule_allow_rdp)),
|
|
||||||
load_balancer = lb_config(rules = list(lb_rule_rdp), probes =
|
|
||||||
list(lb_probe_rdp)), options = scaleset_options(keylogin = FALSE), ...)
|
|
||||||
|
|
||||||
windows_2019_ss(datadisks = numeric(0),
|
|
||||||
nsg = nsg_config(list(nsg_rule_allow_rdp)),
|
|
||||||
load_balancer = lb_config(rules = list(lb_rule_rdp), probes =
|
|
||||||
list(lb_probe_rdp)), options = scaleset_options(keylogin = FALSE), ...)
|
|
||||||
|
|
||||||
rhel_7.6_ss(datadisks = numeric(0),
|
|
||||||
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
|
||||||
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
|
||||||
list(lb_probe_ssh)), ...)
|
|
||||||
|
|
||||||
rhel_8_ss(datadisks = numeric(0),
|
|
||||||
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
|
||||||
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
|
||||||
list(lb_probe_ssh)), ...)
|
|
||||||
|
|
||||||
centos_7.5_ss(datadisks = numeric(0),
|
centos_7.5_ss(datadisks = numeric(0),
|
||||||
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
||||||
|
@ -74,6 +37,11 @@ centos_7.6_ss(datadisks = numeric(0),
|
||||||
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
||||||
list(lb_probe_ssh)), ...)
|
list(lb_probe_ssh)), ...)
|
||||||
|
|
||||||
|
centos_8.1_ss(datadisks = numeric(0),
|
||||||
|
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
||||||
|
list(lb_probe_ssh)), ...)
|
||||||
|
|
||||||
debian_8_backports_ss(datadisks = numeric(0),
|
debian_8_backports_ss(datadisks = numeric(0),
|
||||||
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
||||||
|
@ -84,24 +52,113 @@ debian_9_backports_ss(datadisks = numeric(0),
|
||||||
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
||||||
list(lb_probe_ssh)), ...)
|
list(lb_probe_ssh)), ...)
|
||||||
|
|
||||||
|
debian_10_backports_ss(datadisks = numeric(0),
|
||||||
|
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
||||||
|
list(lb_probe_ssh)), ...)
|
||||||
|
|
||||||
|
debian_10_backports_gen2_ss(datadisks = numeric(0),
|
||||||
|
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
||||||
|
list(lb_probe_ssh)), ...)
|
||||||
|
|
||||||
|
ubuntu_dsvm_ss(datadisks = numeric(0),
|
||||||
|
nsg = nsg_config(list(nsg_rule_allow_ssh, nsg_rule_allow_jupyter,
|
||||||
|
nsg_rule_allow_rstudio)), load_balancer = lb_config(rules =
|
||||||
|
list(lb_rule_ssh, lb_rule_jupyter, lb_rule_rstudio), probes =
|
||||||
|
list(lb_probe_ssh, lb_probe_jupyter, lb_probe_rstudio)), ...)
|
||||||
|
|
||||||
|
ubuntu_dsvm_gen2_ss(datadisks = numeric(0),
|
||||||
|
nsg = nsg_config(list(nsg_rule_allow_ssh, nsg_rule_allow_jupyter,
|
||||||
|
nsg_rule_allow_rstudio)), load_balancer = lb_config(rules =
|
||||||
|
list(lb_rule_ssh, lb_rule_jupyter, lb_rule_rstudio), probes =
|
||||||
|
list(lb_probe_ssh, lb_probe_jupyter, lb_probe_rstudio)), ...)
|
||||||
|
|
||||||
|
windows_dsvm_ss(datadisks = numeric(0),
|
||||||
|
nsg = nsg_config(list(nsg_rule_allow_rdp)),
|
||||||
|
load_balancer = lb_config(rules = list(lb_rule_rdp), probes =
|
||||||
|
list(lb_probe_rdp)), options = scaleset_options(keylogin = FALSE), ...)
|
||||||
|
|
||||||
|
rhel_7.6_ss(datadisks = numeric(0),
|
||||||
|
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
||||||
|
list(lb_probe_ssh)), ...)
|
||||||
|
|
||||||
|
rhel_8_ss(datadisks = numeric(0),
|
||||||
|
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
||||||
|
list(lb_probe_ssh)), ...)
|
||||||
|
|
||||||
|
rhel_8.1_ss(datadisks = numeric(0),
|
||||||
|
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
||||||
|
list(lb_probe_ssh)), ...)
|
||||||
|
|
||||||
|
rhel_8.1_gen2_ss(datadisks = numeric(0),
|
||||||
|
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
||||||
|
list(lb_probe_ssh)), ...)
|
||||||
|
|
||||||
|
rhel_8.2_ss(datadisks = numeric(0),
|
||||||
|
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
||||||
|
list(lb_probe_ssh)), ...)
|
||||||
|
|
||||||
|
rhel_8.2_gen2_ss(datadisks = numeric(0),
|
||||||
|
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
||||||
|
list(lb_probe_ssh)), ...)
|
||||||
|
|
||||||
|
ubuntu_16.04_ss(datadisks = numeric(0),
|
||||||
|
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
||||||
|
list(lb_probe_ssh)), ...)
|
||||||
|
|
||||||
|
ubuntu_18.04_ss(datadisks = numeric(0),
|
||||||
|
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
||||||
|
list(lb_probe_ssh)), ...)
|
||||||
|
|
||||||
ubuntu_20.04_ss(datadisks = numeric(0),
|
ubuntu_20.04_ss(datadisks = numeric(0),
|
||||||
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
||||||
list(lb_probe_ssh)), ...)
|
list(lb_probe_ssh)), ...)
|
||||||
|
|
||||||
|
ubuntu_20.04_gen2_ss(datadisks = numeric(0),
|
||||||
|
nsg = nsg_config(list(nsg_rule_allow_ssh)),
|
||||||
|
load_balancer = lb_config(rules = list(lb_rule_ssh), probes =
|
||||||
|
list(lb_probe_ssh)), ...)
|
||||||
|
|
||||||
|
windows_2016_ss(datadisks = numeric(0),
|
||||||
|
nsg = nsg_config(list(nsg_rule_allow_rdp)),
|
||||||
|
load_balancer = lb_config(rules = list(lb_rule_rdp), probes =
|
||||||
|
list(lb_probe_rdp)), options = scaleset_options(keylogin = FALSE), ...)
|
||||||
|
|
||||||
|
windows_2019_ss(datadisks = numeric(0),
|
||||||
|
nsg = nsg_config(list(nsg_rule_allow_rdp)),
|
||||||
|
load_balancer = lb_config(rules = list(lb_rule_rdp), probes =
|
||||||
|
list(lb_probe_rdp)), options = scaleset_options(keylogin = FALSE), ...)
|
||||||
|
|
||||||
|
vmss_config(image, options = scaleset_options(), datadisks = numeric(0),
|
||||||
|
nsg = nsg_config(), vnet = vnet_config(), load_balancer = lb_config(),
|
||||||
|
load_balancer_address = ip_config(), autoscaler = autoscaler_config(),
|
||||||
|
other_resources = list(), variables = list(), ...)
|
||||||
}
|
}
|
||||||
\arguments{
|
\arguments{
|
||||||
\item{image}{For \code{vmss_config}, the VM image to deploy. This should be an object of class \code{image_config}, created by the function of the same name.}
|
|
||||||
|
|
||||||
\item{options}{Scaleset options, as obtained via a call to \code{scaleset_options}.}
|
|
||||||
|
|
||||||
\item{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 \code{datadisk_config} objects for more control over the specification.}
|
\item{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 \code{datadisk_config} objects for more control over the specification.}
|
||||||
|
|
||||||
\item{nsg}{The network security group for the scaleset. Can be a call to \code{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).}
|
\item{nsg}{The network security group for the scaleset. Can be a call to \code{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).}
|
||||||
|
|
||||||
\item{vnet}{The virtual network for the scaleset. Can be a call to \code{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.}
|
|
||||||
|
|
||||||
\item{load_balancer}{The load balancer for the scaleset. Can be a call to \code{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.}
|
\item{load_balancer}{The load balancer for the scaleset. Can be a call to \code{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.}
|
||||||
|
|
||||||
|
\item{...}{For the specific VM configurations, other customisation arguments to be passed to \code{vm_config}. For \code{vmss_config}, named arguments that will be folded into the scaleset resource definition in the template.}
|
||||||
|
|
||||||
|
\item{options}{Scaleset options, as obtained via a call to \code{scaleset_options}.}
|
||||||
|
|
||||||
|
\item{image}{For \code{vmss_config}, the VM image to deploy. This should be an object of class \code{image_config}, created by the function of the same name.}
|
||||||
|
|
||||||
|
\item{vnet}{The virtual network for the scaleset. Can be a call to \code{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.}
|
||||||
|
|
||||||
\item{load_balancer_address}{The public IP address for the load balancer. Can be a call to \code{ip_config} to create a new IP address, or an AzureRMR resource object or resource ID to reuse an existing address resource. Ignored if \code{load_balancer} is NULL.}
|
\item{load_balancer_address}{The public IP address for the load balancer. Can be a call to \code{ip_config} to create a new IP address, or an AzureRMR resource object or resource ID to reuse an existing address resource. Ignored if \code{load_balancer} is NULL.}
|
||||||
|
|
||||||
\item{autoscaler}{The autoscaler for the scaleset. Can be a call to \code{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.}
|
\item{autoscaler}{The autoscaler for the scaleset. Can be a call to \code{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.}
|
||||||
|
@ -109,10 +166,6 @@ ubuntu_20.04_ss(datadisks = numeric(0),
|
||||||
\item{other_resources}{An optional list of other resources to include in the deployment.}
|
\item{other_resources}{An optional list of other resources to include in the deployment.}
|
||||||
|
|
||||||
\item{variables}{An optional named list of variables to add to the template.}
|
\item{variables}{An optional named list of variables to add to the template.}
|
||||||
|
|
||||||
\item{...}{For the specific VM configurations, other customisation arguments to be passed to \code{vm_config}. For \code{vmss_config}, named arguments that will be folded into the scaleset resource definition in the template.}
|
|
||||||
|
|
||||||
\item{dsvm_disk_type}{The Ubuntu DSVM image comes with one additional datadisk that holds some installed tools. This argument sets what type of disk is used. Change this to "StandardSSD_LRS" or "Standard_LRS" if the VM size doesn't support premium storage.}
|
|
||||||
}
|
}
|
||||||
\value{
|
\value{
|
||||||
An object of S3 class \code{vmss_config}, that can be used by the \code{create_vm_scaleset} method.
|
An object of S3 class \code{vmss_config}, that can be used by the \code{create_vm_scaleset} method.
|
||||||
|
@ -133,15 +186,17 @@ Each resource can be specified in a number of ways:
|
||||||
|
|
||||||
The \code{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.
|
The \code{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.
|
||||||
\itemize{
|
\itemize{
|
||||||
\item \code{ubuntu_dsvm_ss}: Data Science Virtual Machine, based on Ubuntu 16.04
|
\item \code{ubuntu_dsvm_ss}: Data Science Virtual Machine, based on Ubuntu 18.04
|
||||||
\item \code{windows_dsvm_ss}: Data Science Virtual Machine, based on Windows Server 2016
|
\item \code{windows_dsvm_ss}: Data Science Virtual Machine, based on Windows Server 2019
|
||||||
\item \code{ubuntu_16.04_ss}, \code{ubuntu_18.04}: Ubuntu LTS
|
\item \code{ubuntu_16.04_ss}, \code{ubuntu_18.04_ss}, \code{ubuntu_20.04_ss}, \code{ubuntu_20.04_gen2_ss}: Ubuntu LTS
|
||||||
\item \code{windows_2016_ss}, \code{windows_2019}: Windows Server Datacenter edition
|
\item \code{windows_2016_ss}, \code{windows_2019_ss}: Windows Server Datacenter edition
|
||||||
\item \code{rhel_7.6_ss}, \code{rhel_8_ss}: Red Hat Enterprise Linux
|
\item \code{rhel_7.6_ss}, \code{rhel_8_ss}, \code{rhel_8.1_ss}, \code{rhel_8.1_gen2_ss}, \code{rhel_8.2_ss}, \code{rhel_8.2_gen2_ss}: Red Hat Enterprise Linux
|
||||||
\item \code{centos_7.5_ss}, \code{centos_7.6_ss}: CentOS
|
\item \code{centos_7.5_ss}, \code{centos_7.6_ss}, \code{centos_8.1_ss}: CentOS
|
||||||
\item \code{debian_8_backports_ss}, \code{debian_9_backports_ss}: Debian with backports
|
\item \code{debian_8_backports_ss}, \code{debian_9_backports_ss}, \code{debian_10_backports_ss}, \code{debian_10_backports_gen2_ss}: Debian with backports
|
||||||
}
|
}
|
||||||
|
|
||||||
|
The VM scaleset configurations with \code{gen2} in the name use \href{https://docs.microsoft.com/en-us/azure/virtual-machines/windows/generation-2}{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 \verb{*Name}, \verb{*Id} and \verb{*Ref} variables will be available. If a resource is referred to but not created, the \verb{*Name*} and \verb{*Id} variables will be available. Other variables can be defined via the \code{variables} argument.
|
A VM scaleset configuration defines the following template variables by default, depending on its resources. If a particular resource is created, the corresponding \verb{*Name}, \verb{*Id} and \verb{*Ref} variables will be available. If a resource is referred to but not created, the \verb{*Name*} and \verb{*Id} variables will be available. Other variables can be defined via the \code{variables} argument.
|
||||||
|
|
||||||
\tabular{lll}{
|
\tabular{lll}{
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
make_name <- function(n=10)
|
||||||
|
{
|
||||||
|
paste(sample(letters, n, TRUE), collapse="")
|
||||||
|
}
|
||||||
|
|
||||||
|
config_unit_tester <- function(img_list, user)
|
||||||
|
{
|
||||||
|
Map(function(config, arglist)
|
||||||
|
{
|
||||||
|
vmconf <- get(config)
|
||||||
|
vm <- vmconf()
|
||||||
|
expect_is(vm, "vm_config")
|
||||||
|
expect_identical(vm$image$publisher, arglist[[1]])
|
||||||
|
expect_identical(vm$image$offer, arglist[[2]])
|
||||||
|
expect_identical(vm$image$sku, arglist[[3]])
|
||||||
|
expect_silent(build_template_definition(vm))
|
||||||
|
expect_silent(build_template_parameters(vm, "vmname", user, "size"))
|
||||||
|
|
||||||
|
vmssconf <- get(paste0(config, "_ss"))
|
||||||
|
vmss <- vmssconf()
|
||||||
|
expect_is(vmss, "vmss_config")
|
||||||
|
expect_identical(vmss$image$publisher, arglist[[1]])
|
||||||
|
expect_identical(vmss$image$offer, arglist[[2]])
|
||||||
|
expect_identical(vmss$image$sku, arglist[[3]])
|
||||||
|
expect_silent(build_template_definition(vmss))
|
||||||
|
expect_silent(build_template_parameters(vmss, "vmname", user, "size", 5))
|
||||||
|
}, names(img_list), img_list)
|
||||||
|
}
|
||||||
|
|
||||||
|
config_integration_tester <- function(img_list, cluster, user, size)
|
||||||
|
{
|
||||||
|
vmconfigs <- Map(function(config, arglist) get(config)(),
|
||||||
|
names(img_list), img_list)
|
||||||
|
vmssconfigs <- Map(function(config, arglist) get(paste0(config, "_ss"))(),
|
||||||
|
names(img_list), img_list)
|
||||||
|
configs <- c(vmconfigs, vmssconfigs)
|
||||||
|
|
||||||
|
testres <- parallel::parLapply(cluster, configs, function(config)
|
||||||
|
{
|
||||||
|
library(AzureVM)
|
||||||
|
vm_name <- make_name(8) # can't be >9 for Windows scaleset
|
||||||
|
if(inherits(config, "vm_config"))
|
||||||
|
try(rg$create_vm(vm_name, user, size=size, config=config))
|
||||||
|
else try(rg$create_vm_scaleset(vm_name, user, size=size, config=config, instances=1))
|
||||||
|
})
|
||||||
|
lapply(testres, function(result)
|
||||||
|
{
|
||||||
|
if(inherits(result, "try-error"))
|
||||||
|
print(attr(result, "condition"))
|
||||||
|
expect_is(result, "az_template")
|
||||||
|
})
|
||||||
|
}
|
|
@ -1,218 +1,23 @@
|
||||||
context("VM+scaleset config")
|
context("VM+scaleset config")
|
||||||
|
|
||||||
|
key_user <- user_config("username", ssh="random key")
|
||||||
|
|
||||||
test_that("VM config works",
|
test_that("VM config works",
|
||||||
{
|
{
|
||||||
key_user <- user_config("username", ssh="random key")
|
|
||||||
pwd_user <- user_config("username", password="random password")
|
|
||||||
img <- image_config(publisher="pubname", offer="offname", sku="skuname")
|
img <- image_config(publisher="pubname", offer="offname", sku="skuname")
|
||||||
vm <- vm_config(img, keylogin=TRUE)
|
vm <- vm_config(img, keylogin=TRUE)
|
||||||
expect_is(vm, "vm_config")
|
expect_is(vm, "vm_config")
|
||||||
expect_silent(build_template_definition(vm))
|
expect_silent(build_template_definition(vm))
|
||||||
expect_silent(build_template_parameters(vm, "vmname", key_user, "size"))
|
expect_silent(build_template_parameters(vm, "vmname", key_user, "size"))
|
||||||
|
|
||||||
vm <- ubuntu_18.04()
|
|
||||||
expect_is(vm, "vm_config")
|
|
||||||
expect_true(vm$image$publisher == "Canonical" &&
|
|
||||||
vm$image$offer == "UbuntuServer" &&
|
|
||||||
vm$image$sku == "18.04-LTS")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", key_user, "size"))
|
|
||||||
|
|
||||||
vm <- ubuntu_16.04()
|
|
||||||
expect_is(vm, "vm_config")
|
|
||||||
expect_true(vm$image$publisher == "Canonical" &&
|
|
||||||
vm$image$offer == "UbuntuServer" &&
|
|
||||||
vm$image$sku == "16.04-LTS")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", key_user, "size"))
|
|
||||||
|
|
||||||
vm <- windows_2019()
|
|
||||||
expect_is(vm, "vm_config")
|
|
||||||
expect_true(vm$image$publisher == "MicrosoftWindowsServer" &&
|
|
||||||
vm$image$offer == "WindowsServer" &&
|
|
||||||
vm$image$sku == "2019-Datacenter")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", pwd_user, "size"))
|
|
||||||
|
|
||||||
vm <- windows_2016()
|
|
||||||
expect_is(vm, "vm_config")
|
|
||||||
expect_true(vm$image$publisher == "MicrosoftWindowsServer" &&
|
|
||||||
vm$image$offer == "WindowsServer" &&
|
|
||||||
vm$image$sku == "2016-Datacenter")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", pwd_user, "size"))
|
|
||||||
|
|
||||||
vm <- rhel_8()
|
|
||||||
expect_is(vm, "vm_config")
|
|
||||||
expect_true(vm$image$publisher == "RedHat" &&
|
|
||||||
vm$image$offer == "RHEL" &&
|
|
||||||
vm$image$sku == "8")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", key_user, "size"))
|
|
||||||
|
|
||||||
vm <- rhel_7.6()
|
|
||||||
expect_is(vm, "vm_config")
|
|
||||||
expect_true(vm$image$publisher == "RedHat" &&
|
|
||||||
vm$image$offer == "RHEL" &&
|
|
||||||
vm$image$sku == "7-RAW")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", key_user, "size"))
|
|
||||||
|
|
||||||
vm <- centos_7.5()
|
|
||||||
expect_is(vm, "vm_config")
|
|
||||||
expect_true(vm$image$publisher == "OpenLogic" &&
|
|
||||||
vm$image$offer == "CentOS" &&
|
|
||||||
vm$image$sku == "7.5")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", key_user, "size"))
|
|
||||||
|
|
||||||
vm <- centos_7.6()
|
|
||||||
expect_is(vm, "vm_config")
|
|
||||||
expect_true(vm$image$publisher == "OpenLogic" &&
|
|
||||||
vm$image$offer == "CentOS" &&
|
|
||||||
vm$image$sku == "7.6")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", key_user, "size"))
|
|
||||||
|
|
||||||
vm <- debian_8_backports()
|
|
||||||
expect_is(vm, "vm_config")
|
|
||||||
expect_true(vm$image$publisher == "Credativ" &&
|
|
||||||
vm$image$offer == "Debian" &&
|
|
||||||
vm$image$sku == "8-backports")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", key_user, "size"))
|
|
||||||
|
|
||||||
vm <- debian_9_backports()
|
|
||||||
expect_is(vm, "vm_config")
|
|
||||||
expect_true(vm$image$publisher == "Credativ" &&
|
|
||||||
vm$image$offer == "Debian" &&
|
|
||||||
vm$image$sku == "9-backports")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", key_user, "size"))
|
|
||||||
|
|
||||||
vm <- ubuntu_dsvm()
|
|
||||||
expect_is(vm, "vm_config")
|
|
||||||
expect_true(vm$image$publisher == "microsoft-dsvm" &&
|
|
||||||
vm$image$offer == "linux-data-science-vm-ubuntu" &&
|
|
||||||
vm$image$sku == "linuxdsvmubuntu")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", key_user, "size"))
|
|
||||||
|
|
||||||
vm <- windows_dsvm()
|
|
||||||
expect_is(vm, "vm_config")
|
|
||||||
expect_true(vm$image$publisher == "microsoft-dsvm" &&
|
|
||||||
vm$image$offer == "dsvm-windows" &&
|
|
||||||
vm$image$sku == "server-2016")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", pwd_user, "size"))
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
test_that("VM scaleset config works",
|
test_that("VM scaleset config works",
|
||||||
{
|
{
|
||||||
key_user <- user_config("username", ssh="random key")
|
|
||||||
pwd_user <- user_config("username", password="random password")
|
|
||||||
img <- image_config(publisher="pubname", offer="offname", sku="skuname")
|
img <- image_config(publisher="pubname", offer="offname", sku="skuname")
|
||||||
vm <- vmss_config(img, keylogin=TRUE)
|
vm <- vmss_config(img, keylogin=TRUE)
|
||||||
expect_is(vm, "vmss_config")
|
expect_is(vm, "vmss_config")
|
||||||
expect_silent(build_template_definition(vm))
|
expect_silent(build_template_definition(vm))
|
||||||
expect_silent(build_template_parameters(vm, "vmname", key_user, "size", 5))
|
expect_silent(build_template_parameters(vm, "vmname", key_user, "size", 5))
|
||||||
|
|
||||||
vm <- ubuntu_18.04_ss()
|
|
||||||
expect_is(vm, "vmss_config")
|
|
||||||
expect_true(vm$image$publisher == "Canonical" &&
|
|
||||||
vm$image$offer == "UbuntuServer" &&
|
|
||||||
vm$image$sku == "18.04-LTS")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", key_user, "size", 5))
|
|
||||||
|
|
||||||
vm <- ubuntu_16.04_ss()
|
|
||||||
expect_is(vm, "vmss_config")
|
|
||||||
expect_true(vm$image$publisher == "Canonical" &&
|
|
||||||
vm$image$offer == "UbuntuServer" &&
|
|
||||||
vm$image$sku == "16.04-LTS")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", key_user, "size", 5))
|
|
||||||
|
|
||||||
vm <- windows_2019_ss()
|
|
||||||
expect_is(vm, "vmss_config")
|
|
||||||
expect_true(vm$image$publisher == "MicrosoftWindowsServer" &&
|
|
||||||
vm$image$offer == "WindowsServer" &&
|
|
||||||
vm$image$sku == "2019-Datacenter")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", pwd_user, "size", 5))
|
|
||||||
|
|
||||||
vm <- windows_2016_ss()
|
|
||||||
expect_is(vm, "vmss_config")
|
|
||||||
expect_true(vm$image$publisher == "MicrosoftWindowsServer" &&
|
|
||||||
vm$image$offer == "WindowsServer" &&
|
|
||||||
vm$image$sku == "2016-Datacenter")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", pwd_user, "size", 5))
|
|
||||||
|
|
||||||
vm <- rhel_8_ss()
|
|
||||||
expect_is(vm, "vmss_config")
|
|
||||||
expect_true(vm$image$publisher == "RedHat" &&
|
|
||||||
vm$image$offer == "RHEL" &&
|
|
||||||
vm$image$sku == "8")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", key_user, "size", 5))
|
|
||||||
|
|
||||||
vm <- rhel_7.6_ss()
|
|
||||||
expect_is(vm, "vmss_config")
|
|
||||||
expect_true(vm$image$publisher == "RedHat" &&
|
|
||||||
vm$image$offer == "RHEL" &&
|
|
||||||
vm$image$sku == "7-RAW")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", key_user, "size", 5))
|
|
||||||
|
|
||||||
vm <- centos_7.5_ss()
|
|
||||||
expect_is(vm, "vmss_config")
|
|
||||||
expect_true(vm$image$publisher == "OpenLogic" &&
|
|
||||||
vm$image$offer == "CentOS" &&
|
|
||||||
vm$image$sku == "7.5")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", key_user, "size", 5))
|
|
||||||
|
|
||||||
vm <- centos_7.6_ss()
|
|
||||||
expect_is(vm, "vmss_config")
|
|
||||||
expect_true(vm$image$publisher == "OpenLogic" &&
|
|
||||||
vm$image$offer == "CentOS" &&
|
|
||||||
vm$image$sku == "7.6")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", key_user, "size", 5))
|
|
||||||
|
|
||||||
vm <- debian_8_backports_ss()
|
|
||||||
expect_is(vm, "vmss_config")
|
|
||||||
expect_true(vm$image$publisher == "Credativ" &&
|
|
||||||
vm$image$offer == "Debian" &&
|
|
||||||
vm$image$sku == "8-backports")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", key_user, "size", 5))
|
|
||||||
|
|
||||||
vm <- debian_9_backports_ss()
|
|
||||||
expect_is(vm, "vmss_config")
|
|
||||||
expect_true(vm$image$publisher == "Credativ" &&
|
|
||||||
vm$image$offer == "Debian" &&
|
|
||||||
vm$image$sku == "9-backports")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", key_user, "size", 5))
|
|
||||||
|
|
||||||
vm <- ubuntu_dsvm_ss()
|
|
||||||
expect_is(vm, "vmss_config")
|
|
||||||
expect_true(vm$image$publisher == "microsoft-dsvm" &&
|
|
||||||
vm$image$offer == "linux-data-science-vm-ubuntu" &&
|
|
||||||
vm$image$sku == "linuxdsvmubuntu")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", key_user, "size", 5))
|
|
||||||
|
|
||||||
vm <- windows_dsvm_ss()
|
|
||||||
expect_is(vm, "vmss_config")
|
|
||||||
expect_true(vm$image$publisher == "microsoft-dsvm" &&
|
|
||||||
vm$image$offer == "dsvm-windows" &&
|
|
||||||
vm$image$sku == "server-2016")
|
|
||||||
expect_silent(build_template_definition(vm))
|
|
||||||
expect_silent(build_template_parameters(vm, "vmname", pwd_user, "size", 5))
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -36,14 +36,13 @@ test_that("Data disk type works",
|
||||||
{
|
{
|
||||||
vmname <- paste0(sample(letters, 10, TRUE), collapse="")
|
vmname <- paste0(sample(letters, 10, TRUE), collapse="")
|
||||||
vm <- rg$create_vm(vmname, user, size, config="ubuntu_dsvm",
|
vm <- rg$create_vm(vmname, user, size, config="ubuntu_dsvm",
|
||||||
os_disk_type="StandardSSD_LRS", dsvm_disk_type="Standard_LRS",
|
os_disk_type="StandardSSD_LRS",
|
||||||
datadisks=list(datadisk_config(400, type="Standard_LRS")))
|
datadisks=list(datadisk_config(400, type="Standard_LRS")))
|
||||||
expect_is(vm, "az_vm_template")
|
expect_is(vm, "az_vm_template")
|
||||||
|
|
||||||
vmssname <- paste0(sample(letters, 10, TRUE), collapse="")
|
vmssname <- paste0(sample(letters, 10, TRUE), collapse="")
|
||||||
vmss <- rg$create_vm_scaleset(vmssname, user, instances=2, size=size, config="ubuntu_dsvm_ss",
|
vmss <- rg$create_vm_scaleset(vmssname, user, instances=2, size=size, config="ubuntu_dsvm_ss",
|
||||||
options=scaleset_options(os_disk_type="StandardSSD_LRS"),
|
options=scaleset_options(os_disk_type="StandardSSD_LRS"),
|
||||||
dsvm_disk_type="Standard_LRS",
|
|
||||||
datadisks=list(datadisk_config(400, type="Standard_LRS")),
|
datadisks=list(datadisk_config(400, type="Standard_LRS")),
|
||||||
nsg=NULL, autoscaler=NULL, load_balancer=NULL)
|
nsg=NULL, autoscaler=NULL, load_balancer=NULL)
|
||||||
expect_is(vmss, "az_vmss_template")
|
expect_is(vmss, "az_vmss_template")
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
context("Ubuntu preset configs")
|
||||||
|
|
||||||
|
img_list <- list(
|
||||||
|
ubuntu_16.04=list("Canonical", "UbuntuServer", "16.04-LTS"),
|
||||||
|
ubuntu_18.04=list("Canonical", "UbuntuServer", "18.04-LTS"),
|
||||||
|
ubuntu_20.04=list("Canonical", "0001-com-ubuntu-server-focal", "20_04-LTS"),
|
||||||
|
ubuntu_20.04_gen2=list("Canonical", "0001-com-ubuntu-server-focal", "20_04-LTS-gen2")
|
||||||
|
)
|
||||||
|
|
||||||
|
test_that("VM/SS config works",
|
||||||
|
{
|
||||||
|
user <- user_config("username", ssh="random key")
|
||||||
|
config_unit_tester(img_list, user)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
# test that predefined configurations deploy correctly, in parallel ===========
|
||||||
|
|
||||||
|
tenant <- Sys.getenv("AZ_TEST_TENANT_ID")
|
||||||
|
app <- Sys.getenv("AZ_TEST_APP_ID")
|
||||||
|
password <- Sys.getenv("AZ_TEST_PASSWORD")
|
||||||
|
subscription <- Sys.getenv("AZ_TEST_SUBSCRIPTION")
|
||||||
|
|
||||||
|
if(tenant == "" || app == "" || password == "" || subscription == "")
|
||||||
|
skip("Tests skipped: ARM credentials not set")
|
||||||
|
|
||||||
|
rgname <- paste0("vm", make_name(20))
|
||||||
|
location <- "australiaeast"
|
||||||
|
|
||||||
|
rg <- AzureRMR::az_rm$
|
||||||
|
new(tenant=tenant, app=app, password=password)$
|
||||||
|
get_subscription(subscription)$
|
||||||
|
create_resource_group(rgname, location)
|
||||||
|
|
||||||
|
nworkers <- if(Sys.getenv("NOT_CRAN") == "") 2 else 10
|
||||||
|
cl <- parallel::makeCluster(nworkers)
|
||||||
|
parallel::clusterExport(cl, "rg", envir=environment())
|
||||||
|
|
||||||
|
test_that("VM/SS deployment works",
|
||||||
|
{
|
||||||
|
user <- user_config("username", "../resources/testkey.pub")
|
||||||
|
size <- "Standard_DS1_v2"
|
||||||
|
config_integration_tester(img_list, cl, user, size)
|
||||||
|
})
|
||||||
|
|
||||||
|
teardown({
|
||||||
|
suppressMessages(rg$delete(confirm=FALSE))
|
||||||
|
parallel::stopCluster(cl)
|
||||||
|
})
|
|
@ -0,0 +1,49 @@
|
||||||
|
context("Windows preset configs")
|
||||||
|
|
||||||
|
img_list <- list(
|
||||||
|
windows_2016=list("MicrosoftWindowsServer", "WindowsServer", "2016-Datacenter"),
|
||||||
|
windows_2019=list("MicrosoftWindowsServer", "WindowsServer", "2019-Datacenter"),
|
||||||
|
windows_2019_gen2=list("MicrosoftWindowsServer", "WindowsServer", "2019-Datacenter-gensecond")
|
||||||
|
)
|
||||||
|
|
||||||
|
test_that("VM/SS config works",
|
||||||
|
{
|
||||||
|
user <- user_config("username", password="random password")
|
||||||
|
config_unit_tester(img_list, user)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
# test that predefined configurations deploy correctly, in parallel ===========
|
||||||
|
|
||||||
|
tenant <- Sys.getenv("AZ_TEST_TENANT_ID")
|
||||||
|
app <- Sys.getenv("AZ_TEST_APP_ID")
|
||||||
|
password <- Sys.getenv("AZ_TEST_PASSWORD")
|
||||||
|
subscription <- Sys.getenv("AZ_TEST_SUBSCRIPTION")
|
||||||
|
|
||||||
|
if(tenant == "" || app == "" || password == "" || subscription == "")
|
||||||
|
skip("Tests skipped: ARM credentials not set")
|
||||||
|
|
||||||
|
rgname <- paste0("vm", make_name(20))
|
||||||
|
location <- "australiaeast"
|
||||||
|
|
||||||
|
rg <- AzureRMR::az_rm$
|
||||||
|
new(tenant=tenant, app=app, password=password)$
|
||||||
|
get_subscription(subscription)$
|
||||||
|
create_resource_group(rgname, location)
|
||||||
|
|
||||||
|
nworkers <- if(Sys.getenv("NOT_CRAN") == "") 2 else 10
|
||||||
|
cl <- parallel::makeCluster(nworkers)
|
||||||
|
parallel::clusterExport(cl, "rg", envir=environment())
|
||||||
|
|
||||||
|
test_that("VM/SS deployment works",
|
||||||
|
{
|
||||||
|
user <- user_config("username",
|
||||||
|
password=paste0(c(sample(letters, 5, TRUE), sample(LETTERS, 5, TRUE), "!@#"), collapse=""))
|
||||||
|
size <- "Standard_DS1_v2"
|
||||||
|
config_integration_tester(img_list, cl, user, size)
|
||||||
|
})
|
||||||
|
|
||||||
|
teardown({
|
||||||
|
suppressMessages(rg$delete(confirm=FALSE))
|
||||||
|
parallel::stopCluster(cl)
|
||||||
|
})
|
|
@ -0,0 +1,49 @@
|
||||||
|
context("Debian preset configs")
|
||||||
|
|
||||||
|
img_list <- list(
|
||||||
|
debian_8_backports=list("Credativ", "Debian", "8-backports"),
|
||||||
|
debian_9_backports=list("Credativ", "Debian", "9-backports"),
|
||||||
|
debian_10_backports=list("Debian", "Debian-10", "10-backports"),
|
||||||
|
debian_10_backports_gen2=list("Debian", "Debian-10", "10-backports-gen2")
|
||||||
|
)
|
||||||
|
|
||||||
|
test_that("VM/SS config works",
|
||||||
|
{
|
||||||
|
user <- user_config("username", ssh="random key")
|
||||||
|
config_unit_tester(img_list, user)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
# test that predefined configurations deploy correctly, in parallel ===========
|
||||||
|
|
||||||
|
tenant <- Sys.getenv("AZ_TEST_TENANT_ID")
|
||||||
|
app <- Sys.getenv("AZ_TEST_APP_ID")
|
||||||
|
password <- Sys.getenv("AZ_TEST_PASSWORD")
|
||||||
|
subscription <- Sys.getenv("AZ_TEST_SUBSCRIPTION")
|
||||||
|
|
||||||
|
if(tenant == "" || app == "" || password == "" || subscription == "")
|
||||||
|
skip("Tests skipped: ARM credentials not set")
|
||||||
|
|
||||||
|
rgname <- paste0("vm", make_name(20))
|
||||||
|
location <- "australiaeast"
|
||||||
|
|
||||||
|
rg <- AzureRMR::az_rm$
|
||||||
|
new(tenant=tenant, app=app, password=password)$
|
||||||
|
get_subscription(subscription)$
|
||||||
|
create_resource_group(rgname, location)
|
||||||
|
|
||||||
|
nworkers <- if(Sys.getenv("NOT_CRAN") == "") 2 else 10
|
||||||
|
cl <- parallel::makeCluster(nworkers)
|
||||||
|
parallel::clusterExport(cl, "rg", envir=environment())
|
||||||
|
|
||||||
|
test_that("VM/SS deployment works",
|
||||||
|
{
|
||||||
|
user <- user_config("username", "../resources/testkey.pub")
|
||||||
|
size <- "Standard_DS1_v2"
|
||||||
|
config_integration_tester(img_list, cl, user, size)
|
||||||
|
})
|
||||||
|
|
||||||
|
teardown({
|
||||||
|
suppressMessages(rg$delete(confirm=FALSE))
|
||||||
|
parallel::stopCluster(cl)
|
||||||
|
})
|
|
@ -0,0 +1,48 @@
|
||||||
|
context("Centos preset configs")
|
||||||
|
|
||||||
|
img_list <- list(
|
||||||
|
centos_7.5=list("OpenLogic", "CentOS", "7.5"),
|
||||||
|
centos_7.6=list("OpenLogic", "CentOS", "7.6"),
|
||||||
|
centos_8.1=list("OpenLogic", "CentOS", "8_1")
|
||||||
|
)
|
||||||
|
|
||||||
|
test_that("VM/SS config works",
|
||||||
|
{
|
||||||
|
user <- user_config("username", ssh="random key")
|
||||||
|
config_unit_tester(img_list, user)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
# test that predefined configurations deploy correctly, in parallel ===========
|
||||||
|
|
||||||
|
tenant <- Sys.getenv("AZ_TEST_TENANT_ID")
|
||||||
|
app <- Sys.getenv("AZ_TEST_APP_ID")
|
||||||
|
password <- Sys.getenv("AZ_TEST_PASSWORD")
|
||||||
|
subscription <- Sys.getenv("AZ_TEST_SUBSCRIPTION")
|
||||||
|
|
||||||
|
if(tenant == "" || app == "" || password == "" || subscription == "")
|
||||||
|
skip("Tests skipped: ARM credentials not set")
|
||||||
|
|
||||||
|
rgname <- paste0("vm", make_name(20))
|
||||||
|
location <- "australiaeast"
|
||||||
|
|
||||||
|
rg <- AzureRMR::az_rm$
|
||||||
|
new(tenant=tenant, app=app, password=password)$
|
||||||
|
get_subscription(subscription)$
|
||||||
|
create_resource_group(rgname, location)
|
||||||
|
|
||||||
|
nworkers <- if(Sys.getenv("NOT_CRAN") == "") 2 else 10
|
||||||
|
cl <- parallel::makeCluster(nworkers)
|
||||||
|
parallel::clusterExport(cl, "rg", envir=environment())
|
||||||
|
|
||||||
|
test_that("VM/SS deployment works",
|
||||||
|
{
|
||||||
|
user <- user_config("username", "../resources/testkey.pub")
|
||||||
|
size <- "Standard_DS1_v2"
|
||||||
|
config_integration_tester(img_list, cl, user, size)
|
||||||
|
})
|
||||||
|
|
||||||
|
teardown({
|
||||||
|
suppressMessages(rg$delete(confirm=FALSE))
|
||||||
|
parallel::stopCluster(cl)
|
||||||
|
})
|
|
@ -0,0 +1,51 @@
|
||||||
|
context("RHEL preset configs")
|
||||||
|
|
||||||
|
img_list <- list(
|
||||||
|
rhel_7.6=list("RedHat", "RHEL", "7-RAW"),
|
||||||
|
rhel_8=list("RedHat", "RHEL", "8"),
|
||||||
|
rhel_8.1=list("RedHat", "RHEL", "8.1"),
|
||||||
|
rhel_8.1_gen2=list("RedHat", "RHEL", "81gen2"),
|
||||||
|
rhel_8.2=list("RedHat", "RHEL", "8.2"),
|
||||||
|
rhel_8.2_gen2=list("RedHat", "RHEL", "82gen2")
|
||||||
|
)
|
||||||
|
|
||||||
|
test_that("VM/SS config works",
|
||||||
|
{
|
||||||
|
user <- user_config("username", ssh="random key")
|
||||||
|
config_unit_tester(img_list, user)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
# test that predefined configurations deploy correctly, in parallel ===========
|
||||||
|
|
||||||
|
tenant <- Sys.getenv("AZ_TEST_TENANT_ID")
|
||||||
|
app <- Sys.getenv("AZ_TEST_APP_ID")
|
||||||
|
password <- Sys.getenv("AZ_TEST_PASSWORD")
|
||||||
|
subscription <- Sys.getenv("AZ_TEST_SUBSCRIPTION")
|
||||||
|
|
||||||
|
if(tenant == "" || app == "" || password == "" || subscription == "")
|
||||||
|
skip("Tests skipped: ARM credentials not set")
|
||||||
|
|
||||||
|
rgname <- paste0("vm", make_name(20))
|
||||||
|
location <- "australiaeast"
|
||||||
|
|
||||||
|
rg <- AzureRMR::az_rm$
|
||||||
|
new(tenant=tenant, app=app, password=password)$
|
||||||
|
get_subscription(subscription)$
|
||||||
|
create_resource_group(rgname, location)
|
||||||
|
|
||||||
|
nworkers <- if(Sys.getenv("NOT_CRAN") == "") 2 else 10
|
||||||
|
cl <- parallel::makeCluster(nworkers)
|
||||||
|
parallel::clusterExport(cl, "rg", envir=environment())
|
||||||
|
|
||||||
|
test_that("VM/SS deployment works",
|
||||||
|
{
|
||||||
|
user <- user_config("username", "../resources/testkey.pub")
|
||||||
|
size <- "Standard_DS1_v2"
|
||||||
|
config_integration_tester(img_list, cl, user, size)
|
||||||
|
})
|
||||||
|
|
||||||
|
teardown({
|
||||||
|
suppressMessages(rg$delete(confirm=FALSE))
|
||||||
|
parallel::stopCluster(cl)
|
||||||
|
})
|
|
@ -0,0 +1,47 @@
|
||||||
|
context("Linux DSVM preset configs")
|
||||||
|
|
||||||
|
img_list <- list(
|
||||||
|
ubuntu_dsvm=list("microsoft-dsvm", "ubuntu-1804", "1804"),
|
||||||
|
ubuntu_dsvm_gen2=list("microsoft-dsvm", "ubuntu-1804", "1804-gen2")
|
||||||
|
)
|
||||||
|
|
||||||
|
test_that("VM/SS config works",
|
||||||
|
{
|
||||||
|
user <- user_config("username", ssh="random key")
|
||||||
|
config_unit_tester(img_list, user)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
# test that predefined configurations deploy correctly, in parallel ===========
|
||||||
|
|
||||||
|
tenant <- Sys.getenv("AZ_TEST_TENANT_ID")
|
||||||
|
app <- Sys.getenv("AZ_TEST_APP_ID")
|
||||||
|
password <- Sys.getenv("AZ_TEST_PASSWORD")
|
||||||
|
subscription <- Sys.getenv("AZ_TEST_SUBSCRIPTION")
|
||||||
|
|
||||||
|
if(tenant == "" || app == "" || password == "" || subscription == "")
|
||||||
|
skip("Tests skipped: ARM credentials not set")
|
||||||
|
|
||||||
|
rgname <- paste0("vm", make_name(20))
|
||||||
|
location <- "australiaeast"
|
||||||
|
|
||||||
|
rg <- AzureRMR::az_rm$
|
||||||
|
new(tenant=tenant, app=app, password=password)$
|
||||||
|
get_subscription(subscription)$
|
||||||
|
create_resource_group(rgname, location)
|
||||||
|
|
||||||
|
nworkers <- if(Sys.getenv("NOT_CRAN") == "") 2 else 10
|
||||||
|
cl <- parallel::makeCluster(nworkers)
|
||||||
|
parallel::clusterExport(cl, "rg", envir=environment())
|
||||||
|
|
||||||
|
test_that("VM/SS deployment works",
|
||||||
|
{
|
||||||
|
user <- user_config("username", "../resources/testkey.pub")
|
||||||
|
size <- "Standard_DS1_v2"
|
||||||
|
config_integration_tester(img_list, cl, user, size)
|
||||||
|
})
|
||||||
|
|
||||||
|
teardown({
|
||||||
|
suppressMessages(rg$delete(confirm=FALSE))
|
||||||
|
parallel::stopCluster(cl)
|
||||||
|
})
|
|
@ -0,0 +1,47 @@
|
||||||
|
context("Windows DSVM preset configs")
|
||||||
|
|
||||||
|
img_list <- list(
|
||||||
|
windows_dsvm=list("microsoft-dsvm", "dsvm-win-2019", "server-2019")
|
||||||
|
)
|
||||||
|
|
||||||
|
test_that("VM/SS config works",
|
||||||
|
{
|
||||||
|
user <- user_config("username", password="random password")
|
||||||
|
config_unit_tester(img_list, user)
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
# test that predefined configurations deploy correctly, in parallel ===========
|
||||||
|
|
||||||
|
tenant <- Sys.getenv("AZ_TEST_TENANT_ID")
|
||||||
|
app <- Sys.getenv("AZ_TEST_APP_ID")
|
||||||
|
password <- Sys.getenv("AZ_TEST_PASSWORD")
|
||||||
|
subscription <- Sys.getenv("AZ_TEST_SUBSCRIPTION")
|
||||||
|
|
||||||
|
if(tenant == "" || app == "" || password == "" || subscription == "")
|
||||||
|
skip("Tests skipped: ARM credentials not set")
|
||||||
|
|
||||||
|
rgname <- paste0("vm", make_name(20))
|
||||||
|
location <- "australiaeast"
|
||||||
|
|
||||||
|
rg <- AzureRMR::az_rm$
|
||||||
|
new(tenant=tenant, app=app, password=password)$
|
||||||
|
get_subscription(subscription)$
|
||||||
|
create_resource_group(rgname, location)
|
||||||
|
|
||||||
|
nworkers <- if(Sys.getenv("NOT_CRAN") == "") 2 else 10
|
||||||
|
cl <- parallel::makeCluster(nworkers)
|
||||||
|
parallel::clusterExport(cl, "rg", envir=environment())
|
||||||
|
|
||||||
|
test_that("VM/SS deployment works",
|
||||||
|
{
|
||||||
|
user <- user_config("username",
|
||||||
|
password=paste0(c(sample(letters, 5, TRUE), sample(LETTERS, 5, TRUE), "!@#"), collapse=""))
|
||||||
|
size <- "Standard_DS1_v2"
|
||||||
|
config_integration_tester(img_list, cl, user, size)
|
||||||
|
})
|
||||||
|
|
||||||
|
teardown({
|
||||||
|
suppressMessages(rg$delete(confirm=FALSE))
|
||||||
|
parallel::stopCluster(cl)
|
||||||
|
})
|
Загрузка…
Ссылка в новой задаче