diff --git a/docs/source/deploying/configuration.rst b/docs/source/deploying/configuration.rst index a6b8a491..b593b82f 100644 --- a/docs/source/deploying/configuration.rst +++ b/docs/source/deploying/configuration.rst @@ -163,14 +163,14 @@ Quetz can store packages in Google Cloud Storage. To configure, use the followin bucket_prefix="..." bucket_suffix="..." cache_timeout="..." - bucket_location="..." + region="..." :project: The Google Cloud Project ID to work under :token: A token to pass the `gcsfs`. See the `gcsfs documention `_ for valid values. :bucket_prefix: :bucket_suffix: channel buckets on GCS are created with the following semantics: ``{bucket_prefix}{channel_name}{bucket_suffix}`` :cache_timeout: Timeout in s after which local GCS cache entries are invalidated. Set to a value <=0 to disable caching completely. Default is that entries are never invalidated. -:bucket_location: Location where new buckets are created. You can find a list of available locations here: https://cloud.google.com/storage/docs/locations#available-locations. +:region: Location where new buckets are created. You can find a list of available locations here: https://cloud.google.com/storage/docs/locations#available-locations. ``local_store`` section ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/quetz/config.py b/quetz/config.py index c1ef2446..a16fc202 100644 --- a/quetz/config.py +++ b/quetz/config.py @@ -163,7 +163,7 @@ class Config: ConfigEntry("bucket_prefix", str, default=""), ConfigEntry("bucket_suffix", str, default=""), ConfigEntry("cache_timeout", int, default=None), - ConfigEntry("bucket_location", str, default=None), + ConfigEntry("region", str, default=None), ], required=False, ), @@ -406,7 +406,7 @@ def get_package_store(self) -> pkgstores.PackageStore: 'bucket_prefix': self.gcs_bucket_prefix, 'bucket_suffix': self.gcs_bucket_suffix, 'cache_timeout': self.gcs_cache_timeout, - 'bucket_location': self.bucket_location, + 'region': self.region, } ) else: diff --git a/quetz/pkgstores.py b/quetz/pkgstores.py index 13933c11..3cfec969 100644 --- a/quetz/pkgstores.py +++ b/quetz/pkgstores.py @@ -559,13 +559,13 @@ def __init__(self, config): self.project = config.get("project") self.token = config.get("token") self.cache_timeout = config.get("cache_timeout") - self.bucket_location = config.get("bucket_location") + self.region = config.get("region") self.fs = gcsfs.GCSFileSystem( project=self.project, token=self.token if self.token else None, cache_timeout=self.cache_timeout, - default_location=self.bucket_location, + default_location=self.region, ) self.bucket_prefix = config['bucket_prefix']