-
Notifications
You must be signed in to change notification settings - Fork 3
Google Cloud DB Setup
Author: Felix Nützel
Date: 13.07.2023
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.

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.

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