Make it possible to cache programs from the lms

To do so, it is necessary to create a dedicated user.
This commit is contained in:
Régis Behmo 2019-11-22 12:47:57 +01:00
parent 7e8ca62fbb
commit 8a4da972ef
2 changed files with 18 additions and 2 deletions

View File

@ -53,3 +53,16 @@ Re-indexing courses
tutor local run discovery ./manage.py refresh_course_metadata
tutor local run discovery ./manage.py update_index --disable-change-limit
Caching programs
~~~~~~~~~~~~~~~~
In order to cache programs in the LMS, you will need to manually create a catalog integration. This step should be performed just once::
tutor local run lms ./manage.py lms create_catalog_integrations --enabled \
--internal_api_url=http://discovery:8000 \
--service_username=lms_catalog_service_user
Then::
tutor local run lms ./manage.py lms cache_programs

View File

@ -1,6 +1,9 @@
./manage.py lms --settings=tutor.production manage_user discovery discovery@{{ LMS_HOST }} --staff --superuser
export DJANGO_SETTINGS_MODULE=$SERVICE_VARIANT.envs.$SETTINGS
./manage.py lms --settings=tutor.production create_oauth2_client \
./manage.py lms manage_user discovery discovery@{{ LMS_HOST }} --staff --superuser
./manage.py lms manage_user lms_catalog_service_user lms_catalog_service_user@{{ LMS_HOST }}
./manage.py lms create_oauth2_client \
"{% if ACTIVATE_HTTPS %}https{% else %}http{% endif %}://{{ DISCOVERY_HOST }}" \
"{% if ACTIVATE_HTTPS %}https{% else %}http{% endif %}://{{ DISCOVERY_HOST }}/complete/edx-oidc/" \
confidential \