notebooks/components/crud-web-apps/jupyter
DavidSpek 2e5eaa1dc6 Remove the f-strings in the Jupyter web app's backend (kubeflow/kubeflow#5680) 2021-06-03 09:10:37 -07:00
..
backend Remove the f-strings in the Jupyter web app's backend (kubeflow/kubeflow#5680) 2021-06-03 09:10:37 -07:00
frontend feat(jupyter): add fonts as assets to service (kubeflow/kubeflow#5691) 2021-06-02 10:44:35 -07:00
manifests JWA: Don't override assets with logos ConfigMap (kubeflow/kubeflow#5942) 2021-05-31 01:36:03 -07:00
.gitignore Refactor the JWA backend to utilize common code (kubeflow/kubeflow#5316) 2020-09-29 02:37:25 -07:00
Dockerfile Add CI format checks for the Volumes web app (kubeflow/kubeflow#5820) 2021-05-17 08:25:31 -07:00
Makefile Add CI format checks for the Jupyter web app (kubeflow/kubeflow#5811) 2021-04-08 03:51:02 -07:00
README.md Remove Logo Trademarks from the Jupyter Web App and make logos configurable (kubeflow/kubeflow#5823) 2021-04-13 05:04:04 -07:00

README.md

Jupyter web app

This web app is responsible for allowing the user to manipulate the Jupyter Notebooks in their Kubeflow cluster. To achieve this it provides a user friendly way to handle the lifecycle of Notebook CRs.

Image Groups

With the release of Kubeflow 1.3, two types have Notebook Servers have been added alongside the familiar JupyterLab:

  • Group 1
  • Group 2

Some extra configurations are applied Notebook Servers belonging to these groups:

The annotation notebooks.kubeflow.org/http-rewrite-uri: / is added to Notebook resources of both groups. This configures Istio to rewrite the URI to / on the container. This is useful for applications which host their on / and do not allow you to change the URI subpath easily.

The annotation notebooks.kubeflow.org/http-headers-request-set: '{"X-RStudio-Root-Path":"/notebook/<namespace>/<name>/"}' is added to Notebook resources belonging to Group 2. This configures Istio to add this header to requests, which is necessary for images from Group 2 to work.

The Jupyter Web App displays the logos for each Notebook Server group in a button toggle in the Spawner UI. To easily identify the group of a running Notebook Server, the Index page contains a column that displays the icon for each image group. The SVG logos and icons for each group are added with a configmap to make it easy for users to customize the logos and icons for their environment.

Development

Requirements:

  • node 12.0.0
  • python 3.7

Frontend

# build the common library
cd components/crud-web-apps/common/frontend/kubeflow-common-lib
npm i
npm run build
cd dist/kubeflow
npm link

# build the app frontend
cd ../../../jupyter/frontend
npm i
npm link kubeflow
npm run build:watch

Backend

# create a virtual env and install deps
# https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/
cd component/crud-web-apps/jupyter/backend
python3.7 -m pip install --user virtualenv
python3.7 -m venv web-apps-dev
source web-apps-dev/bin/activate

# install the deps on the activated virtual env
make -C backend install-deps

# run the backend
make -C backend run-dev