Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. In order for the edx_notes_api application to authenticate against the LMS, an oauth client configuration will need to be created in your LMS.  This can be done from the Django admin application as a superuser.  The admin application is hosted at https://lms.example.com/admin.  The client details need to be available to the notes application   Note that in this document, the hostname lms.example.com will be used, but this value will need to be replaced with the appropriate value for your environment.

    On the admin page, to go "Oath2" and click "Add" by "Clients". Fill out the following fields (after looking up your user ID). Note: leave the ID field blank.

    Key 
    nameedx-notes
    urlhttps:/notes.example.com/
    redirect urlhttps://notes.example.com/complete/edx-oidc/
    client idedx_notes_id
    client secretedx_notes_secret
    client type

    confidential (web application)

    The values provided here correspond to the values in the playbooks/roles/edx_notes_api/defaults/main.yml.  You can change these values to whatever you wish as long as the values in the role defaults are also overridden.

  2. You will have to use master of the configuration repository to pull in some changes related to installing notes, so fetch the latest of https://github.com/edx/configuration and change to the master branch. Here is the command (details):

    Code Block
    sudo /edx/bin/update edx-platform master



  3. Install the database user for the edx_notes_api.  Notes needs to connect to a mysql database and an elasticsearch instance.  Review all the ALL CAPS variables defined in https://github.com/edx/configuration/blob/master/playbooks/roles/edx_notes_api/defaults/main.yml to understand what you need to override. 

    First, you will need to activate the venv (Python virtual environment) for ansible.

    Code Block
    source /edx/app/edx_ansible/venvs/edx_ansible/bin/activate


    Assuming that you have a local checkout of the edx configuration repository, you can create the required database users by running

    Code Block
    ansible-playbook -c local  -i 'localhost,' ./run_role.yml -e 'role=edxlocal' -e@roles/edx_notes_api/defaults/main.yml
  4. Create a file for your ansible overrides ~/ansible-overrides.yml with at least the following values

    Code Block
    EDX_NOTES_API_ALLOWED_HOSTS:
      - localhost
      - lms.example.com
  5. Enable this feature flag in EDXAPP_FEATURES:

    Code Block
    ENABLE_EDXNOTES: true
  6. You will need to override the value of EDXNOTES_INTERFACE for your installation.   This currently isn't handled by ansible, but will be.  The recommendation is to add the following to your lms/envs/aws.py

    Code Block
    EDXNOTES_INTERFACE = {
        'url': 'http://lms.example.com:18120/api/v1',
    }
  7. Install the edx-notes-api using ansible

    Code Block
    ansible-playbook -c local  -i 'localhost,' ./notes.yml -e@/edx/app/edx_ansible/server-vars.yml

    When the installation has completed verify that the notes api is healthy by running

    Code Block
    sudo /edx/bin/supervisorctl status edx_notes_api
    edx_notes_api                    RUNNING   pid 13630, uptime 11:42:01
  8. In order to enable the notes application in the LMS and CMS you will have to set the ENABLE_EDXNOTES feature flag to true in both lms.env.json and cms.env.json and restart both the LMS and CMS.

    Code Block
    sudo /edx/bin/supervisorctl restart edxapp:*
  9. After the feature has been enabled, an advanced setting in Studio must also be enabled on a per course basis.  From the advanced settings tab for your course, set 
    Enable Student Notes to true.  If you don't see that advanced setting, review the changes from step 7 and ensure you have restarted your LMS and CMS
  10. Navigate to the courseware for any course with edX Notes enabled.  From the courseware you should be able to highlight text and add notes.  If there are errors, check both the LMS logs, /edx/var/log/lms/edx.log, and the edx_notes_api logs, /edx/var/log/supervisor/edx_notes_apitderr.log.

...