Plugin Settings Not Reflecting in TVM & Best Approach for Managing Multiple Open edX Versions Without TVM

Hello Open edX community,

I am currently working on a local setup with multiple versions of Open edX and using Tutor Version Manager (TVM) to manage different versions. I’ve encountered the following issues:

1: Plugin Settings Not Reflecting with TVM:

  • When I create a plugin and set some settings in TVM, I notice that the settings do not seem to save or reflect correctly. However, when I install the normal way of Tutor and create a plugin, set parameters, and enable it, it works as expected. How can I resolve this issue with TVM?

For now, I am manually adding and saving the settings in config.yml, and then it works fine.

{
    "version": "v19.0.1",
    "tutor_root": "/home/yagnesh/tvm-sumac",
    "tutor_plugins_root": "/home/yagnesh/tvm-sumac/plugins"
}

I have been following the guidance from the TVM documentation

2: Using Multiple Open edX Versions (Redwood, Quince, Sumac) Without TVM:

I want to use multiple versions like Redwood, Quince, and Sumac without relying on TVM. What is the best approach to manage these environments effectively?

As per my understanding, we can create one folder, then create virtual environments for each version, and manage them individually. However, I am concerned that mismatched dependencies or conflicts might occur when switching between versions or when working with different setups simultaneously.

1 Like

Tagging @mafermazu as she gave a lightning talk on TVM in 2023 :smiley:

Mafer any advice here?

1 Like

For the plugin settings, if your tutor plugin is a package you can install it in your tvm environment as any other python package (pip install <package> or pip install -e <path_to_your_package>, and if it is a simple file you only need to place it inside the plugins folder (tutor plugins printroot). And then enable the plugins. It is important to have your tvm env activated (source .tvm/bin/activate)

I’m not sure if that’s what you are asking. If not, and you are trying to edit the tutor_root in TVM from another plugin, I’m unsure how it works. The easy and more straightforward way to use tvm (and it is the way I use it) is with tvm project init <name of my new folder> <version of tutor> (More info: Quickstart — TVM documentation). Still, you should be able to edit the default settings with TVM as Tutor Manager — TVM documentation. But as I said, I recommended using it more as an environment manager than a tutor manager.

About using multiple Open edX versions without TVM, the magic of TVM is in the virtualenvs and setting the TUTOR_ROOT and the TUTOR_PLUGINS_ROOT in your environment variables.

I follow these steps when I want to have multiple environments without tvm. It’s not elegant, but it works:

  1. Create a folder for my project (example: mkdir sumac_project)
  2. Create a venv for my project (virtualenv venv); you can use the -p flag if you have different Python versions.
  3. Go to the venv/bin/activate file and add:
export TUTOR_ROOT=<absolute_path>/sumac_project/
export TUTOR_PLUGINS_ROOT=<absolute_path>/sumac_project/plugins
  1. Activate the venv (source venv/bin/activate)
  2. Install the tutor version you need (example: pip install tutor==v19.0.0)
  3. Run tutor config save to have everything in place.

Also, I edit the DEV_PROJECT_NAME or LOCAL_PROJECT_NAME in my config.yml, depending on what I’m running, to avoid overriding the containers (Tutor uses those variables as prefixes for the container names).

That’s it! :sparkles: You can follow these steps for each environment you need.

Here, you can find other alternatives to TVM: [PROPOSAL] We should DEPR this repo and stop giving support · Issue #80 · eduNEXT/tvm · GitHub.

I hope this helps; let me know if this solves your questions :raising_hands:

@mafermazu

I had some cache and build issues, but the TVM-related issue is now resolved.

Thank you for your response and suggestions! I will try.

Also, thanks, @sarina, for directing this to the right person related to this post.

2 Likes