Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
56164669
Commit
56164669
authored
Apr 20, 2017
by
Matt Drayer
Committed by
GitHub
Apr 20, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14762 from edx/mattdrayer/add-enterprise-aws-config
Add environment overrides for Enterprise settings
parents
1a31f251
3aecfe91
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
11 deletions
+44
-11
lms/envs/aws.py
+31
-8
lms/envs/common.py
+13
-3
No files found.
lms/envs/aws.py
View file @
56164669
...
...
@@ -177,11 +177,6 @@ EDXMKTG_USER_INFO_COOKIE_NAME = ENV_TOKENS.get('EDXMKTG_USER_INFO_COOKIE_NAME',
LMS_ROOT_URL
=
ENV_TOKENS
.
get
(
'LMS_ROOT_URL'
)
DEFAULT_ENTERPRISE_API_URL
=
None
if
LMS_ROOT_URL
is
not
None
:
DEFAULT_ENTERPRISE_API_URL
=
LMS_ROOT_URL
+
'/enterprise/api/v1/'
ENTERPRISE_API_URL
=
ENV_TOKENS
.
get
(
'ENTERPRISE_API_URL'
,
DEFAULT_ENTERPRISE_API_URL
)
ENV_FEATURES
=
ENV_TOKENS
.
get
(
'FEATURES'
,
{})
for
feature
,
value
in
ENV_FEATURES
.
items
():
FEATURES
[
feature
]
=
value
...
...
@@ -902,7 +897,12 @@ AFFILIATE_COOKIE_NAME = ENV_TOKENS.get('AFFILIATE_COOKIE_NAME', AFFILIATE_COOKIE
DOC_LINK_BASE_URL
=
ENV_TOKENS
.
get
(
'DOC_LINK_BASE_URL'
,
DOC_LINK_BASE_URL
)
############## Settings for the Enterprise App ######################
############## OPEN EDX ENTERPRISE SERVICE CONFIGURATION ######################
# The Open edX Enterprise service is currently hosted via the LMS container/process.
# However, for all intents and purposes this service is treated as a standalone IDA.
# These configuration settings are specific to the Enterprise service and you should
# not find references to them within the edx-platform project.
# Publicly-accessible enrollment URL, for use on the client side.
ENTERPRISE_PUBLIC_ENROLLMENT_API_URL
=
ENV_TOKENS
.
get
(
...
...
@@ -911,12 +911,35 @@ ENTERPRISE_PUBLIC_ENROLLMENT_API_URL = ENV_TOKENS.get(
)
# Enrollment URL used on the server-side.
# If not overridden in ENV_TOKENS, then fallback to the value set in env/common.py
ENTERPRISE_ENROLLMENT_API_URL
=
ENV_TOKENS
.
get
(
'ENTERPRISE_ENROLLMENT_API_URL'
,
ENTERPRISE_ENROLLMENT_API_URL
)
# Discovery App config
############## ENTERPRISE SERVICE API CLIENT CONFIGURATION ######################
# The LMS communicates with the Enterprise service via the EdxRestApiClient class
# The below environmental settings are utilized by the LMS when interacting with
# the service, and override the default parameters which are defined in common.py
DEFAULT_ENTERPRISE_API_URL
=
None
if
LMS_ROOT_URL
is
not
None
:
DEFAULT_ENTERPRISE_API_URL
=
LMS_ROOT_URL
+
'/enterprise/api/v1/'
ENTERPRISE_API_URL
=
ENV_TOKENS
.
get
(
'ENTERPRISE_API_URL'
,
DEFAULT_ENTERPRISE_API_URL
)
ENTERPRISE_SERVICE_WORKER_USERNAME
=
ENV_TOKENS
.
get
(
'ENTERPRISE_SERVICE_WORKER_USERNAME'
,
ENTERPRISE_SERVICE_WORKER_USERNAME
)
ENTERPRISE_API_CACHE_TIMEOUT
=
ENV_TOKENS
.
get
(
'ENTERPRISE_API_CACHE_TIMEOUT'
,
ENTERPRISE_API_CACHE_TIMEOUT
)
############## CATALOG/DISCOVERY SERVICE API CLIENT CONFIGURATION ######################
# The LMS communicates with the Catalog service via the EdxRestApiClient class
# The below environmental settings are utilized by the LMS when interacting with
# the service, and override the default parameters which are defined in common.py
COURSES_API_CACHE_TIMEOUT
=
ENV_TOKENS
.
get
(
'COURSES_API_CACHE_TIMEOUT'
,
COURSES_API_CACHE_TIMEOUT
)
lms/envs/common.py
View file @
56164669
...
...
@@ -60,7 +60,6 @@ DISCUSSION_SETTINGS = {
}
LMS_ROOT_URL
=
"http://localhost:8000"
ENTERPRISE_API_URL
=
LMS_ROOT_URL
+
'/enterprise/api/v1/'
# Features
FEATURES
=
{
...
...
@@ -2852,7 +2851,6 @@ ECOMMERCE_PUBLIC_URL_ROOT = None
ECOMMERCE_API_URL
=
None
ECOMMERCE_API_TIMEOUT
=
5
ECOMMERCE_SERVICE_WORKER_USERNAME
=
'ecommerce_worker'
ENTERPRISE_SERVICE_WORKER_USERNAME
=
'enterprise_worker'
COURSE_CATALOG_API_URL
=
None
...
...
@@ -3071,10 +3069,22 @@ REDIRECT_CACHE_KEY_PREFIX = 'redirects'
DOC_LINK_BASE_URL
=
None
############## Settings for the Enterprise App ######################
############## OPEN EDX ENTERPRISE SERVICE CONFIGURATION ######################
# The Open edX Enterprise service is currently hosted via the LMS container/process.
# However, for all intents and purposes this service is treated as a standalone IDA.
# These configuration settings are specific to the Enterprise service and you should
# not find references to them within the edx-platform project.
ENTERPRISE_ENROLLMENT_API_URL
=
LMS_ROOT_URL
+
"/api/enrollment/v1/"
ENTERPRISE_PUBLIC_ENROLLMENT_API_URL
=
ENTERPRISE_ENROLLMENT_API_URL
############## ENTERPRISE SERVICE API CLIENT CONFIGURATION ######################
# The LMS communicates with the Enterprise service via the EdxRestApiClient class
# These default settings are utilized by the LMS when interacting with the service,
# and are overridden by the configuration parameter accessors defined in aws.py
ENTERPRISE_API_URL
=
LMS_ROOT_URL
+
'/enterprise/api/v1/'
ENTERPRISE_SERVICE_WORKER_USERNAME
=
'enterprise_worker'
ENTERPRISE_API_CACHE_TIMEOUT
=
3600
# Value is in seconds
############## Settings for Course Enrollment Modes ######################
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment