Using plugins

Plugins allow a developer to customize the deployment of Open edX easily.

Using Existing Plugins

Tutor comes with pluging that are disabled by default. View the list using tutor plugins list

user@edx:~$ tutor plugins list
android==12.0.0 (disabled)
discovery==12.0.1 (disabled)
ecommerce==12.0.0 (disabled)
license==12.0.1 (disabled)
mfe==12.0.1 (disabled)
minio==12.0.1 (disabled)
notes==12.0.0 (disabled)
webui==12.0.0 (disabled)
xqueue==12.0.0 (disabled)
third-party-auth==1.0.0
ektu_settings==1.0.0
user@edx:~$

You can easily enable any listed plugin in a few simple steps. Let's use notes as an example.

  1. Enable the plugin using tutor plugins enable <plugin_name>.

    tutor plugins enable notes
  2. Next, save the configuration.

    tutor config save
  3. Lastly, run quickstart.

    tutor local quickstart

Output

user@edx:~$
user@edx:~$ tutor plugins list
android==12.0.0 (disabled)
discovery==12.0.1 (disabled)
ecommerce==12.0.0 (disabled)
license==12.0.1 (disabled)
mfe==12.0.1 (disabled)
minio==12.0.1 (disabled)
notes==12.0.0 (disabled)
webui==12.0.0 (disabled)
xqueue==12.0.0 (disabled)
third-party-auth==1.0.0
ektu_settings==1.0.0
user@edx:~$ tutor plugins enable notes
Plugin notes enabled
Configuration saved to /home/user/.local/share/tutor/config.yml
You should now re-generate your environment with `tutor config save`.
user@edx:~$ tutor config save
Configuration saved to /home/user/.local/share/tutor/config.yml
Environment generated in /home/user/.local/share/tutor/env
user@edx:~$
user@edx:~$ tutor local quickstart
==================================================
        Interactive platform configuration
==================================================
Are you configuring a production platform? Type 'n' if you are just testing Tutor on your local computer [Y/n]
...

Creating a New Plugin

Sometimes using custom plugins can make managing Open edX eaiser or provides additional configuration.

  1. To find the location of the plugins root directory.

    tutor plugins printroot
  2. If the given directory has not been created yet, create it.

    mkdir "$(tutor plugins printroot)"

Here are the steps to create a plugin that sets the upload limit to 25MB.

  1. First, open a text editor specifying the name of the plugin file.

    nano $(tutor plugins printroot)/upload_size.yml

    YAML plugins must define two additional keys: "name" and "version".

  2. Next, add the plugin contents.

    name: upload_size
    version: 1.0.0
    patches:
      openedx-cms-production-settings: |
        MAX_ASSET_UPLOAD_FILE_SIZE_IN_MB = 25
      openedx-cms-development-settings: |
        MAX_ASSET_UPLOAD_FILE_SIZE_IN_MB = 25
  3. You can verify that your plugin is correctly installed, but not enabled yet:

    tutor plugins list

    Example output of the command tutor plugins list

    android==12.0.0 (disabled)
    discovery==12.0.1 (disabled)
    ecommerce==12.0.0 (disabled)
    license==12.0.1 (disabled)
    mfe==12.0.1 (disabled)
    minio==12.0.1 (disabled)
    notes==12.0.0
    webui==12.0.0 (disabled)
    xqueue==12.0.0 (disabled)
    upload_size==1.0.0 (disabled)
    custom-settings==1.0.0
  4. Then, you can enable your newly created plugin:

    tutor plugins enable upload_size
  5. Update your environment to apply the changes from your plugin:

    tutor config save
  6. Now, just restart your platform to set your upload limit.

    tutor local quickstart