Commit 80ca3cfa by Joseph Mulloy

Add read preference for module store OPS-2440

parent eda2f139
- 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.
- Role: nginx
- Modified `lms.j2` , `cms.j2` , `credentials.j2` , `edx_notes_api.j2` and `insights.j2` to enable HTTP Strict Transport Security
- Added `NGINX_HSTS_MAX_AGE` to make HSTS header `max_age` value configurable and used in templates
- Role: server_utils
- Install "vim", not "vim-tiny".
......
......@@ -65,12 +65,16 @@ EDXAPP_XQUEUE_DJANGO_AUTH:
password: 'password'
EDXAPP_XQUEUE_URL: 'http://localhost:18040'
EDXAPP_MONGO_HOSTS: ['localhost']
# 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_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'
EDXAPP_MYSQL_DB_NAME: 'edxapp'
EDXAPP_MYSQL_USER: 'edxapp001'
......@@ -863,6 +867,8 @@ EDXAPP_LMS_DRAFT_DOC_STORE_CONFIG:
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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment