Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
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
OpenEdx
configuration
Commits
55ad4337
Commit
55ad4337
authored
Dec 18, 2017
by
Joseph Mulloy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jill/edxapp-mongo-replica-set' into jill_merge_2017_12_18
parents
7006c49e
c2e8379d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
29 deletions
+51
-29
CHANGELOG.md
+14
-7
playbooks/roles/edxapp/defaults/main.yml
+37
-22
No files found.
CHANGELOG.md
View file @
55ad4337
...
...
@@ -37,14 +37,21 @@
your configuration to set
`EDXAPP_CELERY_BROKER_TRANSPORT`
explicitly.
-
Role: edxapp
-
Added
`EDXAPP_LMS_SPLIT_DOC_STORE_READ_PREFERENCE`
with a default value of
SECONDARY_PREFERED to distribute read workload across the replica set.
-
Changed
`EDXAPP_MONGO_HOSTS`
to be a comma seperated string, which is
required by pymongo.MongoReplicaSetClient for multiple hosts instead of an
array.
-
Added
`EDXAPP_MONGO_REPLICA_SET`
, which is required to use
pymongo.MongoReplicaSetClient in PyMongo 2.9.1, whis is required to use the
read_preference setting. This should be set to the name of your replica set.
pymongo.MongoReplicaSetClient in PyMongo 2.9.1. This should be set to the
name of your replica set.
This setting causes the
`EDXAPP_*_READ_PREFERENCE`
settings below to be used.
-
Added
`EDXAPP_MONGO_CMS_READ_PREFERENCE`
with a default value of
`PRIMARY`
.
-
Added
`EDXAPP_MONGO_LMS_READ_PREFERENCE`
with a default value of
`SECONDARY_PREFERED`
to distribute the read workload across the replica set
for replicated docstores and contentstores.
-
Added
`EDXAPP_LMS_SPLIT_DOC_STORE_READ_PREFERENCE`
with a default value of
`EDXAPP_MONGO_LMS_READ_PREFERENCE`
.
-
Added
`EDXAPP_LMS_DRAFT_DOC_STORE_CONFIG`
with a default value of
`EDXAPP_MONGO_CMS_READ_PREFERENCE`
, to enforce consistency between
Studio and the LMS Preview modes.
-
Removed
`EDXAPP_CONTENTSTORE_ADDITIONAL_OPTS`
, since there is no notion of
common options to the content store anymore.
-
Role: nginx
-
Modified
`lms.j2`
,
`cms.j2`
,
`credentials.j2`
,
`edx_notes_api.j2`
and
`insights.j2`
to enable HTTP Strict Transport Security
...
...
playbooks/roles/edxapp/defaults/main.yml
View file @
55ad4337
...
...
@@ -65,8 +65,7 @@ EDXAPP_XQUEUE_DJANGO_AUTH:
password
:
'
password'
EDXAPP_XQUEUE_URL
:
'
http://localhost:18040'
# EDXAPP_MONGO_HOSTS must be a comma seperated list of hosts/ips for
# compatibility with pymongo.MongoReplicaSetClient in PyMongo 2.9.1
# Comma-separated list of hosts/ips
EDXAPP_MONGO_HOSTS
:
'
localhost'
EDXAPP_MONGO_PASSWORD
:
'
password'
EDXAPP_MONGO_PORT
:
27017
...
...
@@ -74,7 +73,11 @@ EDXAPP_MONGO_USER: 'edxapp'
EDXAPP_MONGO_DB_NAME
:
'
edxapp'
EDXAPP_MONGO_USE_SSL
:
False
EDXAPP_MONGO_REPLICA_SET
:
'
'
EDXAPP_LMS_SPLIT_DOC_STORE_READ_PREFERENCE
:
'
SECONDARY_PREFERRED'
# Used only if EDXAPP_MONGO_REPLICA_SET is provided.
EDXAPP_MONGO_CMS_READ_PREFERENCE
:
'
PRIMARY'
EDXAPP_MONGO_LMS_READ_PREFERENCE
:
'
SECONDARY_PREFERRED'
EDXAPP_LMS_SPLIT_DOC_STORE_READ_PREFERENCE
:
'
{{
EDXAPP_MONGO_LMS_READ_PREFERENCE
}}'
EDXAPP_LMS_DRAFT_DOC_STORE_READ_PREFERENCE
:
'
{{
EDXAPP_MONGO_CMS_READ_PREFERENCE
}}'
EDXAPP_MYSQL_DB_NAME
:
'
edxapp'
EDXAPP_MYSQL_USER
:
'
edxapp001'
...
...
@@ -855,9 +858,24 @@ edxapp_environment_extra: {}
edxapp_environment
:
"
{{
edxapp_environment_default
|
combine(edxapp_environment_extra)
}}"
edxapp_generic_contentstore_config
:
&edxapp_generic_default_contentstore
ENGINE
:
'
xmodule.contentstore.mongo.MongoContentStore'
#
# connection strings are duplicated temporarily for
# backward compatibility
#
OPTIONS
:
db
:
"
{{
EDXAPP_MONGO_DB_NAME
}}"
host
:
"
{{
EDXAPP_MONGO_HOSTS
}}"
password
:
"
{{
EDXAPP_MONGO_PASSWORD
}}"
port
:
"
{{
EDXAPP_MONGO_PORT
}}"
user
:
"
{{
EDXAPP_MONGO_USER
}}"
ssl
:
"
{{
EDXAPP_MONGO_USE_SSL
}}"
edxapp_generic_doc_store_config
:
&edxapp_generic_default_docstore
db
:
"
{{
EDXAPP_MONGO_DB_NAME
}}"
host
:
"
{{
EDXAPP_MONGO_HOSTS
}}"
replicaSet
:
"
{{
EDXAPP_MONGO_REPLICA_SET
}}"
password
:
"
{{
EDXAPP_MONGO_PASSWORD
}}"
port
:
"
{{
EDXAPP_MONGO_PORT
}}"
user
:
"
{{
EDXAPP_MONGO_USER
}}"
...
...
@@ -868,17 +886,20 @@ edxapp_generic_doc_store_config: &edxapp_generic_default_docstore
connectTimeoutMS
:
2000
# default is 20000, I believe raises pymongo.errors.ConnectionFailure
# Not setting waitQueueTimeoutMS and waitQueueMultiple since pymongo defaults to nobody being allowed to wait
EDXAPP_LMS_DRAFT_DOC_STORE_CONFIG
:
<<
:
*edxapp_generic_default_docstore
# We use the CMS read_preference here because the draft docstore's view of
# the modulestore should mirror Studio's, so that instructors can check their
# changes in Preview mode.
read_preference
:
"
{{
EDXAPP_LMS_DRAFT_DOC_STORE_READ_PREFERENCE
}}"
EDXAPP_LMS_SPLIT_DOC_STORE_CONFIG
:
<<
:
*edxapp_generic_default_docstore
replicaSet
:
"
{{
EDXAPP_MONGO_REPLICA_SET
}}"
read_preference
:
"
{{
EDXAPP_LMS_SPLIT_DOC_STORE_READ_PREFERENCE
}}"
EDXAPP_CMS_DOC_STORE_CONFIG
:
<<
:
*edxapp_generic_default_docstore
read_preference
:
"
{{
EDXAPP_MONGO_CMS_READ_PREFERENCE
}}"
edxapp_databases
:
# edxapp's edxapp-migrate scripts and the edxapp_migrate play
...
...
@@ -933,26 +954,10 @@ edxapp_generic_auth_config: &edxapp_generic_auth
SWIFT_TEMP_URL_KEY
:
"
{{
EDXAPP_SWIFT_TEMP_URL_KEY
}}"
SWIFT_TEMP_URL_DURATION
:
"
{{
EDXAPP_SWIFT_TEMP_URL_DURATION
}}"
SECRET_KEY
:
"
{{
EDXAPP_EDXAPP_SECRET_KEY
}}"
DOC_STORE_CONFIG
:
"
{{
edxapp_generic_doc_store_config
}}"
XQUEUE_INTERFACE
:
basic_auth
:
"
{{
EDXAPP_XQUEUE_BASIC_AUTH
}}"
django_auth
:
"
{{
EDXAPP_XQUEUE_DJANGO_AUTH
}}"
url
:
"
{{
EDXAPP_XQUEUE_URL
}}"
CONTENTSTORE
:
ENGINE
:
'
xmodule.contentstore.mongo.MongoContentStore'
#
# connection strings are duplicated temporarily for
# backward compatibility
#
OPTIONS
:
db
:
"
{{
EDXAPP_MONGO_DB_NAME
}}"
host
:
"
{{
EDXAPP_MONGO_HOSTS
}}"
password
:
"
{{
EDXAPP_MONGO_PASSWORD
}}"
port
:
"
{{
EDXAPP_MONGO_PORT
}}"
user
:
"
{{
EDXAPP_MONGO_USER
}}"
ssl
:
"
{{
EDXAPP_MONGO_USE_SSL
}}"
ADDITIONAL_OPTIONS
:
"
{{
EDXAPP_CONTENTSTORE_ADDITIONAL_OPTS
}}"
DOC_STORE_CONFIG
:
*edxapp_generic_default_docstore
DATABASES
:
"
{{
edxapp_databases
}}"
EMAIL_HOST_USER
:
"
{{
EDXAPP_EMAIL_HOST_USER
}}"
EMAIL_HOST_PASSWORD
:
"
{{
EDXAPP_EMAIL_HOST_PASSWORD
}}"
...
...
@@ -1172,6 +1177,11 @@ generic_env_config: &edxapp_generic_env
lms_auth_config
:
<<
:
*edxapp_generic_auth
CONTENTSTORE
:
<<
:
*edxapp_generic_default_contentstore
ADDITIONAL_OPTIONS
:
"
{{
EDXAPP_CONTENTSTORE_ADDITIONAL_OPTS
}}"
DOC_STORE_CONFIG
:
"
{{
EDXAPP_LMS_SPLIT_DOC_STORE_CONFIG
}}"
DOC_STORE_CONFIG
:
"
{{
EDXAPP_LMS_SPLIT_DOC_STORE_CONFIG
}}"
SEGMENT_KEY
:
"
{{
EDXAPP_LMS_SEGMENT_KEY
}}"
OPTIMIZELY_PROJECT_ID
:
"
{{
EDXAPP_OPTIMIZELY_PROJECT_ID
}}"
EDX_API_KEY
:
"
{{
EDXAPP_EDX_API_KEY
}}"
...
...
@@ -1264,7 +1274,11 @@ lms_env_config:
cms_auth_config
:
<<
:
*edxapp_generic_auth
SEGMENT_KEY
:
"
{{
EDXAPP_CMS_SEGMENT_KEY
}}"
CONTENTSTORE
:
<<
:
*edxapp_generic_default_contentstore
ADDITIONAL_OPTIONS
:
"
{{
EDXAPP_CONTENTSTORE_ADDITIONAL_OPTS
}}"
DOC_STORE_CONFIG
:
"
{{
EDXAPP_CMS_DOC_STORE_CONFIG
}}"
DOC_STORE_CONFIG
:
"
{{
EDXAPP_CMS_DOC_STORE_CONFIG
}}"
MODULESTORE
:
default
:
ENGINE
:
'
xmodule.modulestore.mixed.MixedModuleStore'
...
...
@@ -1285,6 +1299,7 @@ cms_auth_config:
default_class
:
'
xmodule.hidden_module.HiddenDescriptor'
fs_root
:
"
{{
edxapp_course_data_dir
}}"
render_template
:
'
edxmako.shortcuts.render_to_string'
SEGMENT_KEY
:
"
{{
EDXAPP_CMS_SEGMENT_KEY
}}"
PARSE_KEYS
:
"
{{
EDXAPP_PARSE_KEYS
}}"
cms_env_config
:
...
...
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