Learn R Programming

⚠️There's a newer version (0.5.0) of this package.Take me there.

googleCloudRunner

As easy as possible R scripts in the cloud, via Cloud Run, Cloud Build and Cloud Scheduler. Continuous Development and Integration tools on Google Cloud Platform.

Not an official Google product.

Ambition

Select an R file, and have it scheduled in the cloud with a couple of clicks.

Deploy your plumber API code automatically on Cloud Run to scale from 0 (no cost) to millions (auto-scaling)

Integrate R inputs and outputs with other languages in a serverless cloud environment.

Have R code react to events such as GitHub pushes, pub/sub messages and Cloud Storage file events.

Install

Get the CRAN stable version via

install.packages("googleCloudRunner")

Or the development version via:

remotes::install_github("MarkEdmondson1234/googleCloudRunner")

Usage

Browse the googleCloudRunner website for topics on how to use:

Resources

Read the blog introducing the googleCloudRunner package that goes into some background.

A talk at R's 20th anniversary was performed at celebRation in Copenhagen on 29th Feb, 2020. The slides from the talk are here and a video of it is here:

A googleCloudRunner YouTube playlist of the demos is here.

If you blog anything interesting about the package let me know and I will list it here.

Copy Link

Version

Install

install.packages('googleCloudRunner')

Monthly Downloads

113

Version

0.2.0

License

MIT + file LICENSE

Maintainer

Mark Edmondson

Last Published

May 2nd, 2020

Functions in googleCloudRunner (0.2.0)

cr_bucket_set

Get/Set the Cloud Storage bucket for your Cloud Build Service
Build

Build Object
GitHubEventsConfig

GitHubEventsConfig Object
Source

Source Object
cr_build

Starts a build with the specified configuration.
Job

Job Schedule Object
HttpTarget

HttpTarget Object
RepoSource

RepoSource Object
BuildTrigger

BuildTrigger Object
StorageSource

StorageSource Object
cr_build_wait

Wait for a Build to run
cr_build_write

Write out a Build object to cloudbuild.yaml
cr_buildstep_edit

Modify an existing buildstep with new parameters
cr_buildstep_r

Run an R script in a Cloud Build R step
cr_buildstep_docker

Create a build step to build and push a docker image
cr_buildstep_run

Create buildsteps to deploy to Cloud Run
cr_build_yaml

Create a cloudbuild Yaml object in R
cr_buildtrigger_edit

Updates a `BuildTrigger` by its project ID and trigger ID.This API is experimental.
cr_buildstep_nginx_setup

Setup nginx for Cloud Run in a buildstep
cr_buildstep_mailgun

Send an email in a Cloud Build step via MailGun.org
cr_build_yaml_artifact

Add an artifact for cloudbuild.yaml
cr_buildtrigger_get

Returns information about a `BuildTrigger`.This API is experimental.
cr_build_status

Returns information about a previously requested build.
cr_build_schedule_http

Create a Cloud Scheduler HTTP target from a Cloud Build object
cr_deploy_pkgdown

Deploy a cloudbuild.yml for a pkgdown website of an R package
cr_build_make

Make a Cloud Build object out of a cloudbuild.yml file
cr_build_artifacts

Download artifacts from a build
cr_buildstep_decrypt

Create a build step for decrypting files via KMS
cr_buildstep_gitsetup

Create a build step for authenticating with Git
cr_build_source

Build a source object
cr_buildstep_extract

Extract a buildstep from a Build object
cr_build_upload_gcs

Create a StorageSource
cr_buildstep_df

Convert a data.frame into cr_buildstep
cr_buildstep

Create a yaml build step
cr_buildstep_bash

Run a bash script in a Cloud Build step
cr_deploy_r

Deploy an R script with an optional schedule
cr_buildstep_packagetests

Do R package tests and upload to Codecov
cr_buildtrigger_make

Create a buildtrigger object
cr_buildstep_pkgdown

Create buildsteps for deploying an R pkgdown website to GitHub
cr_buildtrigger_list

Lists existing `BuildTrigger`s.This API is experimental.
cr_buildstep_secret

Create a buildstep for using Secret Manager
cr_deploy_github_docker

Deploy Docker build from a GitHub repo (Experimental)
cr_buildstep_slack

Send a Slack message to a channel from a Cloud Build step
cr_deploy_packagetests

Deploy a cloudbuild.yml for R package tests and upload to Codecov
cr_plumber_pubsub

Plumber - Pub/Sub parser
cr_run_list

List CloudRun services.
cr_run

Create a CloudRun service.
cr_buildtrigger

Creates a new `BuildTrigger`.This API is experimental.
cr_buildtrigger_run

Runs a `BuildTrigger` at a particular source revision.
cr_buildtrigger_delete

Deletes a `BuildTrigger` by its project ID and trigger ID.This API is experimental.
cr_deploy_docker

Deploy a local Dockerfile to be built on ContainerRegistry
cr_deploy_git_html

Deploy HTML built from a repo each commit (Experimental)
cr_deploy_run

Deploy to Cloud Run
cr_deploy_gadget

Launch the googleCloudRunner deployment RStudio gadget
cr_email_get

Get/Set cloud build email
cr_pubsub

Send a message to pubsub
cr_region_set

Get/Set the endpoint for your CloudRun services
cr_setup_test

Run tests over your setup
cr_run_get

Get information about a Cloud Run service.
cr_sourcerepo_list

List source repositories available under a project
cr_setup_auth

Create a service account for googleCloudRunner
cr_setup_service

Give a service account the right permissions for googleCloudRunner operations
cr_schedule_get

Gets a scheduler job.
cr_schedule_delete

Deletes a scheduled job.
cr_schedule_pause

Pauses and resumes a scheduled job.
cr_project_set

Get/Set the projectId for your CloudRun services
cr_schedule_list

Lists Cloud Scheduler jobs.
googleCloudRunner

Launch R scripts into the Google Cloud via Cloud Build, Cloud Run and Cloud Scheduler
cr_schedule

Creates or updates a Cloud Scheduler job.
cr_setup

A helper setup function for setting up use with googleCloudRunner
cr_schedule_run

Forces a job to run now.