mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-13 14:43:03 +00:00
Merge remote-tracking branch 'origin/master' into nightly
This commit is contained in:
commit
a0480f8d11
1
changelog.d/20221128_100809_regis_mongodb_ssl.md
Normal file
1
changelog.d/20221128_100809_regis_mongodb_ssl.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
- [Feature] Add support for MongoDB SSL, authentication source, mechanism and replica set via the `MONGODB_USE_SSL`, `MONGODB_AUTH_MECHANISM`, `MONGODB_AUTH_SOURCE`, `MONGODB_REPLICA_SET` settings. (by @zakum1 and @regisb)
|
@ -242,11 +242,17 @@ MongoDB
|
|||||||
*******
|
*******
|
||||||
|
|
||||||
- ``RUN_MONGODB`` (default: ``true``)
|
- ``RUN_MONGODB`` (default: ``true``)
|
||||||
- ``MONGODB_HOST`` (default: ``"mongodb"``)
|
|
||||||
- ``MONGODB_DATABASE`` (default: ``"openedx"``)
|
- ``MONGODB_DATABASE`` (default: ``"openedx"``)
|
||||||
|
- ``MONGODB_HOST`` (default: ``"mongodb"``)
|
||||||
|
- ``MONGODB_PASSWORD`` (default: ``""``)
|
||||||
- ``MONGODB_PORT`` (default: ``27017``)
|
- ``MONGODB_PORT`` (default: ``27017``)
|
||||||
- ``MONGODB_USERNAME`` (default: ``""``)
|
- ``MONGODB_USERNAME`` (default: ``""``)
|
||||||
- ``MONGODB_PASSWORD`` (default: ``""``)
|
- ``MONGODB_USE_SSL`` (default: ``false``)
|
||||||
|
- ``MONGODB_REPLICA_SET`` (default: ``""``)
|
||||||
|
- ``MONGODB_AUTH_MECHANISM`` (default: ``""``)
|
||||||
|
- ``MONGODB_AUTH_SOURCE`` (default: ``"admin"``)
|
||||||
|
|
||||||
|
Note that most of these settings will have to be modified to connect to a MongoDB cluster that runs separately of Tutor, such as `Atlas <https://www.mongodb.com/atlas>`__. In particular, the authentication source, mechanism and the SSL connection parameters should not be specified as part of the `host URI <https://www.mongodb.com/docs/manual/reference/connection-string/>`__ but as separate Tutor settings. Supported values for ``MONGODB_AUTH_MECHANISM`` are the same as for pymongo (see the `pymongo documentation <https://pymongo.readthedocs.io/en/stable/examples/authentication.html>`__).
|
||||||
|
|
||||||
Redis
|
Redis
|
||||||
*****
|
*****
|
||||||
|
@ -6,17 +6,16 @@ from xmodule.modulestore.modulestore_settings import update_module_store_setting
|
|||||||
|
|
||||||
# Mongodb connection parameters: simply modify `mongodb_parameters` to affect all connections to MongoDb.
|
# Mongodb connection parameters: simply modify `mongodb_parameters` to affect all connections to MongoDb.
|
||||||
mongodb_parameters = {
|
mongodb_parameters = {
|
||||||
|
"db": "{{ MONGODB_DATABASE }}",
|
||||||
"host": "{{ MONGODB_HOST }}",
|
"host": "{{ MONGODB_HOST }}",
|
||||||
"port": {{ MONGODB_PORT }},
|
"port": {{ MONGODB_PORT }},
|
||||||
{% if MONGODB_USERNAME and MONGODB_PASSWORD %}
|
"user": {% if MONGODB_USERNAME %}"{{ MONGODB_USERNAME }}"{% else %}None{% endif %},
|
||||||
"user": "{{ MONGODB_USERNAME }}",
|
"password": {% if MONGODB_PASSWORD %}"{{ MONGODB_PASSWORD }}"{% else %}None{% endif %},
|
||||||
"password": "{{ MONGODB_PASSWORD }}",
|
# Connection/Authentication
|
||||||
{% else %}
|
"ssl": {{ MONGODB_USE_SSL }},
|
||||||
"user": None,
|
"authSource": "{{ MONGODB_AUTH_SOURCE }}",
|
||||||
"password": None,
|
"replicaSet": {% if MONGODB_REPLICA_SET %}"{{ MONGODB_REPLICA_SET }}"{% else %}None{% endif %},
|
||||||
{% endif %}
|
{% if MONGODB_AUTH_MECHANISM %}"authMechanism": "{{ MONGODB_AUTH_MECHANISM }}",{% endif %}
|
||||||
"db": "{{ MONGODB_DATABASE }}",
|
|
||||||
"replicaSet": None,
|
|
||||||
}
|
}
|
||||||
DOC_STORE_CONFIG = mongodb_parameters
|
DOC_STORE_CONFIG = mongodb_parameters
|
||||||
CONTENTSTORE = {
|
CONTENTSTORE = {
|
||||||
|
@ -34,11 +34,15 @@ K8S_NAMESPACE: "openedx"
|
|||||||
LANGUAGE_CODE: "en"
|
LANGUAGE_CODE: "en"
|
||||||
LMS_HOST: "www.myopenedx.com"
|
LMS_HOST: "www.myopenedx.com"
|
||||||
LOCAL_PROJECT_NAME: "{{ TUTOR_APP }}_local"
|
LOCAL_PROJECT_NAME: "{{ TUTOR_APP }}_local"
|
||||||
|
MONGODB_AUTH_MECHANISM: ""
|
||||||
|
MONGODB_AUTH_SOURCE: "admin"
|
||||||
MONGODB_HOST: "mongodb"
|
MONGODB_HOST: "mongodb"
|
||||||
MONGODB_DATABASE: "openedx"
|
MONGODB_DATABASE: "openedx"
|
||||||
MONGODB_PORT: 27017
|
MONGODB_PORT: 27017
|
||||||
MONGODB_USERNAME: ""
|
MONGODB_USERNAME: ""
|
||||||
MONGODB_PASSWORD: ""
|
MONGODB_PASSWORD: ""
|
||||||
|
MONGODB_REPLICA_SET: ""
|
||||||
|
MONGODB_USE_SSL: false
|
||||||
OPENEDX_AWS_ACCESS_KEY: ""
|
OPENEDX_AWS_ACCESS_KEY: ""
|
||||||
OPENEDX_AWS_SECRET_ACCESS_KEY: ""
|
OPENEDX_AWS_SECRET_ACCESS_KEY: ""
|
||||||
OPENEDX_CACHE_REDIS_DB: 1
|
OPENEDX_CACHE_REDIS_DB: 1
|
||||||
|
Loading…
Reference in New Issue
Block a user