serverless-shell-scripts

command module
v0.0.0-...-6aa4820 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 8, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

README

This Cloud Run service demonstrates how to run a shell script in the cloud. It does so by running a Firestore backup operation when the Cloud Run services's URL is accessed. Replace the contents on script.sh with whatever shell script you need to run in the cloud.

  1. Create a bucket in Google Cloud Storage (or reuse an existing one). The Firestore backups will be written to this bucket.
  2. Enter the name of that bucket in script.sh.
  3. Grant these permissions to the service account that executes the Cloud Run service. The default account will be xxxxxxxxxxxx-compute@developer.gserviceaccount.com also known as the "Default compute service account".
    • Cloud Datastore Import Export Admin.
    • Storage Admin, for the Cloud Storage bucket. (If you are using the "Default compute service account", no need to add this permission. It already has it.)
  4. Enter your Google Cloud project ID in deploy.sh/deploy.bat.
  5. Run deploy.sh/deploy.bat to deploy the Cloud Run service.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL