From 5bd790984e91fb200aa9d1c23ab5100bb381e1af Mon Sep 17 00:00:00 2001 From: Martina Iglesias Fernandez Date: Fri, 19 Mar 2021 17:29:43 +0100 Subject: [PATCH] Add integration documentation Signed-off-by: Martina Iglesias Fernandez --- docs/integrations/google-cloud-storage/gcs.md | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 docs/integrations/google-cloud-storage/gcs.md diff --git a/docs/integrations/google-cloud-storage/gcs.md b/docs/integrations/google-cloud-storage/gcs.md new file mode 100644 index 0000000000..f9cba7a04c --- /dev/null +++ b/docs/integrations/google-cloud-storage/gcs.md @@ -0,0 +1,57 @@ +--- +id: googlegcs +title: Google Cloud Storage +sidebar_label: Google Cloud Storage Data +# prettier-ignore +description: Setting up an integration with Google Cloud Storage +--- + +The Backstage catalog can import entities from a yaml file stored in a GCS +(Google Cloud Storage) bucket. To enable the ingestion of said entities the +`GoogleGcs` integration must be enabled first. + +## Configuration + +To configure the integration add the appropriate credentials to the Backstage +backend. There are two main ways to do this: by explicitly setting a +`clientEmail` and a `privateKey` or by letting the Google Storage SDK discover +the credentials automatically. + +### Explicit credentials + +Explicit credentials can be set in the following format: + +```yaml +integrations: + googleGcs: + - clientEmail: + $env: GCS_CLIENT_EMAIL + privateKey: + $env: GCS_PRIVATE_KEY +``` + +Then make sure the environment variables `GCS_CLIENT_EMAIL` and +`GCS_PRIVATE_KEY` are set when you run Backstage. + +### Automatic discovery of Google credentials + +Since this integration uses the Google Storage SDK, you can also choose to not +provide any explicit credentials and let the SDK discover them automatically. + +One of these discovery methods is to provide an environment variable called +`GOOGLE_APPLICATION_CREDENTIALS` and set it to the file path of your JSON +service account key. + +For more details and methods to provide credentials to the Google Storage SDK +you can check [this documentation page][google gcs docs]. + +## Usage + +To use this integration to import entities from a GCS bucket go to the Google +console and browse the file you would like to import. Then copy the +`Authenticated URL` and paste it into the text box in the `register component` +form. This url should look like +`https://storage.cloud.google.com///catalog-info.yaml`. + +[google gcs docs]: + https://cloud.google.com/docs/authentication/production#auth-cloud-implicit-nodejs