feat: virtual environment support for instances
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:
- Check the below pipelines to verify that pipelines still work:
- https://gitlab.com/opencraft/devstacks/keith/grove-do/-/pipelines/727779052
- https://gitlab.com/opencraft/devstacks/keith/grove-do/-/pipelines/727759110
- 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
./grove venv update
. Verify that the virtual environment is created in theinstances/[instance-name]/.venv
directory. - 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