-
Notifications
You must be signed in to change notification settings - Fork 75
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
Support Local Development with Kubernetes with Docker Desktop #3158
base: main
Are you sure you want to change the base?
Support Local Development with Kubernetes with Docker Desktop #3158
Conversation
When I run python deploy.py docker-desktop I get the error
@manics could you point me to the configuration that I'm missing? Thanks! |
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.
Could it be
mybinder.org-deploy/config/staging.yaml
Lines 136 to 140 in 9a88e71
static: | |
ingress: | |
hosts: | |
- static.staging.mybinder.org | |
- static.gke2.staging.mybinder.org |
deploy.py
Outdated
@@ -437,6 +437,7 @@ def main(): | |||
"release", | |||
help="Release to deploy", | |||
choices=[ | |||
"docker-desktop", |
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.
Can we rename this to local
or something similar? I don't think this should be specific to docker-desktop, e.g. it should work with a local k3s/microk8s etc. It also means we could run this in GitHub CI using https://github.com/jupyterhub/action-k3s-helm which will allow us to test some changes in PRs instead of having to deploy to staging first.
57b9030
to
2a6514a
Compare
Thanks @manics for the feedback. I fixed the previously mentioned Following the provided documentation, the user should be able to
At the moment, the user will get the following error
This should be solved by changing |
I try using binderhub:
config:
BinderHub:
hub_url: http://jupyterhub.localhost to fix the @manics do you have a suggestion? |
I don't think we should recommend modifying the hosts file, it should be possible to either rely on
|
In 2a6514a, the launch requests produces the following log in the
My understanding is that the Define
The
Based on https://stackoverflow.com/a/16235349/1802726, the error is because of missing Linux kernel modules that I'm assuming are not available on Docker Desktop. @manics does this looks good for you? Can we merge? I will try to test on my GNU/Linux machine next week. |
02887db
to
109886d
Compare
I try to reproduce the error
with the BinderHub helm instead of the mybinder.org helm when launching https://github.com/binder-examples/requirements but BinderHub helm does not have this error. @manics @minrk @yuvipanda do you think this could be because of the system charts deployed? |
Which pod are you seeing the I'll try and review this PR in the next few days. |
The |
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.
Thanks for your work on this! I've made some suggestions, but otherwise I'm happy to see this merged and refinements made in later PRs. For example, I think it'd be interesting to enable some of the disabled services and test this in K3s in a GitHub workflow. It might also be interesting to see if we can use the configuration from @yuvipanda's new standalone 2i2c deployment in a GitHub workflow CI test. This would provide a first line of testing, instead of relying on a staging deployment to pick up errors.
deploy.py
Outdated
dry_run=False, | ||
diff=False, | ||
ip_address=None, | ||
disable_ingress_nginx=False, |
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.
We may want to add further enables/disables. Instead of adding more flags in future do you think this could be additional_helm_args=None
(or helm_args
, or some other name), and we can pass a list of args instead? Or maybe additional_helm_set
/helm_set
to only allow --set
arguments?
deploy.py
Outdated
] | ||
) | ||
|
||
if disable_ingress_nginx: |
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.
If you're happy with the idea of additional_helm_args
/additional_helm_set
etc this can become either helm.extend(additional_helm_args)
or helm.extend(f"--set={arg}" for arg in additional_helm_set)
deploy.py
Outdated
@@ -474,9 +507,20 @@ def main(): | |||
default=stages[0], | |||
help="Stage to deploy, default all", | |||
) | |||
argparser.add_argument( | |||
"--disable-ingress-nginx", |
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.
If we add additional_helm_args
or similar then
argparser.add_argument(
"--helmarg",
action="append",
)
Should ensure that
deploy.py .... --helmarg='--set=ingress-nginx.enabled=false' --helmarg='--set=something.else=1'
results in args.helmarg == ["--set=ingress-nginx.enabled=false", "--set=something.else=1"]
.
@@ -0,0 +1,63 @@ | |||
# Getting started with local development | |||
|
|||
This page contains a starting point for people who want to know more about the BinderHub deployment by playing around with a local development instance. |
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 page contains a starting point for people who want to know more about the BinderHub deployment by playing around with a local development instance. | |
This page contains a starting point for people who want to know more about the mybinder.org deployment by playing around with a local development instance. |
|
||
You will need a local Kubernetes cluster. A few options are | ||
|
||
- [Kubernetes with Docker Desktop](https://docs.docker.com/desktop/features/kubernetes/) (recommended) |
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.
- [Kubernetes with Docker Desktop](https://docs.docker.com/desktop/features/kubernetes/) (recommended) | |
- [Kubernetes with Docker Desktop](https://docs.docker.com/desktop/features/kubernetes/) |
Let's not recommend something with a complicated license.
Rancher Desktop is similar and open-source
- [k3d](https://k3d.io/stable/) | ||
- [kind](https://kind.sigs.k8s.io/) | ||
|
||
### Install Docker Desktop |
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.
Do we need this section, or should it be obvious how to install the above applications?
|
||
## Access your mybinder.org | ||
|
||
Open http://localhost with your favourite web browser. |
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.
Shouldn't this be http://xxx.xxx.xxx.xxx.nip.io
?
in localhost
Fixes File "/usr/local/lib/python3.11/site-packages/google/auth/_default.py", line 691, in default raise exceptions.DefaultCredentialsError(_CLOUD_SDK_MISSING_CREDENTIALS) google.auth.exceptions.DefaultCredentialsError: Your default credentials were not found. To set up Application Default Credentials, see https://cloud.google.com/docs/authentication/external/set-up-adc for more information.
for more information, see https://pre-commit.ci
for localhost.
and overwrite Helm chart with the provided IP address.
for more information, see https://pre-commit.ci
because Let's Encrypt will probably not work.
because it might already be installed in local environment
c7455d0
to
baf3fce
Compare
for more information, see https://pre-commit.ci
@manics I addressed the suggestions. |
No description provided.