Google Cloud Storage
Using your own GCS bucket for Datasaur projects
File Key
This attribute will be used when you create a project to tell Datasaur which file should be used. You can get it by using the path after bucket name on gsutil URI. See the example below.
Bucket name:
datasaur-test
gsutil URI:
gs://datasaur-test/some-folder/image.png
File key:
/some-folder/image.png
Setup
By integrating your bucket into Datasaur, you would be able to create projects using your GCS bucket as the source for the project files.
1. Create or Select Google Cloud Storage Bucket
Log into your GCP account, then go to Cloud Storage.
Create a new bucket or choose the existing one that you want to integrate.
Don't close this tab, we'll get back to this console again.
2. Setup External Object Storage Integration in Datasaur Team Settings
Open your team page, then go to Settings > Integrations.
Click on "New External Object Storage". A new window will pop up.
Choose the GCS option.
Input your bucket name from the first step.
If this is your first time setting up this bucket in a Datasaur workspace, you can use the random value from the form or change it as needed. It is also recommended to store the value in a secure location.
If you have previously connected the bucket to another Datasaur workspace, please enter the security token from that integration. You can find the security token in the View Details menu on the External Object Storage page. If you no longer have access to that workspace, that's when your previous secure location will come in handy.
Copy the Service Account Email from the form.
3. Setup Google Cloud Storage Bucket Permission
This step would allow Datasaur to access your bucket using the service account.
Go back to the tab console from the first step.
Click on Permissions tab, then Grant Access.
On the New Principals field, paste in the Service Account Email that you've copied before.
On the role field, select Storage Object Admin (under Cloud Storage) predefined role.
Click on Save to finish setting up permissions.
4. Setup CORS
On the GCP console page, click on Activate Cloud Shell around the top right corner. The shell will be shown on the bottom of your page.
In the cloud shell, input this command to create a JSON file for the CORS configuration.
Then, set the CORS configuration to your bucket. Replace
<your-bucket-name>
with your actual bucket name.To verify if the configurations have been set right, use this command. Replace
<your-bucket-name>
with your actual bucket name.
5. Check Connection
Before clicking on the Add storage button, check the connection by clicking on the Check connection button to make sure your setup is done correctly.
If it's a success, you can continue to create the external object storage by clicking Add storage.
6. Good to go!
Now, you will be able to create projects using files directly from your GCS bucket!
If you have any questions or comments, please let us know, and we'll be happy to support you.
Last updated