Skip to content

feat: virtual environment support for instances

Keith Grootboom requested to merge keith/virtual-environments into main

Description

Adds virtual environment support to instances. Instead of tutor being installed globally, it is now installed per instance via a requirements.txt file.

Three new Grove commands are added:

  • grove venv update [instance-name]
  • grove venv reset [instance-name]
  • grove venv shell [instance-name]

Supporting information

Discovery: https://grove.opencraft.com/discoveries/0011-instance-venvs/

Testing instructions

Steps to test the changes:

  1. Check the below pipelines to verify that pipelines still work:
  1. For your local Grove instance add a instances/[instance-name]/requirements.txt with the content:
    tutor==14.2.2
    tutor-discovery==14.0.1
    tutor-ecommerce==14.0.0
    tutor-mfe==14.0.1
    tutor-xqueue==14.0.0
    git+https://github.com/open-craft/tutor-forum.git@keith/checklist-fixes # update to version code once released
    git+https://gitlab.com/opencraft/dev/tutor-contrib-grove.git@keith/update-forum-plugin
    git+https://github.com/hastexo/tutor-contrib-s3.git@v1.0.0
    And run ./grove venv update. Verify that the virtual environment is created in the instances/[instance-name]/.venv directory.
  2. Check that the other commands work:
  • ./grove venv reset [instance-name]
  • ./grove venv shell [instance-name]

Checklist

If any of the items below is not applicable, do not remove them, but put a check in it.

  • All providers include the new feature/change
  • All affected providers can provision new clusters
  • Unit tests are added/updated
  • Documentation is added/updated
  • The TOOLS_CONTAINER_IMAGE_VERSION in ci_vars.yml is updated
  • The grove-template repository is updated
Edited by Keith Grootboom

Merge request reports