Support running without kubernetes, just docker
See original GitHub issueProposed change
There’s nothing inherent about binderhub that requires kubernetes. What it needs really is:
- A way to spawn repo2docker
- A way to tell a JupyterHub to run users with a specific image
This is doable without kubernetes! If you look at where we use kubernetes, it is mostly only in build.py. We already support another build backend - FakeBuild.
I’d like to support an additional backend that lets you run binderhub on a single host, with docker + a jupyterhub with dockerspawner. This will make it much easier for people to set up ‘small’ binderhubs internally, and also exercise our abstraction for future users (who might want it on HPCs, for example).
Alternative options
Decide that we have a hard dependency on kubernetes, and other setups will not be supported. I don’t think we should do this though.
Who would use this feature?
- People who want to run binderhub on a single node, since they don’t expect a lot of traffic (or it is authenticated)
- People who want to code for different backends eventually. This would also involve finishing up @manics’s work in https://github.com/jupyterhub/repo2docker/pull/848 in repo2docker, but that can happen independent of work here.
(Optional): Suggest a solution
- Turn
Build
in https://github.com/jupyterhub/binderhub/blob/00bd8304e99e9a4edbdfcca6fd98293fb1fb2e6a/binderhub/build.py#L18 into an abstract, well defined interface. I think this involves definint__init__
,submit
andstream_logs
- Implement a
DockerBuild
that implementsBuild
on top of the docker API - Investigate features we need that are deployed as part of the helm chart, rather than in the python package. Refactor as needed (keeping in mind needs of simplicity for mybinder.org)
- Move our
kubernetes
imports to a file, and make it conditional. This helps us makekubernetes
an optional dependency! - Add tests to make sure things work with just docker!
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:13 (7 by maintainers)
Top Results From Across the Web
How to run Kubernetes without Docker - SIGHUP
If you have a cluster already provisioned by major cloud providers like GKE, EKS, or AKS (which defaults to containerd) or if you...
Read more >Kubernetes is deprecating Docker: What you need to know
Kubernetes is removing support for Docker as a container runtime. Kubernetes does not actually handle the process of running containers on a ...
Read more >Kubernetes is Removing Docker Support, Kubernetes is Not ...
Even though Kubernetes is moving away from Docker, it will always support the OCI and Docker image formats. Kubernetes doesn't pull and run...
Read more >Don't Panic: Kubernetes and Docker
Kubernetes is deprecating Docker as a container runtime after v1.20. You do not need to panic. It's not as dramatic as it sounds....
Read more >Dockerless, part 1: Which tools to replace Docker with and why
There is no Docker Compose replacement for Podman. There is a way to just run Kubernetes-compliant Pod YAMLs locally, but it's not mature...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
+1
We can also put the docker logic in a separate package, so we end up in a situation like we have with spawners. I use SimpleLocalProcessSpawner for testing, and that’s so much nicer than requiring k8s for it.
👍 to putting the Docker logic in a separate package. I think just the act of defining interfaces (e.g. BinderBuilder and BinderLauncher?) will improve maintainability of the code through clear documentation, at the moment there’s an assumption you know a lot of Kubernetes concepts which can make the code hard to understand.