Skip to content

Google Cloud DB Setup

Felix-012 edited this page Jul 13, 2023 · 3 revisions

Author: Felix Nützel
Date: 13.07.2023

Google Cloud Database Setup

Create the Bucket

If the no database bucket exists, you first need to create a new one in Google Cloud by navigating to your project and select "Erstellen" in the "Cloud Storage" page. There, you can customize your bucket according to your needs. The bucket name should be "qabot_db_data" by default. If you prefer another name you should also configure it in the project code under QAChat > Common > bucket_managing.py where you will find the constant bucket_name.

create_bucket

Access the Bucket

In order to use the bucket, you also need a credentials_file.json for your service account in the project and a GOOGLE_APPLICATION_CREDENTIALS key in tokens.env that points to the path of this credentials file. Additionally, you need to set the corresponding service account as admin for the bucket, so your application is able to access the data within the bucket.

Access_Bucket

Uploading to and Downloading from the DB

For enabling the downloading and uploading feature from Weaviate, you first need to set the environment variables
ENABLE_MODULES=backup-gcs (enables google cloud backups)
BACKUP_GCS_BUCKET=bucket_name (by default qabot_db_data)
GOOGLE_APPLICATION_CREDENTIALS=path/to/your/credentials_file.json

Afterwards you can simply use the upload and download functions provided in QAChat > Common > bucket_managing.py

Clone this wiki locally