Skip to content

Commit

Permalink
enh: introduce dcor_object_store.local_backup_location
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmueller committed Mar 8, 2024
1 parent f83047b commit 45ef079
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
- enh: set up cookies more strictly
- enh: always perform CSS rebranding after `dcor develop`
- enh: install additional dependencies in `dcor develop`
- enh: introduce "dcor_object_store.local_backup_location" configuration
option and check write permissions
- ref: migrate to dcor_shared 0.7.5
- setup: pin uwsgi==2.0.21 due to non-working harakiri
0.9.5
Expand Down
14 changes: 8 additions & 6 deletions dcor_control/cli/inspect.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import click
from dcor_shared import paths
from dcor_shared import get_ckan_config_option, paths

from .. import inspect as inspect_mod

Expand All @@ -21,12 +21,14 @@ def inspect(assume_yes=False):
paths.get_ckan_storage_path() / "resources",
paths.get_dcor_users_depot_path(),
paths.get_ckan_webassets_path(),
get_ckan_config_option("dcor_object_store.local_backup_location")
]:
inspect_mod.check_permission(
path=path,
user="www-data",
mode=0o755,
autocorrect=assume_yes)
if path is not None:
inspect_mod.check_permission(
path=path,
user="www-data",
mode=0o755,
autocorrect=assume_yes)

# Recursively make sure that www-data can upload things into storage
inspect_mod.check_permission(
Expand Down
4 changes: 4 additions & 0 deletions dcor_control/resources/dcor_options.ini
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ dcor_object_store.ssl_verify = true
# The bucket name is by default defined by the circle ID. Resources
# are stored in the "RES/OUR/CEID-SCHEME" in that bucket.
dcor_object_store.bucket_name = circle-{organization_id}
# This is a temporarily existing configuration option used in
# dcor_depot for keeping backups of everything that is on S3 locally
# while waiting for an S3 backup strategy to become implemented.
# dcor_object_store.local_backup_location = /data/s3_resource_backup-dcor


# search
Expand Down
6 changes: 4 additions & 2 deletions dcor_control/resources/server_options.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
"dcor_object_store.access_key_id": "ZEtYxn2QxSGB5KCoDLLw",
"dcor_object_store.secret_access_key": "dIArZGZdNPD0NlN5GW7miYQxrtFAEl45LvDVR8cE",
"dcor_object_store.endpoint_url": "http://127.0.0.1:9000",
"dcor_object_store.ssl_verify": "false"
"dcor_object_store.ssl_verify": "false",
"dcor_object_store.local_backup_location": "/data/s3_resource_backup-vagrant"
},
"include": ["general"]
},
Expand Down Expand Up @@ -99,7 +100,8 @@
"smtp.user": "",
"smtp.password": "",
"email_to": "<TEMPLATE:EMAIL>",
"error_email_from": "error-<TEMPLATE:HOSTNAME>@mpl.mpg.de"
"error_email_from": "error-<TEMPLATE:HOSTNAME>@mpl.mpg.de",
"dcor_object_store.local_backup_location": "/data/s3_resource_backup-<TEMPLATE:HOSTNAME>"
}
}
}
Expand Down

0 comments on commit 45ef079

Please sign in to comment.