Creating a GCP Cloud Storage integration
To use remote files in projects, you must first create an integration. Then in each one of your projects, you can define a connector between the integration and the project.
Only organization admins can manage remote integrations.
To create a GCP Cloud Storage integration:
Path restrictions are not yet available for GCP.
Configuring your GCP bucket
You must properly configure your Google Cloud Storage bucket to use it with Kili. To do that, complete these two tasks:
- Setting the IAM permissions: from the UI or programmatically
- Setting the CORS
Setting IAM Permissions from the UI
- From your GCP account, go to your Google Cloud Storage bucket.
- In the Permissions section, click Add permissions.
- In the New principals field paste the address of the Kili service account:
[email protected]
- Under Role, select the native Storage Object Viewer role. This grants Kili read permissions in your bucket.
- Click Save.
Setting IAM Permissions programmatically
You can set permissions programmatically by using GSUTIL in your terminal, or in the GCP console by using the Cloud Shell. The commands are the same.
gsutil iam ch serviceAccount:[email protected]:objectViewer gs://<bucket-name>
Replace <bucket-name>
with your Cloud Storage bucket name.
Setting up CORS
You must set up CORS on the bucket. Otherwise assets will not load in the Kili UI.
You can set up CORS by using GSUTIL in your terminal, or in the GCP console by using the Cloud Shell. The commands are the same.
- Create a JSON configuration file for the CORS:
echo '[{"origin":["https://cloud.kili-technology.com"],"method":["GET"],"responseHeader":["*"]}]' > cors-config.json
echo '[{"origin":["https://cloud.eastus.kili-technology.com"],"method":["GET"],"responseHeader":["*"]}]' > cors-config.json
- Apply the configuration to your bucket:
gsutil cors set cors-config.json gs://<bucket-name>
- Check that the configuration is correctly applied:
gsutil cors get gs://<bucket-name>
Connecting your GCP bucket to Kili
- In Kili, click on your name in the top-right corner of the Kili app interface, and then go to Organization Management > Integrations.
- Click New.
- Select
Google Cloud Platform
. - Name your integration and paste your GCP Cloud Storage
bucket name
.
- (Optional) Tick the I authorize Kili Technology to process my files on its servers to enable features that require such processing checkbox.
You are now ready to synchronize data with a project.
Updated 12 months ago