GCP Storage#
Lithops with GCP Storage as storage backend.
Installation#
Install Google Cloud Platform backend dependencies:
python3 -m pip install lithops[gcp]
Configuration#
Login to Google Cloud Console (or signup if you don’t have an account).
Create a new project. Name it
lithops
or similar.Navigate to IAM & Admin > Service Accounts.
Click on Create Service Account. Name the service account
lithops-executor
or similar. Then click on Create.Add the following roles to the service account:
Service Account User
Cloud Functions Admin
Pub/Sub Admin
Storage Admin
Click on Continue. Then, click on Create key. Select JSON and then Create. Download the JSON file to a secure location in you computer. Click Done.
Edit your lithops config file and add the following keys:
lithops:
storage: gcp_storage
gcp:
region : <REGION_NAME>
credentials_path : <FULL_PATH_TO_CREDENTIALS_JSON>
Summary of configuration keys for Google:#
Google Cloud Platform:#
Group |
Key |
Default |
Mandatory |
Additional info |
---|---|---|---|---|
gcp |
region |
yes |
Region of the bucket created at step 8. Functions and pub/sub queue will be created in the same region (e.g. |
|
gcp |
credentials_path |
yes |
Absolute path of your JSON key file downloaded in step 7 (e.g. |
Google Cloud Storage#
Group |
Key |
Default |
Mandatory |
Additional info |
---|---|---|---|---|
gcp_storage |
region |
no |
Region Name (e.g. |
|
gcp_storage |
storage_bucket |
no |
The name of a bucket that exists in your account. This will be used by Lithops for intermediate data. Lithops will automatically create a new one if it is not provided |