From ce2e51384fec69d95ee176b9e557db6c92e1461b Mon Sep 17 00:00:00 2001 From: Piotr Mitros Date: Tue, 2 Sep 2014 09:57:08 -0400 Subject: [PATCH] AWS settings for XBlocks to have filesystem-like storage --- cms/envs/aws.py | 6 ++++++ lms/envs/aws.py | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/cms/envs/aws.py b/cms/envs/aws.py index 1027612035..548bad2fe6 100644 --- a/cms/envs/aws.py +++ b/cms/envs/aws.py @@ -88,6 +88,12 @@ CELERY_QUEUES = { with open(CONFIG_ROOT / CONFIG_PREFIX + "env.json") as env_file: ENV_TOKENS = json.load(env_file) +DJFS = { + 'type' : 's3fs', + 'bucket' : ENV_TOKENS.get('xblock-fs-storage-bucket', None), + 'prefix' : ENV_TOKENS.get('xblock-fs-storage-prefix', '') +} + # STATIC_URL_BASE specifies the base url to use for static files STATIC_URL_BASE = ENV_TOKENS.get('STATIC_URL_BASE', None) if STATIC_URL_BASE: diff --git a/lms/envs/aws.py b/lms/envs/aws.py index 9deb623aa6..cd0d549015 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -111,6 +111,12 @@ if os.environ.get('QUEUE') == 'high_mem': with open(CONFIG_ROOT / CONFIG_PREFIX + "env.json") as env_file: ENV_TOKENS = json.load(env_file) +DJFS = { + 'type' : 's3fs', + 'bucket' : ENV_TOKENS.get('xblock-fs-storage-bucket', None), + 'prefix' : ENV_TOKENS.get('xblock-fs-storage-prefix', '') +} + # STATIC_ROOT specifies the directory where static files are # collected STATIC_ROOT_BASE = ENV_TOKENS.get('STATIC_ROOT_BASE', None)