Skip to content
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

Feature/hellodata 1292 advanced analytics #83

Merged
merged 28 commits into from
Aug 9, 2024

Conversation

wieczorslawo
Copy link
Contributor

No description provided.

# configuration parameter.

# Spawn single-user servers as Docker containers
c.JupyterHub.spawner_class = "dockerspawner.DockerSpawner"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On Cloud deployment we use instead of DockerSpawner the KubeSpawner as profile_list see https://git.mgmtbi.ch/kubernetes/gitops/public/helm_charts/-/merge_requests/226/diffs#e5f164e73bbc0ee61aad9e18b87d28f6844d7bf1_0_54.

E.g. we use existing dockerimage either already existing such as jupyter/datascience-notebook:latest or jupyter/r-notebook:x86_64-python-3.11. or otherwise from Workspaces, where we already install all the necessary python libraries.

@wieczorslawo: What are you mapping into the dockerfile atm that we must have in the dockerimage?

E.g. append_csp.py, wouldn't that be something that needs to be inside the sidecar of Jupyterhub, where the Sidecar would set that "authentication settings" as well as the Postgres User.

Copy link
Contributor Author

@wieczorslawo wieczorslawo Aug 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sidecar doesn't know anything about spawned pods/containers so it's not possible. This config needs to go directly to the notebook image or its pod config via env var or what have you.

https://jupyter-notebook.readthedocs.io/en/5.7.1/public_server.html#embedding-the-notebook-in-another-website
https://discourse.jupyter.org/t/csp-jupyterlab4/20917/5
jupyter/notebook#886

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"What are you mapping into the dockerfile atm that we must have in the dockerimage"

  • the CSP config,
  • the Python script to connect to the database with a temp user
  • the readme file on how to use the script
    That's how it's made for the docker-compose

import os
import requests
import psycopg2
from requests.auth import HTTPBasicAuth
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this script for connecting the database and other potential libraries hello_data_scripts.py would need to go into a PyPi Package. For a short term, should we add it to the side car as well, as we need to map external things into the jupyterhub already (postgres user, tornado/keycloak settings, etc)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sidecar is a REST API service that provides a one-day temporary user creds.
If we can add a shared volume across all spawned pods the file can be a configMap here
We just have to remember to add it later to the PYTHONPATH, right?

@wieczorslawo wieczorslawo merged commit 44627e5 into develop Aug 9, 2024
1 check passed
@wieczorslawo wieczorslawo deleted the feature/HELLODATA-1292_advanced_analytics branch August 9, 2024 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants