In this article, you will learn how to configure Google Cloud Storage (GCS) if you are running Hyperscience on Google Cloud Platform (GCP).
GCS Setup
The steps required to set up Google Cloud Storage depend on which version of Hyperscience you are using.
v40.1 and later
Create a bucket in GCS, or designate a prefix in an existing bucket.
On the Roles page of the Google Cloud console, create an IAM role with the following permissions:
storage.multipartUploads.abort storage.multipartUploads.create storage.multipartUploads.list storage.folders.get storage.folders.list storage.objects.create storage.objects.delete storage.objects.get storage.objects.listOn the Service Accounts page of the Google Cloud console, create a service account to be used by the Hyperscience application.
Assign the role you created in step 2 to the service account with the following IAM conditions:
Condition type — Name
Operator — Starts with
Value depends on whether you want to put files under a prefix or at the root of the bucket:
If files will be stored at bucket’s root:
Value = projects/_/buckets//objects/
If files will be stored under a prefix:
Value = projects/_/buckets//objects//
Update your
.envfile with the necessary values as follows:FORMS_STORAGE_MODE=GCS FILE_STORE_GCS_BUCKET=<bucket_name> FILE_STORE_GCS_KEY_PREFIX # If not using workload identity, base64 encode the json key file for the service account and add it as well. FILE_STORE_GOOGLE_CLOUD_KEY=<base_64_sa_json_file>
Set
FILE_STORE_GCS_KEY_PREFIXwhen you create the instance.You cannot change this value after the instance is running.