-
Notifications
You must be signed in to change notification settings - Fork 2
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
How to run Open edX on a local Kubernetes cluster? #4
Comments
Hello @regisb, i was testing with minikube for Olive and it appears to works fine. I can take this task and add docs |
That would be absolutely amazing! Looking forward to the PR. I'm wondering if there is a way to avoid the manual changes to /etc/hosts, though? |
2U SRE also uses primarily minikube, although it's more due to a lack of alternatives when the choice was originally made than the result of a detailed comparison. I heard one downvote for k3s for reasons not yet explained. Still waiting on input from a few people, I'll comment again if any useful insights come out of it. |
Another vote came in for kind because it's "more robust with less memory footprint". A couple of comparisons that were fairly informative:
Generally what I'm seeing is "alternatives to minikube came up to address its limitations, and they've been stealing features from each other since". I think the current state is that minikube is still the most popular and is competitive in features, some of the alternatives are a little more efficient in resource usage. |
Another vote for minikube IMO is its very rich driver support. Knowing that I can spin tutor up using my ProxMox servers as VM hosts and get all that centrally managed goodness is a big win in my book :) MicroK8s also runs in a number of environments but the support seems a bit more hit and miss. |
Thanks for your input ya'll! It's very much appreciated. Please keep posting your opinions here :) |
A visual of relative popularity over time of the options I've seen mentioned so far, courtesy of https://star-history.com/: |
Hi I have set up this much, my services are running on it, I have caddy serving as load-balancer , the issue is my http request is going to caddy but caddy behaves like it doses have path to redirect that traffic. When I put the IP it shows White Page and when I Put hostname its gives 502 Gateway error. can Some help with this issue |
Hello @Shubhamsingh1998. I'll comment here the steps to run local installation wtih Minikube. For now, i have not been able to work with Kind(I'm having problems to expose the caddy) How to run Open edX on a local Kubernetes cluster with Minikube
For my example was:
|
Thank you @Henrrypg for this. |
I've done further research, with interesting results. k3s: not usable out of the boxI was not able to get k3s to work with Tutor out of the box, because k3s does not apply As a consequence of this issue, mysql volumes do not have the right permissions, and mysql fails to boot. minikube: works greatJust run:
While Tutor is launching, open the k8s dashboard with:
To access the Open edX platform, see port forwarding below. EDIT: as a side note, Docker images can be loaded in Minikube easily: https://minikube.sigs.k8s.io/docs/handbook/pushing/
kind: works greatRun:
And you're done. The only downside, compared to minikube, is that the kubernetes dashboard must be installed manually (not a big deal). See port forwarding below. Also, Open edX seems super slow. I did not take the time to tweak the settings, maybe there is a way to allocate more CPU/memory. port forwardingOnce Open edX is running inside the k8s cluster, all we need to do is to forward localhost:80 to the caddy:80 service. Run:
But because 80 is a privileged port, this command must be run as root. You must then point kubectl to the right kubeconfig:
And tada! You can now open http://local.overhangio, http://studio.local.overhangio, http://apps.local.overhangio, etc. This method has the advantage that you don't need to add a long list of host names to /etc/hosts. What's also great is that this port forwarding method should work for all k8s providers, not just kind or minikube. What's not so great is that, in practice, I've observed that the port forwarding does not work so well with kind. In some cases I was able to access the LMS, but not the Studio, and vice versa. We might have to setup extra port mappings in kind. remaining issuesI did not manage to get the minio plugin to work yet. This is because, during migrations, the LMS makes a call to files.local.overhang.io, which does not resolve correctly. TODO
|
Tutor makes it possible to run Open edX on a remote Kubernetes cluster: https://docs.tutor.overhang.io/k8s.html
But in such a setup the Kubernetes cluster needs to expose public endpoints that the IDAs use to communicate between each other. As a consequence, when deploying to a local Kubernetes cluster running on the laptop,
tutor k8s launch
will fail.We should:
The text was updated successfully, but these errors were encountered: