A video walk-through is available below, on how to set-up googleCloudRunner’s Google Console and R environment:
You can setup the configurations directly using the below R functions:
But it is recommended to use the environment arguments below.
There is a setup function to help you configure the package. Get started via the commands below:
library(googleCloudRunner) cr_setup() #ℹ ==Welcome to googleCloudRunner setup== #This wizard will scan your system for setup options and help you setup any that are missing. #Hit 0 or ESC to cancel. # #1: Configure/check all googleCloudRunner settings #2: Configure GCP Project Id #3: Configure Authentication JSON file #4: Configure Cloud Storage bucket #5: Configure Cloud Run region #6: Configure Cloud Scheduler build email
It will walk you through the details below. You can also use it to check your settings.
You can configure authentication separately, as its usually the
trickiest bit. The
cr_setup_auth() function attempts to
help you walk through the authentication and after running it and
restarting R a couple of times you should only need to download a client
ID from your project to have it all configured for you.
If you are customising things then
may be useful, which lets you add common roles to the service account
emails. The other setup functions call it to set things up for you, but
you may want more control, or have special needs for your cloudbuild
email for example, which needs roles assigned for certain services you
want to build.
GCE_AUTH_FILEfrom googleComputeEngineR which holds location of your service auth JSON
CR_BUILD_EMAILthat is a Google service email (see GCP setup)
CR_REGIONcan be one of the regions listed in
e.g. at the end of all set-up your
.Renviron should look
GCE_AUTH_FILE="/Users/me/auth/auth.json" GCE_DEFAULT_PROJECT_ID="my-project" GCS_DEFAULT_BUCKET="my-bucket" CR_REGION="europe-west1" CR_BUILD_EMAILemail@example.com
And when you restart R and load the library you should see something like:
library(googleCloudRunner) ://www.googleapis.com/auth/cloud-platform ✓ Setting scopes to https-authenticated via /Users/me/auth/keys/googlecloudrunner-auth-key.json✓ Successfully auto
.Renviron file can be placed in the root of your
project or as per what is described in
You can also set the above in the R scripts via:
Or authenticate via