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
cr_setup_service() 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_REGIONcan be one of
"us-central1", "asia-northeast1", "europe-west1", "us-east1"
CR_BUILD_EMAILthat is a Google service email (see GCP setup)
.Renviron should look like:
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_EMAILfirstname.lastname@example.org
.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