feat: upgrade to Maple
This commit is contained in:
parent
7dce20044c
commit
29218141d7
@ -2,7 +2,7 @@ variables:
|
|||||||
TUTOR_PLUGIN: notes
|
TUTOR_PLUGIN: notes
|
||||||
TUTOR_IMAGES: notes
|
TUTOR_IMAGES: notes
|
||||||
TUTOR_PYPI_PACKAGE: tutor-notes
|
TUTOR_PYPI_PACKAGE: tutor-notes
|
||||||
OPENEDX_RELEASE: lilac
|
OPENEDX_RELEASE: maple
|
||||||
GITHUB_REPO: overhangio/tutor-notes
|
GITHUB_REPO: overhangio/tutor-notes
|
||||||
|
|
||||||
include:
|
include:
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
Students notes plugin for `Tutor <https://docs.tutor.overhang.io>`_
|
Students notes plugin for `Tutor <https://docs.tutor.overhang.io>`_
|
||||||
===================================================================
|
===================================================================
|
||||||
|
|
||||||
This is a plugin for `Tutor <https://docs.tutor.overhang.io>`_ to easily add the `Open edX note-taking app <https://github.com/edx/edx-notes-api>`_ to an Open edX platform. This app allows students to annotate portions of the courseware (see `the official documentation <https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-lilac.master/exercises_tools/notes.html>`_).
|
This is a plugin for `Tutor <https://docs.tutor.overhang.io>`_ to easily add the `Open edX note-taking app <https://github.com/edx/edx-notes-api>`_ to an Open edX platform. This app allows students to annotate portions of the courseware (see `the official documentation <https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-maple.master/exercises_tools/notes.html>`_).
|
||||||
|
|
||||||
.. image:: https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-lilac.master/_images/SFD_SN_bodyexample.png
|
.. image:: https://edx.readthedocs.io/projects/open-edx-building-and-running-a-course/en/open-release-maple.master/_images/SFD_SN_bodyexample.png
|
||||||
:alt: Notes in action
|
:alt: Notes in action
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
|
|||||||
3
setup.py
3
setup.py
@ -31,7 +31,7 @@ setup(
|
|||||||
packages=find_packages(exclude=["tests*"]),
|
packages=find_packages(exclude=["tests*"]),
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
python_requires=">=3.5",
|
python_requires=">=3.5",
|
||||||
install_requires=["tutor>=12.0.0,<13.0.0"],
|
install_requires=["tutor>=13.0.0,<14.0.0"],
|
||||||
entry_points={"tutor.plugin.v0": ["notes = tutornotes.plugin"]},
|
entry_points={"tutor.plugin.v0": ["notes = tutornotes.plugin"]},
|
||||||
classifiers=[
|
classifiers=[
|
||||||
"Development Status :: 5 - Production/Stable",
|
"Development Status :: 5 - Production/Stable",
|
||||||
@ -39,7 +39,6 @@ setup(
|
|||||||
"License :: OSI Approved :: GNU Affero General Public License v3",
|
"License :: OSI Approved :: GNU Affero General Public License v3",
|
||||||
"Operating System :: OS Independent",
|
"Operating System :: OS Independent",
|
||||||
"Programming Language :: Python",
|
"Programming Language :: Python",
|
||||||
"Programming Language :: Python :: 3.5",
|
|
||||||
"Programming Language :: Python :: 3.6",
|
"Programming Language :: Python :: 3.6",
|
||||||
"Programming Language :: Python :: 3.7",
|
"Programming Language :: Python :: 3.7",
|
||||||
"Programming Language :: Python :: 3.8",
|
"Programming Language :: Python :: 3.8",
|
||||||
|
|||||||
@ -1,2 +1 @@
|
|||||||
__version__ = "12.0.0"
|
__version__ = "13.0.0"
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
# Notes
|
# Notes
|
||||||
{{ NOTES_HOST }}{% if not ENABLE_HTTPS %}:80{% endif %} {
|
{{ NOTES_HOST }}{$default_site_port} {
|
||||||
reverse_proxy nginx:80
|
import proxy "notes:8000"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
"ENABLE_EDXNOTES": true
|
|
||||||
@ -14,6 +14,9 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app.kubernetes.io/name: notes
|
app.kubernetes.io/name: notes
|
||||||
spec:
|
spec:
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 1000
|
||||||
|
runAsGroup: 1000
|
||||||
containers:
|
containers:
|
||||||
- name: notes
|
- name: notes
|
||||||
image: {{ NOTES_DOCKER_IMAGE }}
|
image: {{ NOTES_DOCKER_IMAGE }}
|
||||||
@ -23,9 +26,11 @@ spec:
|
|||||||
- name: DJANGO_SETTINGS_MODULE
|
- name: DJANGO_SETTINGS_MODULE
|
||||||
value: notesserver.settings.tutor
|
value: notesserver.settings.tutor
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /openedx/edx-notes-api/notesserver/settings/tutor.py
|
- mountPath: /app/edx-notes-api/notesserver/settings/tutor.py
|
||||||
name: settings
|
name: settings
|
||||||
subPath: tutor.py
|
subPath: tutor.py
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
volumes:
|
volumes:
|
||||||
- name: settings
|
- name: settings
|
||||||
configMap:
|
configMap:
|
||||||
|
|||||||
@ -16,7 +16,7 @@ spec:
|
|||||||
- name: DJANGO_SETTINGS_MODULE
|
- name: DJANGO_SETTINGS_MODULE
|
||||||
value: notesserver.settings.tutor
|
value: notesserver.settings.tutor
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: /openedx/edx-notes-api/notesserver/settings/tutor.py
|
- mountPath: /app/edx-notes-api/notesserver/settings/tutor.py
|
||||||
name: settings
|
name: settings
|
||||||
subPath: tutor.py
|
subPath: tutor.py
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@ -3,8 +3,10 @@ apiVersion: v1
|
|||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: notes
|
name: notes
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: caddy
|
||||||
spec:
|
spec:
|
||||||
type: NodePort
|
type: ClusterIP
|
||||||
ports:
|
ports:
|
||||||
- port: 8000
|
- port: 8000
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
|||||||
@ -3,5 +3,5 @@ notes-job:
|
|||||||
environment:
|
environment:
|
||||||
DJANGO_SETTINGS_MODULE: notesserver.settings.tutor
|
DJANGO_SETTINGS_MODULE: notesserver.settings.tutor
|
||||||
volumes:
|
volumes:
|
||||||
- ../plugins/notes/apps/settings/tutor.py:/openedx/edx-notes-api/notesserver/settings/tutor.py:ro
|
- ../plugins/notes/apps/settings/tutor.py:/app/edx-notes-api/notesserver/settings/tutor.py:ro
|
||||||
depends_on: {{ [("mysql", RUN_MYSQL)]|list_if }}
|
depends_on: {{ [("mysql", RUN_MYSQL)]|list_if }}
|
||||||
|
|||||||
@ -4,7 +4,16 @@ notes:
|
|||||||
environment:
|
environment:
|
||||||
DJANGO_SETTINGS_MODULE: notesserver.settings.tutor
|
DJANGO_SETTINGS_MODULE: notesserver.settings.tutor
|
||||||
volumes:
|
volumes:
|
||||||
- ../plugins/notes/apps/settings/tutor.py:/openedx/edx-notes-api/notesserver/settings/tutor.py:ro
|
- ../plugins/notes/apps/settings/tutor.py:/app/edx-notes-api/notesserver/settings/tutor.py:ro
|
||||||
- ../../data/notes:/openedx/data
|
- ../../data/notes:/app/data
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
depends_on: {{ [("mysql", RUN_MYSQL)]|list_if }}
|
depends_on:
|
||||||
|
- notes-permissions
|
||||||
|
{% if RUN_MYSQL %}- mysql{% endif %}
|
||||||
|
|
||||||
|
notes-permissions:
|
||||||
|
image: {{ DOCKER_IMAGE_PERMISSIONS }}
|
||||||
|
command: ["1000", "/app/notes"]
|
||||||
|
restart: on-failure
|
||||||
|
volumes:
|
||||||
|
- ../../data/notes:/app/notes
|
||||||
|
|||||||
@ -1,18 +0,0 @@
|
|||||||
### Student notes service
|
|
||||||
upstream notes-backend {
|
|
||||||
server notes:8000 fail_timeout=0;
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name {{ NOTES_HOST }};
|
|
||||||
|
|
||||||
# Disables server version feedback on pages and in headers
|
|
||||||
server_tokens off;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
proxy_redirect off;
|
|
||||||
proxy_pass http://notes-backend;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,3 +1,3 @@
|
|||||||
# Notes
|
# Student notes
|
||||||
EDXNOTES_CLIENT_NAME = "notes"
|
EDXNOTES_CLIENT_NAME = "notes"
|
||||||
EDXNOTES_INTERNAL_API = "http://notes:8000/api/v1"
|
EDXNOTES_INTERNAL_API = "http://notes:8000/api/v1"
|
||||||
|
|||||||
@ -4,13 +4,19 @@ MAINTAINER Overhang.io <contact@overhang.io>
|
|||||||
RUN apt update && \
|
RUN apt update && \
|
||||||
apt upgrade -y && \
|
apt upgrade -y && \
|
||||||
# python 3.8
|
# python 3.8
|
||||||
apt install -y language-pack-en git python3 python3-pip libmysqlclient-dev
|
apt install -y language-pack-en git python3 python3-pip python3-venv libmysqlclient-dev
|
||||||
RUN ln -s /usr/bin/python3 /usr/bin/python
|
RUN ln -s /usr/bin/python3 /usr/bin/python
|
||||||
|
|
||||||
RUN mkdir /openedx
|
ARG APP_USER_ID=1000
|
||||||
RUN git clone https://github.com/edx/edx-notes-api --branch {{ OPENEDX_COMMON_VERSION }} --depth 1 /openedx/edx-notes-api
|
RUN useradd --home-dir /app --create-home --shell /bin/bash --uid ${APP_USER_ID} app
|
||||||
WORKDIR /openedx/edx-notes-api
|
USER ${APP_USER_ID}
|
||||||
|
|
||||||
|
RUN git clone https://github.com/edx/edx-notes-api --branch {{ OPENEDX_COMMON_VERSION }} --depth 1 /app/edx-notes-api
|
||||||
|
WORKDIR /app/edx-notes-api
|
||||||
|
|
||||||
|
RUN python -m venv /app/venv
|
||||||
|
ENV PATH /app/venv/bin:${PATH}
|
||||||
|
RUN pip install setuptools==44.1.0 pip==20.3.4 wheel==0.37.0
|
||||||
RUN pip3 install -r requirements/base.txt
|
RUN pip3 install -r requirements/base.txt
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user