Deployment repo for nbviewer.org
The nbviewer image and helm chart are defined in https://github.com/jupyter/nbviewer. The helm chart in that repo is not published anywhere, so we use a local checkout. Helm upgrades are deployed via GitHub actions.
Some very infrequent manual tasks (interacting with the fastly cache layer) are scripted in tasks.py for use with pyinvoke.
We're mostly trying to move away from that, but tasks are infrequent enough.
Let's not add to them, though.
- helm upgrade happens when PRs are merged in
.github/workflows/cd.yml - The nbviewer repo is automatically checked for updates in
.github/workflows/watch-dependencies
nbviewer publishes its images automatically. If a change you want to deploy was merged recently, make sure to wait for the image to be published to Docker Hub (takes a few minutes).
Checking for nbviewer updates and deploying to nbviewer.org is done automatically every day.
To manually run a check for the latest version of nbviewer, run the watch-dependencies action. This should open a PR with any changes.
You can also check for updates manually with python3 scripts/update-nbviewer.py, and open a PR yourself.
When that PR is merged, the updated nbviewer will be deployed.
The nbviewer version is current in two places:
- the chart version in
.github/workflows/cd.yml - the image version in
config/nbviewer.yaml
To deploy an update from nbviewer to nbviewer.org:
- check the latest version of the nbviewer repo (https://github.com/jupyter/nbviewer/commits)
- store the latest commit in
NBVIEWER_VERSIONin .github/workflows/cd.yaml - check the latest tag of the nbviewer image
- update the tag in config/nbviewer.yaml
These steps are scripted in scripts/update-nbviewer.py.
Open a pull request, and it should be deployed to nbviewer.org upon merge.
Right now, nbviewer is run on OVHCloud via helm in the namespace nbviewer.
Python dependencies:
pip install -r requirements.in # (or requirements.txt for a locked env)
-
Fastly is scripted now, but we could do better. Load-balancer DNS/ip is hardcoded in tasks.py and must be updated if changed. See the output of
kubectl get svcfor the current ip address, and update withinvoke fastly. -
cdn.jupyter.org is proxied through Cloudflare DNS. Changes to ip require manual update at https://dash.cloudflare.com/dns.