cr_buildstep_compute_container {googleCloudRunner} | R Documentation |
Buildstep to deploy to Google Compute Engine
Description
This build step adds some helpers to cr_buildstep_gcloud for deploying to VMs to GCE that will auto create a container within them and atytach it to the disk
Usage
cr_buildstep_compute_container(
vm_name,
container_image = "gcr.io/gcer-public/persistent-rstudio:latest",
disk_name = paste0(vm_name, "-disk"),
disk_mount_path = "/home",
zone = "europe-west1-b",
disk_size = "10GB",
machine_type = "n1-standard-1",
container_env = "",
scopes = "cloud-platform",
network = "default",
gcloud_args = NULL
)
cr_buildstep_compute_rstudio(
rstudio_user,
rstudio_pw,
vm_name = "rstudio",
disk_name = "rstudio-disk",
zone = "europe-west1-b",
disk_size = "10GB",
machine_type = "n1-standard-1",
container_image = "gcr.io/gcer-public/persistent-rstudio:latest",
network = "default"
)
Arguments
vm_name |
Name of the VM you will create |
container_image |
The Docker image that will be launched in the VM |
disk_name |
Name of the disk that will be attached to the VM's container image |
disk_mount_path |
Where the disk will be attached to the container in the VM |
zone |
Which zone the VM will launch within |
disk_size |
The size of the disk |
machine_type |
The type of VM that will be launched |
container_env |
Environment variables set within the VM's container image |
scopes |
The GCE scopes that the VM will be launched with permission to use |
network |
The network the VM will use. The container will bridge into the same network |
gcloud_args |
Other gcloud arguments you send in e.g. |
rstudio_user |
The usename for the RStudio image the VM will launch |
rstudio_pw |
The password for the RStudio image the VM will launch |
Examples
bs <- cr_buildstep_compute_rstudio("mark", "securepassword1234")
build <- cr_build_yaml(bs)
build
## Not run:
cr_build(build)
## End(Not run)