documentation
This commit is contained in:
parent
8e8472e686
commit
7b440faa28
92
README.rst
92
README.rst
@ -1,6 +1,9 @@
|
||||
credentials plugin for `Tutor <https://docs.tutor.overhang.io>`__
|
||||
===================================================================================
|
||||
|
||||
This is a plugin for `Tutor <https://docs.tutor.overhang.io>`_ that integrates the `Credentials <https://github.com/openedx/certificates/>`__ application in an Open edX platform.
|
||||
This plugin also syncs the credentials database core_user table to openedx.auth_user, so after installing you should be able to authentication with the same credentials that you use for your lms.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
@ -8,20 +11,61 @@ Installation
|
||||
|
||||
pip install git+https://github.com/lpm0073/tutor-contrib-credentials
|
||||
|
||||
This plugin requires tutor>=12.0.0, the `Discovery plugin <https://github.com/overhangio/tutor-discovery>`__ and the `MFE plugin <https://github.com/overhangio/tutor-mfe>`__. If you have installed Tutor by downloading the pre-compiled binary, then both plugins should be automatically installed. You can confirm by running::
|
||||
|
||||
::
|
||||
|
||||
tutor plugins list
|
||||
|
||||
Then, in any case you need to enable the plugins::
|
||||
|
||||
::
|
||||
|
||||
tutor plugins enable discovery mfe credentials
|
||||
|
||||
Services will have to be re-configured and restarted, so you are probably better off just running quickstart again::
|
||||
|
||||
::
|
||||
|
||||
tutor local quickstart
|
||||
|
||||
Note that this plugins is compatible with `Kubernetes integration <http://docs.tutor.overhang.io/k8s.html>`__. When deploying to a Kubernetes cluster run instead, noting that you'll need to create a public remote repository (ie AWS ECR)::
|
||||
|
||||
::
|
||||
|
||||
tutor plugins enable discovery mfe credentials
|
||||
tutor config save --set CREDENTIALS_DOCKER_IMAGE=URI_OF_YOUR_REPOSITORY
|
||||
tutor images build credentials
|
||||
tutor images push credentials
|
||||
docker tag YOUR-IMAGE-NAME YOUR-IMAGE-NAME:latest
|
||||
docker push YOUR-IMAGE-NAME:latest
|
||||
tutor k8s quickstart
|
||||
|
||||
|
||||
For further instructions on how to setup Credentials with Open edX, check the `Official Credentials documentation <https://readthedocs.org/projects/edx-credentials/>`__.
|
||||
|
||||
Configuration
|
||||
-------------
|
||||
|
||||
- ``CREDENTIALS_BACKEND_SERVICE_EDX_OAUTH2_KEY`` (default: ``"credentials-backend-service-key"``)
|
||||
- ``CREDENTIALS_BACKEND_SERVICE_EDX_OAUTH2_SECRET`` (default: ``"{{ CREDENTIALS_OAUTH2_SECRET }}"``)
|
||||
- ``CREDENTIALS_BACKEND_SERVICE_EDX_OAUTH2_PROVIDER_URL`` (default: ``"http://lms:8000/oauth2"``)
|
||||
- ``CREDENTIALS_CATALOG_API_URL`` (default: ``"{{ LMS_HOST }}"``)
|
||||
- ``CREDENTIALS_DOCKER_IMAGE`` (default: ``"{{ DOCKER_REGISTRY }}lpm0073/openedx-credentials:{{ CREDENTIALS_VERSION }}"``)
|
||||
- ``CREDENTIALS_EXTRA_PIP_REQUIREMENTS`` (default: ``[]``)
|
||||
- ``CREDENTIALS_FAVICON_URL`` (default: ``"https://edx-cdn.org/v3/default/favicon.ico"``)
|
||||
Application configuration
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
- ``CREDENTIALS_HOST`` (default: ``"credentials.{{ LMS_HOST }}"``)
|
||||
- ``CREDENTIALS_LMS_HOST`` (default: ``"myopenedxsite.com"``)
|
||||
- ``CREDENTIALS_LMS_URL_ROOT`` (default: ``"http://{{ CREDENTIALS_LMS_HOST }}"``)
|
||||
- ``CREDENTIALS_LMS_URL`` (default: ``"http://{{ CREDENTIALS_LMS_HOST }}"``)
|
||||
- ``CREDENTIALS_MYSQL_DATABASE`` (default: ``"credentials"``)
|
||||
- ``CREDENTIALS_MYSQL_USERNAME`` (default: ``"credentials"``)
|
||||
- ``CREDENTIALS_MYSQL_PASSWORD`` (default: ``"{{ 8|random_string }}"``)
|
||||
- ``CREDENTIALS_CATALOG_API_URL`` (default: ``"{{ LMS_HOST }}"``)
|
||||
- ``CREDENTIALS_DOCKER_IMAGE`` (default: ``"{{ DOCKER_REGISTRY }}lpm0073/openedx-credentials:{{ CREDENTIALS_VERSION }}"``)
|
||||
- ``CREDENTIALS_EXTRA_PIP_REQUIREMENTS`` (default: ``[]``)
|
||||
- ``CREDENTIALS_PRIVACY_POLICY_URL`` (default: ``"LMS_HOST/pricacy-policy"``)
|
||||
- ``CREDENTIALS_SECRET_KEY`` (default: ``"CHANGE-ME"``)
|
||||
- ``CREDENTIALS_SITE_NAME`` (default: ``"LMS_HOST"``)
|
||||
- ``CREDENTIALS_TOS_URL`` (default: ``"{{ LMS_HOST }}/tos"``)
|
||||
|
||||
Marketing & Theming
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
- ``CREDENTIALS_LOGO_TRADEMARK_URL`` (default: ``"https://edx-cdn.org/v3/default/logo-trademark.svg"``)
|
||||
- ``CREDENTIALS_LOGO_TRADEMARK_URL_PNG`` (default: ``"https://edx-cdn.org/v3/default/logo-trademark.png"``)
|
||||
- ``CREDENTIALS_LOGO_TRADEMARK_URL_SVG`` (default: ``"https://edx-cdn.org/v3/default/logo-trademark.svg"``)
|
||||
@ -31,43 +75,25 @@ Configuration
|
||||
- ``CREDENTIALS_LOGO_WHITE_URL`` (default: ``"https://edx-cdn.org/v3/default/logo-white.svg"``)
|
||||
- ``CREDENTIALS_LOGO_WHITE_URL_PNG`` (default: ``"https://edx-cdn.org/v3/default/logo-white.png"``)
|
||||
- ``CREDENTIALS_LOGO_WHITE_URL_SVG`` (default: ``"https://edx-cdn.org/v3/default/logo-white.svg"``)
|
||||
- ``CREDENTIALS_MYSQL_DATABASE`` (default: ``"credentials"``)
|
||||
- ``CREDENTIALS_MYSQL_USERNAME`` (default: ``"credentials"``)
|
||||
- ``CREDENTIALS_MYSQL_PASSWORD`` (default: ``"{{ 8|random_string }}"``)
|
||||
- ``CREDENTIALS_FAVICON_URL`` (default: ``"https://edx-cdn.org/v3/default/favicon.ico"``)
|
||||
- ``CREDENTIALS_THEME_NAME`` (default: ``"edx-theme"``)
|
||||
|
||||
Back end authentication
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
- ``CREDENTIALS_BACKEND_SERVICE_EDX_OAUTH2_KEY`` (default: ``"credentials-backend-service-key"``)
|
||||
- ``CREDENTIALS_BACKEND_SERVICE_EDX_OAUTH2_SECRET`` (default: ``"{{ CREDENTIALS_OAUTH2_SECRET }}"``)
|
||||
- ``CREDENTIALS_BACKEND_SERVICE_EDX_OAUTH2_PROVIDER_URL`` (default: ``"http://lms:8000/oauth2"``)
|
||||
- ``CREDENTIALS_OAUTH2_KEY`` (default: ``credentials-backend-service-key"``)
|
||||
- ``CREDENTIALS_OAUTH2_SECRET`` (default: ``"CHANGE-ME"``)
|
||||
- ``CREDENTIALS_PRIVACY_POLICY_URL`` (default: ``"LMS_HOST/pricacy-policy"``)
|
||||
- ``CREDENTIALS_SECRET_KEY`` (default: ``"CHANGE-ME"``)
|
||||
- ``CREDENTIALS_SITE_NAME`` (default: ``"LMS_HOST"``)
|
||||
- ``CREDENTIALS_SOCIAL_AUTH_REDIRECT_IS_HTTPS`` (default: ``{% if ENABLE_HTTPS %}True{% else %}False{% endif %}``)
|
||||
- ``CREDENTIALS_SOCIAL_AUTH_EDX_OAUTH2_ISSUER`` (default: ``"{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}"``)
|
||||
- ``CREDENTIALS_SOCIAL_AUTH_EDX_OAUTH2_URL_ROOT`` (default: ``"http://lms:8000"``)
|
||||
- ``CREDENTIALS_SOCIAL_AUTH_EDX_OAUTH2_KEY`` (default: ``"credentials-sso-key"``)
|
||||
- ``CREDENTIALS_SOCIAL_AUTH_EDX_OAUTH2_SECRET`` (default: ``"credentials-sso-secret"``)
|
||||
- ``CREDENTIALS_SOCIAL_AUTH_EDX_OAUTH2_LOGOUT_URL`` (default: ``"{{ SOCIAL_AUTH_EDX_OAUTH2_ISSUER }}/logout"``)
|
||||
- ``CREDENTIALS_THEME_NAME`` (default: ``"edx-theme"``)
|
||||
- ``CREDENTIALS_TOS_URL`` (default: ``"{{ LMS_HOST }}/tos"``)
|
||||
|
||||
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
::
|
||||
|
||||
# tutor local
|
||||
tutor plugins enable credentials
|
||||
|
||||
# tutor on k8s
|
||||
# you'll need to create a public remote repository (ie AWS ECR)
|
||||
# ---------------------------------------------------------------------
|
||||
tutor plugins enable credentials
|
||||
tutor config save --set CREDENTIALS_DOCKER_IMAGE=URI_OF_YOUR_REPOSITORY
|
||||
tutor images build credentials
|
||||
tutor images push credentials
|
||||
docker tag YOUR-IMAGE-NAME YOUR-IMAGE-NAME:latest
|
||||
docker push YOUR-IMAGE-NAME:latest
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user