Entando on Windows 10 WSL2

Just FYI, I’ve been talking to a few people about running a quickstart Entando on Windows 10 WSL2, instead of using a Multipass VM as we suggest in our Getting Started guides. On paper that sounds like an obvious choice but the reality isn’t quite as simple, no surprise.

The main issue is that Ubuntu (I was testing with 20.04 LTS) under WSL2 does not include systemd or openrc which is what k3s relies on to manage its services when the VM starts, stops, etc. You can install systemd via sudo apt-get, just to satisfy the k3s installer, or you can install k3s by hand but either way you’ll need to manually start/stop k3s itself, e.g. sudo k3s server. I’ve seen comments in the community about ways to fully get systemd working in WSL2 but I didn’t dig into those options.

The second issue is that network routing for WSL2 doesn’t have the convenience of .mshome.net which you get under Hyper-V. That means your IP address changes on every host restart and that’s a challenge for Entando routing in Kubernetes You could use an .nip.io address since the VM does get an IP or you could add an /etc/hosts entry to map to the IP and use a single domain for the quickstart settings. That would be my preference but you could also setup a custom route. Each of these options are noted here: https://dev.entando.org/v6.3/docs/reference/local-tips-and-tricks.html#the-ip-address-changed-after-the-initial-install.

So the basic process which worked for me was to spin up Ubuntu 20.04, install java and set JAVA_HOME, deal with networking (in my case by modifying the host /etc/hosts to map wsl2.local.host to my VM IP), install and startup k3s, install ent, and then install Entando via something like ent quickstart --hostname=wsl2.local.host entando quickstart.

In the end Entando on WSL2 does work once you deal with the quirks of WSL2 and Windows networking.

1 Like