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
5b3465b6
Commit
5b3465b6
authored
Dec 13, 2017
by
Joseph Mulloy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jill/edxapp-mongo-replica-set' into jill_merge
parents
f0b6c224
e3e0fafc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
29 deletions
+65
-29
CHANGELOG.md
+16
-7
playbooks/roles/edxapp/defaults/main.yml
+49
-22
No files found.
CHANGELOG.md
View file @
5b3465b6
...
...
@@ -30,14 +30,23 @@
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.
Note that setting
`EDXAPP_MONGO_REPLICA_SET`
requires
`EDXAPP_MONGO_HOSTS`
to be a comma-delimited string listing the host names, not an array.
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 @
5b3465b6
...
...
@@ -67,14 +67,18 @@ 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
EDXAPP_MONGO_HOSTS
:
'
localhost'
EDXAPP_MONGO_HOSTS
:
[
'
localhost'
]
EDXAPP_MONGO_PASSWORD
:
'
password'
EDXAPP_MONGO_PORT
:
27017
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'
...
...
@@ -466,7 +470,6 @@ EDXAPP_VERIFY_STUDENT:
EXPIRING_SOON_WINDOW
:
28
EDXAPP_GOOGLE_ANALYTICS_LINKEDIN
:
"
"
EDXAPP_GOOGLE_ANALYTICS_TRACKING_ID
:
"
"
EDXAPP_CONTENTSTORE_ADDITIONAL_OPTS
:
{}
EDXAPP_BULK_EMAIL_EMAILS_PER_TASK
:
500
# If using microsites this should point to the microsite repo
EDXAPP_MICROSITE_ROOT_DIR
:
"
{{
edxapp_app_dir
}}/edx-microsite"
...
...
@@ -855,6 +858,20 @@ 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
}}"
...
...
@@ -868,17 +885,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 +953,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
}}"
...
...
@@ -1171,6 +1175,17 @@ generic_env_config: &edxapp_generic_env
lms_auth_config
:
<<
:
*edxapp_generic_auth
CONTENTSTORE
:
<<
:
*edxapp_generic_default_contentstore
ADDITIONAL_OPTIONS
:
default
:
replicaSet
:
"
{{
EDXAPP_MONGO_REPLICA_SET
}}"
read_preference
:
"
{{
EDXAPP_MONGO_LMS_READ_PREFERENCE
}}"
trashcan
:
replicaSet
:
"
{{
EDXAPP_MONGO_REPLICA_SET
}}"
read_preference
:
"
{{
EDXAPP_MONGO_LMS_READ_PREFERENCE
}}"
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
}}"
...
...
@@ -1263,7 +1278,18 @@ lms_env_config:
cms_auth_config
:
<<
:
*edxapp_generic_auth
SEGMENT_KEY
:
"
{{
EDXAPP_CMS_SEGMENT_KEY
}}"
CONTENTSTORE
:
<<
:
*edxapp_generic_default_contentstore
ADDITIONAL_OPTIONS
:
default
:
replicaSet
:
"
{{
EDXAPP_MONGO_REPLICA_SET
}}"
read_preference
:
"
{{
EDXAPP_MONGO_CMS_READ_PREFERENCE
}}"
trashcan
:
replicaSet
:
"
{{
EDXAPP_MONGO_REPLICA_SET
}}"
read_preference
:
"
{{
EDXAPP_MONGO_CMS_READ_PREFERENCE
}}"
DOC_STORE_CONFIG
:
"
{{
EDXAPP_CMS_DOC_STORE_CONFIG
}}"
DOC_STORE_CONFIG
:
"
{{
EDXAPP_CMS_DOC_STORE_CONFIG
}}"
DOC_STORE_CONFIG
:
"
{{
EDXAPP_CMS_DOC_STORE_CONFIG
}}"
MODULESTORE
:
default
:
ENGINE
:
'
xmodule.modulestore.mixed.MixedModuleStore'
...
...
@@ -1284,6 +1310,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