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

RD on Windows #15

Closed
mattfarina opened this issue Dec 9, 2020 · 7 comments
Closed

RD on Windows #15

mattfarina opened this issue Dec 9, 2020 · 7 comments
Projects

Comments

@mattfarina
Copy link
Contributor

We need to have RD running on Windows and that includes Windows Home where there is no hypervisor. Instead of a normal hypervisor we should use Windows Subsystem for Linux (likely v2). WSL is available on Windows 10 Home.

With WSL we could either install and manage k3s in an existing Linux or start up a custom Linux setup and expose K3s to windows and the other Linux instances from there. This is open for discussion.

This isn't going to use Minikube as minikube on Windows doesn't work with WSL to manage the things.

@mook-as
Copy link
Contributor

mook-as commented Dec 10, 2020

FWIW, Docker on Windows (when on Windows 10 Home) only runs via WSL2; there it appears to act like nested containers — it runs a Microsoft-shipped Linux kernel, and each distribution gets their own chroot / pid namespace (but appears to have a shared network namespace). They also have a HyperV backend, but HyperV is only available on Pro+ Windows licenses.

@mattfarina
Copy link
Contributor Author

@mook-as k3s runs in linux under WSLv2. The questions will be... which Linux do we use and why? Is it a separate one from the users or right in a users linux setup? How do we install and how do we bridge k8s to Windows?

We can't use Hyper-V because running in Windows Home is a priority.

@gaktive gaktive added this to To do in Stripey Dec 18, 2020
@gaktive gaktive added the mvp label Jan 8, 2021
@mattfarina mattfarina moved this from To do to In progress in Stripey Mar 5, 2021
@mattfarina
Copy link
Contributor Author

The deliverable for this issue is the WSL/k3s setup that can later be connected to the app/UI via #147

@jandubois
Copy link
Member

I've written up instructions as part of the release notes for tinyk3s-v0.1.

I intend to tweak this setup further in the future, but it should be good enough to get started with RD for now.

Maybe try all the steps manually once, to verify that they are working on other machines beside my VM?

And let me know if I missed to explain some scenario!

Since we don't have an init system like systemd under WSL, we'll need to do some monitoring/restarting at the RD level, but I assume that is outside the scope of this issue.

@mattfarina mattfarina moved this from In progress to Review in Stripey Mar 12, 2021
@mook-as
Copy link
Contributor

mook-as commented Mar 30, 2021

I've get as foar as kubectl.exe get pods -A on my (non-VM) Windows machine. The only thing relevant was that I had to install WSL first (this was a fresh install).

Also, I didn't bother with the shell script - I just downloaded files manually and put them in the right places.

Suggestions, for later:

  • Should point to instructions to set up WSL (or better, have RD do it for the user).
  • run-k3s shouldn't daemonize — it should just run in the foreground, and we can get RD to do the backgrounding. That should (hopefully) also solve issues you were having with process management.
  • I assume we'd override CACHE_DIR from the RD end, so the cache directory thing isn't an issue.

@mook-as
Copy link
Contributor

mook-as commented Mar 30, 2021

Notes on getting a RD dev environment on Windows:

Dependencies:

With that, npm install will hopefully work. Not even trying to build yet.

I may have missed stuff; feel free to edit this comment to update the instructions.

@mook-as
Copy link
Contributor

mook-as commented Apr 22, 2021

Closing, because things landed and WSL-based RD should work now (with lots of polish needed).

@mook-as mook-as closed this as completed Apr 22, 2021
@mattfarina mattfarina moved this from Review to Done in Stripey Apr 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

4 participants