-
Notifications
You must be signed in to change notification settings - Fork 730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remote content serving #8005
Remote content serving #8005
Conversation
6128398
to
66716c2
Compare
Testing this now -- what's a good way to run Kolibri 0.15? Is it different from |
Note: running |
Correct - also, when being invoked via uwsgi, for a remote content scenario, we would presumably not be running the zipcontent server locally, so would not be running that. The 8765 port server is a separately defined wsgi application. |
I'm also getting this error when backed by a postgres database:
It seems like we have a hardcoded dependency to the |
Gotcha. Sounds good! I'll test out that env var then. |
We do hard code references to it in a couple of places: https://github.com/learningequality/kolibri/search?q=sqlite_master but we catch them in the case they cause an error, hence you're seeing them continue. Could probably conditionalize these calls further. |
I got a test environment with this Dockerfile: FROM python:3.8.9-buster
RUN pip install psycopg2-binary
COPY kolibri-0.15.0.dev0+git.20210414160655-py2.py3-none-any.whl .
RUN pip install ./kolibri-0.15.0.dev0+git.20210414160655-py2.py3-none-any.whl And this docker-compose script: version: '3.4'
services:
kolibri:
build: .
environment:
KOLIBRI_DATABASE_ENGINE: postgres
KOLIBRI_DATABASE_PORT: 5432
KOLIBRI_DATABASE_NAME: kolibri
KOLIBRI_DATABASE_USER: kolibri
KOLIBRI_DATABASE_PASSWORD: kolibri
KOLIBRI_DATABASE_HOST: postgres
KOLIBRI_RUN_MODE: arons-testing
KOLIBRI_CONTENT_REMOTE_URL: https://studio.learningequality.org/content
ports:
- "8080:8080"
- "8765:8765"
depends_on:
- postgres
command: kolibri start --foreground
postgres:
image: postgres:9.6
environment:
PGDATA: /var/lib/postgresql/data/pgdata
POSTGRES_USER: kolibri
POSTGRES_PASSWORD: kolibri
POSTGRES_DB: kolibri
volumes:
- pgdata:/var/lib/postgresql/data/pgdata
volumes:
pgdata: |
should be:
|
And yes, whitenoise should be serving without |
@rtibbles without postgres? Let me try! |
Just running the kolibri without any special settings still returns a 404 alas |
66716c2
to
d6bed14
Compare
Content data has persisted across restarts as well! |
Getting this error for a piece of content on touchable earth: http://localhost:8080/en/learn/#/topics/c/114ab24ec98e585dae3cd57559275394 |
I'm guessing that zip files are currently unsupported. |
Updates from in person review:
|
8549f7e
to
457887f
Compare
After updating to the new wheel file, i'm getting this error:
|
It's weird, i'm not sure how a content import change makes a (seemingly unrelated) iceqube error. |
I'm guessing |
ca3c659
to
733057d
Compare
950ea01
to
a6c57de
Compare
I seem to be stuck with a certain migration, even after clearing all kinds of data:
It doesn't seem to indicate though on what migration it's stuck on. Currently blocked for 20 minutes as of this writing! |
Any info from pg-stat? |
Did a final test. Kolibri is running and content is served without downloading! |
Summary
Rather than attempt to integrate with cloud storage, this instead just delegates any management of content files to an external URL, and just assumes that it is dealing with it.
In order to achieve this, this PR does the following:
REMOTE_CONTENT
that is a boolean to interpret whether this option is being useddownload_url
for files in the ContentNodeViewset, as no longer neededdownloadUrl
utility that just points at the content storage.References
Fixes #7980
Depends on #7924 as it also adds options so didn't want to merge conflict with myself
Reviewer guidance
REMOTE_CONTENT_URL
set work?Testing checklist
PR process
Reviewer checklist
yarn
andpip
)