-
Notifications
You must be signed in to change notification settings - Fork 66
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
Deploying a MVP BinderHub #1404
Conversation
Compared to basehub or daskhub
This is Sarah's Docker Hub account for now
for more information, see https://pre-commit.ci
This config is currently failing with the following messages:
I0608 16:18:36.603860 2220 request.go:665] Waited for 1.098502108s due to client-side throttling, not priority and fairness, request: GET:https://104.198.26.247/apis/cert-manager.io/v1alpha2?timeout=32s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 2m23s gke.io/optimize-utilization-scheduler Successfully assigned binder-staging/hub-66958dc964-mtd6s to gke-pilot-hubs-cluster-core-pool-d184c825-vhck
Warning Unhealthy 107s (x3 over 2m13s) kubelet Readiness probe failed: Get "http://10.0.1.33:8081/hub/health": dial tcp 10.0.1.33:8081: connect: connection refused
Normal Created 75s (x4 over 2m13s) kubelet Created container hub
Normal Started 74s (x4 over 2m13s) kubelet Started container hub
Warning BackOff 48s (x9 over 2m8s) kubelet Back-off restarting failed container
Normal Pulled 33s (x5 over 2m14s) kubelet Container image "jupyterhub/k8s-hub:1.1.2" already present on machine |
The above looks like the following PR but we have not enabled the prePuller or userPlaceholders |
From the hub logs k logs -c hub hub-66958dc964-mtd6s --previous
Loading /usr/local/etc/jupyterhub/secret/values.yaml
No config at /usr/local/etc/jupyterhub/existing-secret/values.yaml
Loading extra config: 0-binderspawnermixin
Loading extra config: 00-binder
Loading extra config: 01-custom-theme
Loading extra config: 02-custom-admin
[E 2022-06-08 16:01:34.455 JupyterHub app:2969]
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/jupyterhub/app.py", line 2966, in launch_instance_async
await self.initialize(argv)
File "/usr/local/lib/python3.8/dist-packages/jupyterhub/app.py", line 2457, in initialize
self.load_config_file(self.config_file)
File "/usr/local/lib/python3.8/dist-packages/traitlets/config/application.py", line 87, in inner
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/traitlets/config/application.py", line 775, in load_config_file
for (config, filename) in self._load_config_files(filename, path=path, log=self.log,
File "/usr/local/lib/python3.8/dist-packages/traitlets/config/application.py", line 737, in _load_config_files
config = loader.load_config()
File "/usr/local/lib/python3.8/dist-packages/traitlets/config/loader.py", line 616, in load_config
self._read_file_as_dict()
File "/usr/local/lib/python3.8/dist-packages/traitlets/config/loader.py", line 648, in _read_file_as_dict
exec(compile(f.read(), conf_filename, 'exec'), namespace, namespace)
File "/usr/local/etc/jupyterhub/jupyterhub_config.py", line 446, in <module>
exec(config_py)
File "<string>", line 3, in <module>
ModuleNotFoundError: No module named 'jupyterhub_configurator' |
for more information, see https://pre-commit.ci
Commenting out all the custom scripts made the hub pod get out of crashloopbackoff |
Binder exists at https://binder-staging.2i2c.cloud/ Image build and push succeeded, but spawn failed with: HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"pods \"jupyter-binder-2dexamples-2drequirements-2dat9cvbbg\" is forbidden: error looking up service account binder-staging/user-sa: serviceaccount \"user-sa\" not found","reason":"Forbidden","details":{"name":"jupyter-binder-2dexamples-2drequirements-2dat9cvbbg","kind":"pods"},"code":403}
Spawn failed: (403)
Reason: error
HTTP response headers: HTTPHeaderDict({'Audit-Id': '9b2b8bc3-ab2b-4fed-8d75-0fcacf2b86a4', 'Cache-Control': 'no-cache, private', 'Content-Type': 'application/json', 'X-Kubernetes-Pf-Flowschema-Uid': '6076e3d8-fb9c-4af6-bc16-1828eab8bf98', 'X-Kubernetes-Pf-Prioritylevel-Uid': '3b5efc35-8cfb-4eeb-8300-d32a394811b8', 'Date': 'Wed, 08 Jun 2022 16:33:06 GMT', 'Content-Length': '369'})
HTTP response body: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"pods \"jupyter-binder-2dexamples-2drequirements-2dat9cvbbg\" is forbidden: error looking up service account binder-staging/user-sa: serviceaccount \"user-sa\" not found","reason":"Forbidden","details":{"name":"jupyter-binder-2dexamples-2drequirements-2dat9cvbbg","kind":"pods"},"code":403} |
Removed |
b384c5c
to
6543a9c
Compare
Current problems
|
I believe that until dask/dask-gateway#473 is solved, a token must be manually generated and explicitly set for the jupyterhub gateway service. The code here probably makes more sense than what I'm saying. infrastructure/deployer/hub.py Lines 169 to 186 in 7b6d316
infrastructure/deployer/hub.py Lines 177 to 186 in 7b6d316
|
Ah that's because I pasted the wrong link! The original (now updated) link points to |
So do we actually manually set this for other dask hubs in their values files? I feel like we don't, we let the deployer generate one. Therefore, if we wait for the deployer to generate one, how do those hubs pass the validation check - because the validation step runs before the deployer generates and inserts the token? Am I misunderstanding something? I added code to generate/inject the API token for binderhub here: And I can deploy the hub fine so long as I skip the validation check. See 69f712d |
@sgibson91, validation works for other daskhubs because of this (had no idea about it and never noticed it)... infrastructure/deployer/config_validation.py Line 113 in 7b6d316
|
Ahhhh, so I need a conditional there for BinderHub too - thank you @GeorgianaElena! <3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great to me!
Co-authored-by: Yuvi Panda <[email protected]>
for more information, see https://pre-commit.ci
upstream has a much more recent tag for the dind image
Used to provide access to cloud resources
Avoids extra dind deployments on core nodes and dask-gateway nodes
Add userServiceAccount to binderhub
Got a warning in the logs about calico
|
Other than the above comment about calico, this is deployed and ready for review! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\o/ Let's go! THANKS @sgibson91!
The calico warning is harmless for the most part, means the pod got scheduled on the node before networkpolicy had a chance to start up. |
🎉🎉🎉🎉 Monitor the deployment of the hubs here 👉 https://github.com/2i2c-org/infrastructure/actions/workflows/deploy-hubs.yaml?query=branch%3Amaster |
related #1280
This PR deploys a minimal working BinderHub to the 2i2c cluster. It can be accessed at https://binder-staging.2i2c.cloud