From 8c8a1410ef8b8bc5a116cfa5087bf3af89c8f1a0 Mon Sep 17 00:00:00 2001 From: Mark Edmondson Date: Wed, 17 Mar 2021 17:33:40 +0100 Subject: [PATCH] create email invoker for #114 --- NAMESPACE | 1 + R/buildsteps_templates.R | 50 ++++++++++++++++++++++--------- R/cloudrun.R | 2 +- R/cloudrun_schedule.R | 58 +++++++++++++++++++++++++++++------- R/deploy-run.R | 2 ++ R/setup_buildemail.R | 2 +- man/cr_buildstep_run.Rd | 2 +- man/cr_deploy_run.Rd | 8 +++-- man/cr_deploy_run_website.Rd | 2 +- man/cr_jwt_create.Rd | 2 ++ man/cr_plumber_pubsub.Rd | 2 ++ man/cr_run.Rd | 6 ++-- man/cr_run_email.Rd | 30 +++++++++++++++++++ man/cr_run_get.Rd | 2 ++ man/cr_run_list.Rd | 2 ++ man/cr_run_schedule_http.Rd | 56 ++++++++++++++++++++++++---------- vignettes/cloudrun.Rmd | 38 +++++++++++++++++++---- vignettes/setup.Rmd | 11 +++++++ 18 files changed, 224 insertions(+), 52 deletions(-) create mode 100644 man/cr_run_email.Rd diff --git a/NAMESPACE b/NAMESPACE index e183ffa2..3736949c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -94,6 +94,7 @@ export(cr_pubsub) export(cr_region_get) export(cr_region_set) export(cr_run) +export(cr_run_email) export(cr_run_get) export(cr_run_list) export(cr_run_schedule_http) diff --git a/R/buildsteps_templates.R b/R/buildsteps_templates.R index 4ef99ed6..5c8b865a 100644 --- a/R/buildsteps_templates.R +++ b/R/buildsteps_templates.R @@ -262,28 +262,50 @@ cr_buildstep_run <- function(name, is.null(dots$id) ) - auth_calls <- "--no-allow-unauthenticated" - auth_step <- NULL + create_service <- NULL if(allowUnauthenticated){ - auth_calls <- "--allow-unauthenticated" #sometimes unauth fails, so attempt to fix as per warning suggestion - auth_step <- cr_buildstep_gcloud( - args = c("gcloud", - "run", "services", "add-iam-policy-binding", - "--region", region, - "--member=allUsers", - "--role=roles/run.invoker", - "--platform", "managed", - name), - id = "auth cloudrun", - ...) + auth_calls <- "--allow-unauthenticated" + member <- "allUsers" + } else { + # authenticated calls - add the default email + # https://cloud.google.com/run/docs/triggering/using-scheduler#command-line + service <- substr(paste0(name,"-invoker"),1,30) + desc <- paste("--display-name=Cloud Run Invoker for", name) + script <- + paste( + sprintf("gcloud iam service-accounts describe %s || ", + cr_run_email(service)), + sprintf("gcloud iam service-accounts create %s %s", + service, desc) + ) + create_service <- cr_buildstep_bash( + name = "gcr.io/google.com/cloudsdktool/cloud-sdk:alpine", + bash_script = script, + id = "create invoker" + ) + + auth_calls <- "--no-allow-unauthenticated" + member <- sprintf("serviceAccount:%s", cr_run_email(service)) } + auth_step <- cr_buildstep_gcloud( + args = c("gcloud", + "run", "services", "add-iam-policy-binding", + paste0("--region=", region), + paste0("--member=", member), + "--role=roles/run.invoker", + "--platform=managed", + name), + id = "auth cloudrun", + ...) + if(is.null(port)){ port <- "default" } + if(!is.null(env_vars)){ env_vars <- paste0("--set-env-vars=", paste(env_vars, collapse = ",")) } else { @@ -310,7 +332,7 @@ cr_buildstep_run <- function(name, gcloud_args), id = "deploy cloudrun",...) - c(deploy_step, auth_step) + c(create_service, deploy_step, auth_step) } diff --git a/R/cloudrun.R b/R/cloudrun.R index 0baf0200..161f1ae5 100644 --- a/R/cloudrun.R +++ b/R/cloudrun.R @@ -11,7 +11,7 @@ #' @param port Container port to receive requests at. Also sets the $PORT environment variable. Must be a number between 1 and 65535, inclusive. To unset this field, pass the special value "default". #' @param region The endpoint region for deployment #' @param projectId The GCP project from which the services should be listed -#' @param allowUnauthenticated TRUE if can be reached from public HTTP address. +#' @param allowUnauthenticated TRUE if can be reached from public HTTP address. If FALSE will configure a service-email called \code{(name)-cloudrun-invoker@(project-id).iam.gserviceaccount.com} #' @param max_instances the desired maximum nuimber of container instances. "default" is 1000, you can get more if you requested a quota instance. For Shiny instances on Cloud Run, this needs to be 1. #' @param memory The format for size is a fixed or floating point number followed by a unit: G, M, or K corresponding to gigabyte, megabyte, or kilobyte, respectively, or use the power-of-two equivalents: Gi, Mi, Ki corresponding to gibibyte, mebibyte or kibibyte respectively. The default is 256Mi #' @param cpu 1 or 2 CPUs for your instance diff --git a/R/cloudrun_schedule.R b/R/cloudrun_schedule.R index 593d8776..ac58ffcb 100644 --- a/R/cloudrun_schedule.R +++ b/R/cloudrun_schedule.R @@ -1,12 +1,12 @@ -#' Create a Cloud Scheduler HTTP target for a Cloud Run URI +#' Create a Cloud Scheduler HTTP target for a private Cloud Run URI #' -#' This enables Cloud Scheduler to trigger Cloud Run +#' This enables Cloud Scheduler to trigger Cloud Run endpoints when they are not public. #' #' @seealso https://cloud.google.com/run/docs/triggering/using-scheduler #' #' @param uri The URI of your Cloud Run application #' @param http_method The HTTP verb you have set up your Cloud Run application to receive -#' @param email The email that will authenticate the job set via \link{cr_email_set} +#' @param email The service email that has invoke access to the Cloud Run application. If using \link{cr_run} and derivatives to make the email this will include \code{(name)-cloudrun-invoker@(project-id).iam.gserviceaccount.com} - see \link{cr_run_email} to help make the email. #' @param body (optional) An R list object that will be turned into JSON via \link[jsonlite]{toJSON} and turned into a base64-encoded string if you are doing a POST, PUT or PATCH request. #' #' @return A \link{HttpTarget} object for use in \link{cr_schedule} @@ -16,25 +16,48 @@ #' @export #' @import assertthat #' @family Cloud Scheduler functions -#' @seealso \link{cr_build_schedule_http} +#' @family Cloud Run functions +#' @seealso \link{cr_build_schedule_http} and \link{cr_run} and \link{cr_deploy_run} #' @examples #' -#' run_me <- cr_run_schedule_http( -#' "https://example-ewjogewawq-ew.a.run.app/echo?msg=blah", +#' \dontrun{ +#' # for unauthenticated apps create a HttpTarget +#' run_me <- HttpTarget( +#' uri = "https://public-ewjogewawq-ew.a.run.app/echo?msg=blah", #' http_method = "GET" #' ) +#' cr_schedule("cloud-run-scheduled", schedule = "16 4 * * *", +#' httpTarget = run_me) +#' +#' # for authenticated Cloud Run apps - create with allowUnauthenticated=FALSE +#' cr_deploy_run("my-app", allowUnauthenticated = TRUE) +#' } +#' +#' # deploying via R will help create a service email called my-app-cloudrun-invoker +#' cr_run_email("my-app") #' #' \dontrun{ +#' # use that email to schedule the Cloud Run private micro-service #' -#' cr_schedule("cloud-run-scheduled", schedule = "16 4 * * *", -#' httpTarget = run_me) +#' # schedule the endpoint +#' my_run_name <- "my-app" +#' my_app <- cr_run_get(my_run_name) +#' email <- cr_run_email(my_run_name) +#' endpoint <- paste0(my_app$status$url, "/fetch_stuff") #' +#' app_sched <- cr_run_schedule_http(endpoint, +#' http_method = "GET", +#' email = email) +#' +#' cr_schedule("cloud-run-scheduled-1", +#' schedule = "4 16 * * *", +#' httpTarget = app_sched) #' } #' cr_run_schedule_http <- function(uri, + email, http_method = "GET", - body = NULL, - email = cr_email_get()){ + body = NULL){ assert_that( is.string(uri), @@ -52,3 +75,18 @@ cr_run_schedule_http <- function(uri, ) ) } + +#' Create an invoker email for use within authenticated Cloud Run +#' +#' @param name Name of the Cloud Run service +#' @param projectId The projectId where the Cloud Run service will run +#' +#' @export +#' @family Cloud Run functions +#' @examples +#' +#' cr_run_email("my-run-app", "my-project") +cr_run_email <- function(name, projectId = cr_project_get()){ + service_name <- substr(paste0(name,"-invoker"),1,30) + sprintf("%s@%s.iam.gserviceaccount.com", service_name, projectId) +} diff --git a/R/deploy-run.R b/R/deploy-run.R index 8cb32fbd..007469b1 100644 --- a/R/deploy-run.R +++ b/R/deploy-run.R @@ -16,6 +16,8 @@ #' @family Deployment functions #' @details #' +#' @seealso For scheduling Cloud Run apps \link{cr_run_schedule_http} +#' #' These deploy containers to Cloud Run, a scale 0-to-millions container-as-a-service on Google Cloud Platform. #' #' @export diff --git a/R/setup_buildemail.R b/R/setup_buildemail.R index 0d3bae98..d9a0365f 100644 --- a/R/setup_buildemail.R +++ b/R/setup_buildemail.R @@ -72,7 +72,7 @@ cr_setup_role_lookup <- function(type = c( bigquery = "roles/bigquery.admin", secrets = "roles/secretmanager.secretAccessor", cloudbuild = c("roles/cloudbuild.builds.builder", - "roles/iam.serviceAccountUser"), + "roles/iam.serviceAccountAdmin"), cloudstorage = c("roles/storage.admin","roles/viewer"), schedule_agent = "roles/cloudscheduler.serviceAgent", run_agent = "roles/serverless.serviceAgent" diff --git a/man/cr_buildstep_run.Rd b/man/cr_buildstep_run.Rd index 9bc8dfec..92c09099 100644 --- a/man/cr_buildstep_run.Rd +++ b/man/cr_buildstep_run.Rd @@ -24,7 +24,7 @@ cr_buildstep_run( \item{image}{The name of the image to create or use in deployment - \code{gcr.io}} -\item{allowUnauthenticated}{TRUE if can be reached from public HTTP address.} +\item{allowUnauthenticated}{TRUE if can be reached from public HTTP address. If FALSE will configure a service-email called \code{(name)-cloudrun-invoker@(project-id).iam.gserviceaccount.com}} \item{region}{The endpoint region for deployment} diff --git a/man/cr_deploy_run.Rd b/man/cr_deploy_run.Rd index 91e667bc..4dcafbdd 100644 --- a/man/cr_deploy_run.Rd +++ b/man/cr_deploy_run.Rd @@ -73,7 +73,7 @@ cr_deploy_plumber( \describe{ \item{\code{name}}{Name for deployment on Cloud Run} \item{\code{image}}{The name of the image to create or use in deployment - \code{gcr.io}} - \item{\code{allowUnauthenticated}}{TRUE if can be reached from public HTTP address.} + \item{\code{allowUnauthenticated}}{TRUE if can be reached from public HTTP address. If FALSE will configure a service-email called \code{(name)-cloudrun-invoker@(project-id).iam.gserviceaccount.com}} \item{\code{concurrency}}{How many connections each container instance can serve. Can be up to 80.} \item{\code{port}}{Container port to receive requests at. Also sets the $PORT environment variable. Must be a number between 1 and 65535, inclusive. To unset this field, pass the special value "default".} \item{\code{max_instances}}{the desired maximum nuimber of container instances. "default" is 1000, you can get more if you requested a quota instance. For Shiny instances on Cloud Run, this needs to be 1.} @@ -91,7 +91,7 @@ cr_deploy_plumber( Deploy R api plumber scripts, HTML files or other images create the Docker image, add the build to Cloud Build and deploy to Cloud Run } \details{ -These deploy containers to Cloud Run, a scale 0-to-millions container-as-a-service on Google Cloud Platform. + @@ -144,6 +144,10 @@ cr_deploy_plumber(system.file("example/", package = "googleCloudRunner")) } } \seealso{ +For scheduling Cloud Run apps \link{cr_run_schedule_http} + +These deploy containers to Cloud Run, a scale 0-to-millions container-as-a-service on Google Cloud Platform. + \link{cr_deploy_run_website} which has more features like rending Rmd files and deploying upon each git commit Other Deployment functions: diff --git a/man/cr_deploy_run_website.Rd b/man/cr_deploy_run_website.Rd index d06aaf84..48c4a745 100644 --- a/man/cr_deploy_run_website.Rd +++ b/man/cr_deploy_run_website.Rd @@ -35,7 +35,7 @@ cr_deploy_run_website( \item{r_image}{The image that will run the R code from \code{edit_r}} -\item{allowUnauthenticated}{TRUE if can be reached from public HTTP address.} +\item{allowUnauthenticated}{TRUE if can be reached from public HTTP address. If FALSE will configure a service-email called \code{(name)-cloudrun-invoker@(project-id).iam.gserviceaccount.com}} \item{region}{The region for cloud run} diff --git a/man/cr_jwt_create.Rd b/man/cr_jwt_create.Rd index 9b2d9a28..8b558f3c 100644 --- a/man/cr_jwt_create.Rd +++ b/man/cr_jwt_create.Rd @@ -82,8 +82,10 @@ cr_jwt_async(many_urls, token = token) Other Cloud Run functions: \code{\link{cr_plumber_pubsub}()}, +\code{\link{cr_run_email}()}, \code{\link{cr_run_get}()}, \code{\link{cr_run_list}()}, +\code{\link{cr_run_schedule_http}()}, \code{\link{cr_run}()} } \concept{Cloud Run functions} diff --git a/man/cr_plumber_pubsub.Rd b/man/cr_plumber_pubsub.Rd index 6cbadb4d..a2678a4b 100644 --- a/man/cr_plumber_pubsub.Rd +++ b/man/cr_plumber_pubsub.Rd @@ -48,8 +48,10 @@ function(message=NULL){ Other Cloud Run functions: \code{\link{cr_jwt_create}()}, +\code{\link{cr_run_email}()}, \code{\link{cr_run_get}()}, \code{\link{cr_run_list}()}, +\code{\link{cr_run_schedule_http}()}, \code{\link{cr_run}()} } \concept{Cloud Run functions} diff --git a/man/cr_run.Rd b/man/cr_run.Rd index 0d4e5f19..874c211a 100644 --- a/man/cr_run.Rd +++ b/man/cr_run.Rd @@ -27,7 +27,7 @@ cr_run( \item{name}{Name for deployment on Cloud Run} -\item{allowUnauthenticated}{TRUE if can be reached from public HTTP address.} +\item{allowUnauthenticated}{TRUE if can be reached from public HTTP address. If FALSE will configure a service-email called \code{(name)-cloudrun-invoker@(project-id).iam.gserviceaccount.com}} \item{concurrency}{How many connections each container instance can serve. Can be up to 80.} @@ -83,7 +83,9 @@ Use \link{cr_deploy_docker} or similar to create image, \link{cr_deploy_run} to Other Cloud Run functions: \code{\link{cr_jwt_create}()}, \code{\link{cr_plumber_pubsub}()}, +\code{\link{cr_run_email}()}, \code{\link{cr_run_get}()}, -\code{\link{cr_run_list}()} +\code{\link{cr_run_list}()}, +\code{\link{cr_run_schedule_http}()} } \concept{Cloud Run functions} diff --git a/man/cr_run_email.Rd b/man/cr_run_email.Rd new file mode 100644 index 00000000..28974ca9 --- /dev/null +++ b/man/cr_run_email.Rd @@ -0,0 +1,30 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/cloudrun_schedule.R +\name{cr_run_email} +\alias{cr_run_email} +\title{Create an invoker email for use within authenticated Cloud Run} +\usage{ +cr_run_email(name, projectId = cr_project_get()) +} +\arguments{ +\item{name}{Name of the Cloud Run service} + +\item{projectId}{The projectId where the Cloud Run service will run} +} +\description{ +Create an invoker email for use within authenticated Cloud Run +} +\examples{ + +cr_run_email("my-run-app", "my-project") +} +\seealso{ +Other Cloud Run functions: +\code{\link{cr_jwt_create}()}, +\code{\link{cr_plumber_pubsub}()}, +\code{\link{cr_run_get}()}, +\code{\link{cr_run_list}()}, +\code{\link{cr_run_schedule_http}()}, +\code{\link{cr_run}()} +} +\concept{Cloud Run functions} diff --git a/man/cr_run_get.Rd b/man/cr_run_get.Rd index 7cac91a8..86a4f830 100644 --- a/man/cr_run_get.Rd +++ b/man/cr_run_get.Rd @@ -23,7 +23,9 @@ This returns details on a particular deployed Cloud Run service. Other Cloud Run functions: \code{\link{cr_jwt_create}()}, \code{\link{cr_plumber_pubsub}()}, +\code{\link{cr_run_email}()}, \code{\link{cr_run_list}()}, +\code{\link{cr_run_schedule_http}()}, \code{\link{cr_run}()} } \concept{Cloud Run functions} diff --git a/man/cr_run_list.Rd b/man/cr_run_list.Rd index cbe12134..7cc75ec1 100644 --- a/man/cr_run_list.Rd +++ b/man/cr_run_list.Rd @@ -29,7 +29,9 @@ List the Cloud Run services you have access to Other Cloud Run functions: \code{\link{cr_jwt_create}()}, \code{\link{cr_plumber_pubsub}()}, +\code{\link{cr_run_email}()}, \code{\link{cr_run_get}()}, +\code{\link{cr_run_schedule_http}()}, \code{\link{cr_run}()} } \concept{Cloud Run functions} diff --git a/man/cr_run_schedule_http.Rd b/man/cr_run_schedule_http.Rd index 1305b6a6..5bfc81fb 100644 --- a/man/cr_run_schedule_http.Rd +++ b/man/cr_run_schedule_http.Rd @@ -2,52 +2,69 @@ % Please edit documentation in R/cloudrun_schedule.R \name{cr_run_schedule_http} \alias{cr_run_schedule_http} -\title{Create a Cloud Scheduler HTTP target for a Cloud Run URI} +\title{Create a Cloud Scheduler HTTP target for a private Cloud Run URI} \usage{ -cr_run_schedule_http( - uri, - http_method = "GET", - body = NULL, - email = cr_email_get() -) +cr_run_schedule_http(uri, email, http_method = "GET", body = NULL) } \arguments{ \item{uri}{The URI of your Cloud Run application} +\item{email}{The service email that has invoke access to the Cloud Run application. If using \link{cr_run} and derivatives to make the email this will include \code{(name)-cloudrun-invoker@(project-id).iam.gserviceaccount.com} - see \link{cr_run_email} to help make the email.} + \item{http_method}{The HTTP verb you have set up your Cloud Run application to receive} \item{body}{(optional) An R list object that will be turned into JSON via \link[jsonlite]{toJSON} and turned into a base64-encoded string if you are doing a POST, PUT or PATCH request.} - -\item{email}{The email that will authenticate the job set via \link{cr_email_set}} } \value{ A \link{HttpTarget} object for use in \link{cr_schedule} } \description{ -This enables Cloud Scheduler to trigger Cloud Run +This enables Cloud Scheduler to trigger Cloud Run endpoints when they are not public. } \details{ Ensure you have a service email with \link{cr_email_set} of format \code{service-{project-number}@gcp-sa-cloudscheduler.iam.gserviceaccount.com} with Cloud Scheduler Service Agent role as per https://cloud.google.com/scheduler/docs/http-target-auth#add } \examples{ -run_me <- cr_run_schedule_http( - "https://example-ewjogewawq-ew.a.run.app/echo?msg=blah", +\dontrun{ +# for unauthenticated apps create a HttpTarget +run_me <- HttpTarget( + uri = "https://public-ewjogewawq-ew.a.run.app/echo?msg=blah", http_method = "GET" ) +cr_schedule("cloud-run-scheduled", schedule = "16 4 * * *", + httpTarget = run_me) + +# for authenticated Cloud Run apps - create with allowUnauthenticated=FALSE +cr_deploy_run("my-app", allowUnauthenticated = TRUE) +} + +# deploying via R will help create a service email called my-app-cloudrun-invoker +cr_run_email("my-app") \dontrun{ +# use that email to schedule the Cloud Run private micro-service -cr_schedule("cloud-run-scheduled", schedule = "16 4 * * *", - httpTarget = run_me) +# schedule the endpoint +my_run_name <- "my-app" +my_app <- cr_run_get(my_run_name) +email <- cr_run_email(my_run_name) +endpoint <- paste0(my_app$status$url, "/fetch_stuff") + +app_sched <- cr_run_schedule_http(endpoint, + http_method = "GET", + email = email) +cr_schedule("cloud-run-scheduled-1", + schedule = "4 16 * * *", + httpTarget = app_sched) } } \seealso{ https://cloud.google.com/run/docs/triggering/using-scheduler -\link{cr_build_schedule_http} +\link{cr_build_schedule_http} and \link{cr_run} and \link{cr_deploy_run} Other Cloud Scheduler functions: \code{\link{HttpTarget}()}, @@ -59,5 +76,14 @@ Other Cloud Scheduler functions: \code{\link{cr_schedule_pause}()}, \code{\link{cr_schedule_run}()}, \code{\link{cr_schedule}()} + +Other Cloud Run functions: +\code{\link{cr_jwt_create}()}, +\code{\link{cr_plumber_pubsub}()}, +\code{\link{cr_run_email}()}, +\code{\link{cr_run_get}()}, +\code{\link{cr_run_list}()}, +\code{\link{cr_run}()} } +\concept{Cloud Run functions} \concept{Cloud Scheduler functions} diff --git a/vignettes/cloudrun.Rmd b/vignettes/cloudrun.Rmd index 7279b86e..66826763 100644 --- a/vignettes/cloudrun.Rmd +++ b/vignettes/cloudrun.Rmd @@ -417,16 +417,44 @@ content(res) ## Scheduling Cloud Run applications -Via [Cloud Scheduler](https://code.markedmondson.me/googleCloudRunner/articles/cloudscheduler.html) you can set up a scheduled hit of your HTTP endpoints, via GET, POST or any other methods you have coded into your app. `cr_run_schedule_http()` will help you create the HTTP endpoint for you to pass to `cr_schedule()`: +Via [Cloud Scheduler](https://code.markedmondson.me/googleCloudRunner/articles/cloudscheduler.html) you can set up a scheduled hit of your HTTP endpoints, via GET, POST or any other methods you have coded into your app. ```r -run_me <- cr_run_schedule_http( - "https://example-ewjogewawq-ew.a.run.app/echo?msg=blah", - http_method = "GET" - ) +# get your previously deployed Cloud Run app +my_app <- cr_run_get("your-cloud-run") + +# add any URL parameters your app needs etc. +endpoint <- paste0(my_app$status$url, "?msg=blah") + +# make the HTTP target +run_me <- HttpTarget(uri = endpoint, httpMethod = "GET") cr_schedule("cloud-run-scheduled", schedule = "4 16 * * *", httpTarget = run_me) +``` + +### Private Cloud Run service scheduling + +`cr_run_schedule_http()` will help you create the HTTP endpoint for you to pass to `cr_schedule()` that will work with Cloud Run apps with `allowUnauthenticated = FALSE` - it will by default create a service email for invoking your app called `{your-app}-cloudrun-invoker@{your-project}.iam.gserviceaccount.com` + +```r +# deploy a non-public app +cr_deploy_run("your-cloud-run", allowUnauthenticated = TRUE) + +# get your previously deployed Cloud Run app +my_app <- cr_run_get("your-cloud-run") + +# add any URL parameters your app needs etc. +endpoint <- paste0(my_app$status$url, "?msg=blah") +# generate the service email invoker that was created upon deployment +# "your-cloud-run-cloudrun-invoke@your-project.iam.gserviceaccount.com" +email <- cr_run_email("your-cloud-run") + +# make the HTTP target for authenticated access only +run_me <- cr_run_schedule_http(endpoint, email = email, http_method = "GET") + +# schedule the call to the endpoint of your Cloud run app +cr_schedule("cloud-run-scheduled", schedule = "4 16 * * *", httpTarget = run_me) ``` ## Deploying from another Google Cloud project diff --git a/vignettes/setup.Rmd b/vignettes/setup.Rmd index a7d3ed00..25196668 100644 --- a/vignettes/setup.Rmd +++ b/vignettes/setup.Rmd @@ -7,6 +7,17 @@ A video walk-through is available below, on [how to set-up googleCloudRunner's G +## Manual setup + +You can setup the configurations directly using the below R functions: + +* `cr_region_set()` +* `cr_project_set()` +* `cr_bucket_set()` +* `cr_email_set()` + +But it is recommended to use the environment arguments below. + ## Setup wizard cr_setup() There is a setup function to help you configure the package. Get started via the commands below: