open-craft / custom-form-app

An example app that can be used as a template for extending the registration form in the OpenEdx LMS.
16 stars 49 forks source link

Production setup #4

Closed danielmcquillen closed 7 years ago

danielmcquillen commented 7 years ago

Thanks for this really helpful example, @bradenmacdonald and @Kelketek

Is there a way of setting up Ansible files to automate setup so the manual part of the process doesn't need to be repeated when spinning up new edxapp instances in the future?

I can add the git repo to EDXAPP_EXTRA_REQUIREMENTS, but that doesn't actually add the app to INSTALLED_APPS.

I don't see a direct way to do this in my fork of configuration, so I would think the way to automate this would be to update my edx-platform fork directly, updating the common.py file for the lms so that OPTIONAL_APPS array includes the string 'custom_form_app'.

To automate adding writing REGISTRATION_EXTENSION_FORM to lms.env.json, I think I can just add it to EDXAPP_ENV_EXTRA in my server-vars.yml

EDXAPP_ENV_EXTRA:
  REGISTRATION_EXTENSION_FORM: "custom_reg_form.forms.ExtraInfoForm"

Thanks for any thoughts.

bradenmacdonald commented 7 years ago

@danielmcquillen Yes, you can use the EDXAPP_ENV_EXTRA to add arbitrary extra settings to lms.env.json using ansible, such as REGISTRATION_EXTENSION_FORM.

And yes, AFAIK, you'll need to modify the code to make INSTALLED_APPS or OPTIONAL_APPS configurable - that would be a nice contribution.