aulasneo / openedx-webhooks

Webhooks for Open edX signals
GNU Affero General Public License v3.0
0 stars 0 forks source link

plugin installation in openEdx installed by tutor(Maple) #1

Closed pravallikan-ts closed 2 months ago

pravallikan-ts commented 2 months ago

I am trying to add openedx-webhooks plugin to my openEdx app which is installed by tutor. I followed the methods i mentioned below however, I can't find the a section related to this on admin panel. Neither can I find it in tutor plugins list, I don't think it was successfully installed and I also doubt if the steps I followed are enough or if I am missing anything. Please do help, thanks in advance!

THINGS I TRIED:

Method 1:

  1. ADD
    OPENEDX_EXTRA_PIP_REQUIREMENTS:
    - openedx-webhooks

    in config.yml

  2. tutor images build all --no-cache - rebuild images
  3. tutor local start -d

Method 2:

  1. ADD
    OPENEDX_EXTRA_PIP_REQUIREMENTS:
    - git+https://github.com/aulasneo/openedx-webhooks.git

    in config.yml

  2. tutor images build all --no-cache - rebuild images
  3. tutor local start -d

Method 3:

  1. ADD
    OPENEDX_EXTRA_PIP_REQUIREMENTS:
    - openedx-webhooks

    in config.yml

  2. tutor images build all --no-cache - rebuild images
  3. pip install openedx-webhooks
  4. tutor plugins enable openedx-webhooks

Method 4:

  1. ADD
    OPENEDX_EXTRA_PIP_REQUIREMENTS:
    - git+https://github.com/aulasneo/openedx-webhooks.git

    in config.yml

  2. tutor images build all --no-cache - rebuild images
  3. pip install openedx-webhooks
  4. tutor plugins enable openedx-webhooks (Error: plugin 'openedx-webhooks' is not installed)
angonz commented 2 months ago

Hi @pravallikan-ts! Method 1 should work. Only tutor images build lms will be needed and you can use the build cache to reduce time. Remember to run LMS migrations with tutor {dev|local|k8s} exec lms ./manage.py lms migrate to apply the changes. Then you should be able to see the Openedx Webhooks section in the Django admin panel, or directly in https:///admin/openedx_webhooks/.

Please let me know if this works.

pravallikan-ts commented 2 months ago

@angonz, thanks for the reply, let me try whatever you suggested and get back to you in a day.

pravallikan-ts commented 2 months ago

@angonz I have a quick question, why are we not installing this via

PLUGINS: 
- openedx-webhooks

why should this be installed as "OPENEDX_EXTRA_PIP_REQUIREMENTS" unlike other plugins?

angonz commented 2 months ago

Hi @pravallikan-ts, It's because it is an Open edX plugin (Django app), not a Tutor plugin. I know it might sound confusing, but they are completely different.

pravallikan-ts commented 2 months ago

okay got it. thanks. I tried to apply migrations but lms_worker and cms_worker keep restarting after this.

pravallikan-ts commented 2 months ago

I tried to check what the issue is using the following command: docker logs tutor_local_lms-worker_1 it is:

 AttributeError: 'Settings' object has no attribute 'SAML_IDP_SPCONFIG'

During handling of the above exception, another exception occurred:
.....
.....
.....

raise ImproperlyConfigured("SAML_IDP_SPCONFIG not defined in settings.")
django.core.exceptions.ImproperlyConfigured: SAML_IDP_SPCONFIG not defined in settings.
angonz commented 2 months ago

Strange... as we don't use this setting at all.

pravallikan-ts commented 2 months ago

yes, I think some previous unmigrated changes are getting included in this migration, now, due this error both my worker nodes are left in "Restarting(1)" status always. I tried to remove the SAML code and rebuild images but the issue persists. How can I unblock myself?

angonz commented 2 months ago

Well... Open edX is complex and it's not unusual to get stuck once we start making changes to the default. I'll close this issue as it doesn't seem to be related to this module. You can use the forum to continue the discussion. If you have other problems with this repo feel free to open a new issue.

pravallikan-ts commented 2 months ago

okay.