From 818cb0d1e78022cd157d8e822712fcbd54f13ec3 Mon Sep 17 00:00:00 2001 From: Calen Pennington Date: Thu, 26 Jul 2012 12:40:05 -0400 Subject: [PATCH] Separate cms and lms auth and env files, and have the LMS that runs with the CMS use the CMS modulestore --- cms/envs/aws.py | 4 ++-- lms/envs/with_cms.py | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 lms/envs/with_cms.py diff --git a/cms/envs/aws.py b/cms/envs/aws.py index 26a3545324..79c90a6df9 100644 --- a/cms/envs/aws.py +++ b/cms/envs/aws.py @@ -16,7 +16,7 @@ DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage' ########################### NON-SECURE ENV CONFIG ############################## # Things like server locations, ports, etc. -with open(ENV_ROOT / "env.json") as env_file: +with open(ENV_ROOT / "cms.env.json") as env_file: ENV_TOKENS = json.load(env_file) SITE_NAME = ENV_TOKENS['SITE_NAME'] @@ -39,7 +39,7 @@ with open(ENV_ROOT / "repos.json") as repos_file: ############################## SECURE AUTH ITEMS ############################### # Secret things: passwords, access keys, etc. -with open(ENV_ROOT / "auth.json") as auth_file: +with open(ENV_ROOT / "cms.auth.json") as auth_file: AUTH_TOKENS = json.load(auth_file) DATABASES = AUTH_TOKENS['DATABASES'] diff --git a/lms/envs/with_cms.py b/lms/envs/with_cms.py new file mode 100644 index 0000000000..b807a0f545 --- /dev/null +++ b/lms/envs/with_cms.py @@ -0,0 +1,10 @@ +""" +Settings for the LMS that runs alongside the CMS on AWS +""" + +from .aws import * + +with open(ENV_ROOT / "cms.auth.json") as auth_file: + CMS_AUTH_TOKENS = json.load(auth_file) + +MODULESTORE = CMS_AUTH_TOKENS['MODULESTORE']