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

use new bigdata-operator as notebook session backend #199

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

ImpSy
Copy link
Collaborator

@ImpSy ImpSy commented Apr 18, 2024

Why

Remove the need for NFS in the notebook-service

What

  • Add a new API in bigdata-operator for remoteKernelSession
  • Make the notebook-service use webhookKernelSessionManager w/ the bigdata-operator

Test plan and results

API server started

2024-04-19T14:33:06Z    INFO    setup    bigdata-operator    {"buildVersion": "0.4.11-429c6a8f", "buildDate": "2024-04-19T13:34:26Z"}
2024-04-19T14:33:06Z    INFO    controller-runtime.metrics    Metrics server is starting to listen    {"addr": ":8080"}
2024-04-19T14:33:06Z    INFO    spotConfigProvider    Found Ocean controller namespace "kube-system"
2024-04-19T14:33:06Z    INFO    setup    oceanControllerNamespace: "kube-system"
2024-04-19T14:33:06Z    INFO    spotConfigProvider    SPOTINST_CLUSTER_IDENTIFIER found in config map kube-system/spotinst-kubernetes-cluster-controller-config
2024-04-19T14:33:06Z    INFO    setup    controllerClusterID: "privatelink-india"
2024-04-19T14:33:06Z    INFO    spotConfigProvider    SPOTINST_BASE_URL found in env var
2024-04-19T14:33:06Z    INFO    spotConfigProvider    SPOTINST_TOKEN found in secret kube-system/spotinst-kubernetes-cluster-controller
2024-04-19T14:33:06Z    INFO    spotConfigProvider    SPOTINST_ACCOUNT found in secret kube-system/spotinst-kubernetes-cluster-controller
2024-04-19T14:33:06Z    INFO    setup    starting API server
2024-04-19T14:33:06Z    INFO    setup    starting manager
2024-04-19T14:33:06Z    INFO    Starting server    {"path": "/metrics", "kind": "metrics", "addr": ":8080"}
2024-04-19T14:33:06Z    INFO    Starting server    {"kind": "health probe", "addr": ":8082"}
I0419 14:33:06.997726       1 leaderelection.go:248] attempting to acquire leader lease spot-system/6aaa1a16.spot.io...
I0419 14:33:22.775233       1 leaderelection.go:258] successfully acquired lease spot-system/6aaa1a16.spot.io

Notebook-service using bigdata-operator as backend

Starting Jupyter Enterprise Gateway...
[D 2024-04-19 14:45:58.877 EnterpriseGatewayApp] Searching ['/venv/etc/jupyter', '/app/services/bigdata-notebook-service/.jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
[D 2024-04-19 14:45:58.878 EnterpriseGatewayApp] Looking for jupyter_config in /etc/jupyter
[D 2024-04-19 14:45:58.878 EnterpriseGatewayApp] Looking for jupyter_config in /usr/local/etc/jupyter
[D 2024-04-19 14:45:58.878 EnterpriseGatewayApp] Looking for jupyter_config in /app/services/bigdata-notebook-service/.jupyter
[D 2024-04-19 14:45:58.879 EnterpriseGatewayApp] Looking for jupyter_config in /venv/etc/jupyter
[D 2024-04-19 14:45:58.880 EnterpriseGatewayApp] Looking for jupyter_enterprise_gateway_config in /etc/jupyter
[D 2024-04-19 14:45:58.880 EnterpriseGatewayApp] Looking for jupyter_enterprise_gateway_config in /usr/local/etc/jupyter
[D 2024-04-19 14:45:58.880 EnterpriseGatewayApp] Looking for jupyter_enterprise_gateway_config in /app/services/bigdata-notebook-service/.jupyter
[D 2024-04-19 14:45:58.881 EnterpriseGatewayApp] Looking for jupyter_enterprise_gateway_config in /venv/etc/jupyter
[I 2024-04-19 14:45:58.883 EnterpriseGatewayApp] Initializing BigdataKernelSpecManager
[I 2024-04-19 14:45:58.885 EnterpriseGatewayApp] Webhook kernel session persistence activated
[I 2024-04-19 14:45:58.894 EnterpriseGatewayApp] Jupyter Enterprise Gateway 3.2.2 is available at http://0.0.0.0:8888
[I 240419 14:46:23 web:2348] 200 GET /api (127.0.0.1) 0.85ms
{"level":"info","service":"kernel-session-manager","httpRequest":{"proto":"HTTP/1.1","remoteIP":"192.168.197.60:56762","requestID":"bigdata-operator-6f684d75bf-56g8c/BtBoDD0yso-000007","requestMethod":"GET","requestPath":"/kernelSession","requestURL":"http://bigdata-operator-api.spot-system.svc.cluster.local/kernelSession"},"httpRequest":{"header":{"accept":"*/*","accept-encoding":"gzip, deflate","connection":"keep-alive","user-agent":"python-requests/2.31.0"},"proto":"HTTP/1.1","remoteIP":"192.168.197.60:56762","requestID":"bigdata-operator-6f684d75bf-56g8c/BtBoDD0yso-000007","requestMethod":"GET","requestPath":"/kernelSession","requestURL":"http://bigdata-operator-api.spot-system.svc.cluster.local/kernelSession","scheme":"http"},"timestamp":"2024-04-19T14:46:53.8236137Z","message":"Request: GET /kernelSession"}
{"level":"info","service":"kernel-session-manager","sessions_found":0,"timestamp":"2024-04-19T14:46:53.827606353Z","message":"list kernel sessions"}
{"level":"info","service":"kernel-session-manager","httpRequest":{"proto":"HTTP/1.1","remoteIP":"192.168.197.60:56762","requestID":"bigdata-operator-6f684d75bf-56g8c/BtBoDD0yso-000007","requestMethod":"GET","requestPath":"/kernelSession","requestURL":"http://bigdata-operator-api.spot-system.svc.cluster.local/kernelSession"},"httpResponse":{"bytes":2,"elapsed":3.990853,"header":{"content-type":"application/json"},"status":200},"timestamp":"2024-04-19T14:46:53.827639366Z","message":"Response: 200 OK"}

@ImpSy ImpSy requested a review from a team as a code owner April 18, 2024 13:36
@ImpSy ImpSy force-pushed the BGD-4764_bns_kernel_session_manager branch 2 times, most recently from 80cdaa8 to 2a9aaed Compare April 19, 2024 10:22
@ImpSy ImpSy force-pushed the BGD-4764_bns_kernel_session_manager branch from a66a914 to ad0d8de Compare April 19, 2024 14:18
@Z4ck404 Z4ck404 requested a review from thorsteinnth April 19, 2024 15:39
@ImpSy ImpSy force-pushed the BGD-4764_bns_kernel_session_manager branch from ad0d8de to d5f02f3 Compare April 29, 2024 14:51
apiVersion: v1
kind: Service
metadata:
name: {{ include "bigdata-operator.fullname" . }}-api
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
name: {{ include "bigdata-operator.fullname" . }}-api
name: bigdata-operator-api

Copy link
Contributor

Choose a reason for hiding this comment

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

since this is hardcoded in the bns chart, hardcode it here as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

didn't wanted to hardcode it in case we ever do blue green

@ImpSy ImpSy force-pushed the BGD-4764_bns_kernel_session_manager branch from d5f02f3 to 3709b38 Compare April 30, 2024 08:13
@ImpSy ImpSy merged commit 1dbf7b9 into main Apr 30, 2024
1 check passed
@ImpSy ImpSy deleted the BGD-4764_bns_kernel_session_manager branch April 30, 2024 09:02
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.

2 participants