Skip to content

Commit

Permalink
feat: add support for nutmeg release
Browse files Browse the repository at this point in the history
* Bump version 13.x to 14.x
* Bump Python to 3.8 in sandbox environment
* Add support for python 3.8 in the apparmor profile
  • Loading branch information
mariajgrimaldi committed May 30, 2022
1 parent c9d0027 commit b5dff67
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 14 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ Change Log
Unreleased
~~~~~~~~~~

[14.0.0] - 2022-05-30
~~~~~~~~~~~~~~~~~~~~

Added
_____

* Bump version according tutor practices for Nutmeg release.

[13.0.0] - 2022-05-02
~~~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 2 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Compatibility
+-------------------+----------------+
| Maple | >= 13.x |
+-------------------+----------------+
| Nutmeg | >= 14.x |
+-------------------+----------------+

**NOTE**: For the Open edx version of the Lilac release, the changes required for the Codejail service to interact with ``edx-platform`` are
not included in ``open-release/lilac.master``. In order to use the service with the changes, please review `this PR`_.
Expand Down
2 changes: 1 addition & 1 deletion tutorcodejail/__about__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""Helps you keep your cool when creating dozens of open edX and eduNEXT environments."""
__version__ = "13.0.0"
__version__ = "14.0.0"
2 changes: 1 addition & 1 deletion tutorcodejail/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"VERSION": __version__,
"HOST": "codejailservice",
"DOCKER_IMAGE": f"docker.io/ednxops/codejailservice:{__version__}",
"SANDBOX_PYTHON_VERSION": "3.5.10",
"SANDBOX_PYTHON_VERSION": "3.8.6",
},
"set": {},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,23 @@ profile docker-edx-sandbox flags=(attach_disconnected,mediate_deleted) {
#
# Python abstractions adapted from https://gitlab.com/apparmor/apparmor/-/raw/master/profiles/apparmor.d/abstractions/python
#
/opt/pyenv/versions/{2.[4-7].*,3.[0-9].*}/lib/python{2.[4-7],3.[0-9]}/**.{pyc,so} mr,
/opt/pyenv/versions/{2.[4-7].*,3.[0-9].*}/lib/python{2.[4-7],3.[0-9]}/**.{egg,py,pth} r,
/opt/pyenv/versions/{2.[4-7].*,3.[0-9].*}/lib/python{2.[4-7],3.[0-9]}/{site,dist}-packages/ r,
/opt/pyenv/versions/3.[0-9].*/lib/python3.[0-9]/**.{pyc,so} mr,
/opt/pyenv/versions/3.[0-9].*/lib/python3.[0-9]/**.{egg,py,pth} r,
/opt/pyenv/versions/3.[0-9].*/lib/python3.[0-9]/site-packages/ r,
/opt/pyenv/versions/3.[0-9].*/lib/python3.[0-9]/lib-dynload/*.so mr,

/opt/pyenv/versions/{2.[4-7].*,3.[0-9].*}/include/python{2.[4-7],3.[0-9]}*/pyconfig.h r,
/opt/pyenv/versions/3.[0-9].*/include/python3.[0-9]*/pyconfig.h r,


#
# Whitelist particiclar shared objects from the system
# python installation
#
/sandbox/venv/** mr,
/opt/pyenv/versions/3.5.10/** mr,
/opt/pyenv/versions/{{ CODEJAIL_SANDBOX_PYTHON_VERSION }}_sandbox/** mr,
/tmp/codejail-*/ rix,
/tmp/codejail-*/** wrix,

#
# Whitelist particular shared objects from the system
# python installation
Expand Down
12 changes: 6 additions & 6 deletions tutorcodejail/templates/codejail/build/codejail/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ ARG CODEJAILSERVICE_PYTHON_VERSION=3.8.6
RUN $PYENV_ROOT/bin/pyenv install $CODEJAILSERVICE_PYTHON_VERSION

ARG SANDBOX_PYTHON_VERSION={{ CODEJAIL_SANDBOX_PYTHON_VERSION }}
RUN $PYENV_ROOT/bin/pyenv install $SANDBOX_PYTHON_VERSION
RUN git clone https://github.com/s1341/pyenv-alias.git $PYENV_ROOT/plugins/pyenv-alias
RUN VERSION_ALIAS={{ CODEJAIL_SANDBOX_PYTHON_VERSION }}_sandbox $PYENV_ROOT/bin/pyenv install $SANDBOX_PYTHON_VERSION

RUN $PYENV_ROOT/versions/$CODEJAILSERVICE_PYTHON_VERSION/bin/python -m venv /openedx/venv
RUN $PYENV_ROOT/versions/$SANDBOX_PYTHON_VERSION/bin/python -m venv --copies /sandbox/venv
RUN $PYENV_ROOT/versions/"$SANDBOX_PYTHON_VERSION"_sandbox/bin/python -m venv --copies /sandbox/venv

###### Codejail service code
FROM minimal as code
Expand All @@ -39,7 +40,7 @@ ENV VIRTUAL_ENV /openedx/venv/
COPY --from=code /openedx/codejailservice /openedx/codejailservice
WORKDIR /openedx/codejailservice
RUN pip3 install -r requirements/base.txt
RUN pip3 install uwsgi==2.0.19.1
RUN pip3 install uwsgi==2.0.20

###### Install python requirements in virtualenv
FROM python as sandbox-python-requirements
Expand All @@ -51,9 +52,8 @@ WORKDIR /var/tmp
RUN mkdir -p common/lib/

COPY --from={{ DOCKER_IMAGE_OPENEDX }} /openedx/edx-platform/common/lib/sandbox-packages common/lib/sandbox-packages
COPY --from={{ DOCKER_IMAGE_OPENEDX }} /openedx/edx-platform/common/lib/symmath common/lib/symmath
COPY --from={{ DOCKER_IMAGE_OPENEDX }} /openedx/edx-platform/requirements/edx-sandbox/py35.txt py35.txt
RUN pip3 install -r py35.txt
COPY --from={{ DOCKER_IMAGE_OPENEDX }} /openedx/edx-platform/requirements/edx-sandbox/py38.txt py38.txt
RUN pip3 install -r py38.txt

##### Prod image
FROM minimal as production
Expand Down

0 comments on commit b5dff67

Please sign in to comment.