11Codejail plugin for `Tutor `_
22============================
33
4- Tutor plugin that configures and runs a `Codejail Service `_ using a REST API. `Codejail `_ allows for the
5- secure execution of untrusted code within sandboxes, providing a safe environment for running potentially dangerous code.
4+ Tutor plugin that configures and runs a `Codejail Service `_ using a REST API.
5+ `Codejail `_ allows for the secure execution of untrusted code within sandboxes,
6+ providing a safe environment for running potentially dangerous code.
7+
8+ Starting from the Ulmo release, the codejail plugin is transitioning to an
9+ alternative implementation of the safe-exec API ( `_Codejail Service V2 `_).
10+ You can opt-in to use this new implementation on Ulmo before it finally becomes
11+ the default on the Verawood release.
612
713.. _Tutor : https://docs.tutor.overhang.io
814.. _Codejail Service : https://github.com/eduNEXT/codejailservice
15+ .. _Codejail Service V2 : https://github.com/openedx/codejail-service
916.. _Codejail : https://github.com/openedx/codejail
1017
1118Installation
@@ -23,9 +30,9 @@ You can install a specific version by adding the tag, branch, or commit:
2330
2431.. code-block :: bash
2532
26- pip install tutor-contrib-codejail==v20.0 .0
33+ pip install tutor-contrib-codejail~=21 .0
2734 # or install from the source
28- pip install git+https://github.com/edunext/tutor-contrib-codejail@v20 .0.0
35+ pip install git+https://github.com/edunext/tutor-contrib-codejail@v21 .0.0
2936
3037 Usage
3138-----
@@ -55,14 +62,26 @@ Configuration
5562To customize the configuration, update the following settings in Tutor:
5663
5764- ``CODEJAIL_APPARMOR_DOCKER_IMAGE ``: (default: ``docker.io/ednxops/codejail_apparmor_loader:latest ``)
65+ - ``CODEJAIL_DOCKER_IMAGE_V2 `` : (default: ``{{ CODEJAIL_DOCKER_IMAGE }}-v2 ``)
5866- ``CODEJAIL_DOCKER_IMAGE ``: (default: ``docker.io/ednxops/codejailservice:{{__version__}} ``)
5967- ``CODEJAIL_ENABLE_K8S_DAEMONSET `` (default: ``False ``)
6068- ``CODEJAIL_ENFORCE_APPARMOR `` (default: ``True ``)
6169- ``CODEJAIL_EXTRA_PIP_REQUIREMENTS `` (default: ``[] ``)
6270- ``CODEJAIL_SANDBOX_PYTHON_VERSION `` (default: ``3.11.9 ``)
63- - ``CODEJAIL_SERVICE_REPOSITORY `` (default ``https://github.com/edunext/codejailservice.git` ``)
64- - ``CODEJAIL_SERVICE_VERSION `` (default: ``release/teak.1 ``),
71+ - ``CODEJAIL_SERVICE_REPOSITORY `` (default: ``https://github.com/edunext/codejailservice.git` ``)
72+ - ``CODEJAIL_SERVICE_VERSION `` (default: ``{{ OPENEDX_COMMON_VERSION }} ``),
6573- ``CODEJAIL_SKIP_INIT `` (default: ``False ``)
74+ - ``SERVICE_V2_REPOSITORY ``: (default: ``https://github.com/openedx/codejail-service.git ``)
75+ - ``SERVICE_V2_VERSION ``: (default: ``{{ OPENEDX_COMMON_VERSION }} ``)
76+ - ``USE_SERVICE_V2 ``: (default: ``False ``)
77+
78+ The ``CODEJAIL_V2_* `` settings are meant to be used only during the Ulmo
79+ release and will be phased-out during the Verawood release.
80+
81+ To opt-in to the new implementation of the code-exec API set ``USE_SERVICE_V2 ``
82+ to ``True `` and re-deploy your environment. If you are using a a custom image
83+ for the codejail service you will need to rebuild it with ``USE_SERVICE_V2 ``
84+ set to ``True`.
6685
6786Custom Image
6887~~~~~~~~~~~~
0 commit comments