docs: Document and advocate systemd for WSL 2.

systemd makes it a lot convenient to run services required for Zulip's
development environment on WSL 2. Once enabled, `tools/start_service`
becomes unnecessary.

More info:
https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
This commit is contained in:
Zixuan James Li
2023-06-08 19:12:49 -04:00
committed by Tim Abbott
parent 1337f6a404
commit 4a18552ff8
5 changed files with 11 additions and 24 deletions

View File

@@ -79,7 +79,7 @@ Jump to:
- [Ubuntu](#ubuntu)
- [Debian](#debian)
- [Fedora](#fedora)
- [Windows](#windows-10)
- [Windows](#windows-10-or-11)
#### macOS
@@ -157,12 +157,12 @@ official `docker-ce` package (named `docker.io` in the
docker distribution, you can follow
[their documentation to install Docker on Fedora](https://docs.docker.com/engine/install/fedora/).
#### Windows 10
#### Windows 10 or 11
Zulip's development environment is most easily set up on Windows using
the Windows Subsystem for Linux ([WSL
2](https://docs.microsoft.com/en-us/windows/wsl/wsl2-about))
installation method described here.
installation method described here. We require version 0.67.6+ of WSL 2.
1. Enable virtualization through your BIOS settings. This sequence
depends on your specific hardware and brand, but here are [some
@@ -170,6 +170,10 @@ installation method described here.
1. [Install WSL 2](https://docs.microsoft.com/en-us/windows/wsl/setup/environment).
1. It is required to enable `systemd` for WSL 2 to manage the database, cache and other services.
To configure it, please follow [this instruction](https://learn.microsoft.com/en-us/windows/wsl/wsl-config#systemd-support).
Then, you will need to restart WSL 2 before continuing.
1. Launch the Ubuntu shell as an administrator and run the following command:
```bash
@@ -225,8 +229,6 @@ installation method described here.
start it. (If Windows Firewall creates popups to block services, simply click `Allow Access`.)
```bash
# Start database, cache, and other services
./tools/wsl/start_services
# Install/update the Zulip development environment
./tools/provision
# Enter the Zulip Python environment
@@ -235,11 +237,6 @@ installation method described here.
./tools/run-dev
```
:::{note}
If you shut down WSL, after starting it again, you will have to manually start
the services using `./tools/wsl/start_services`.
:::
1. If you are facing problems or you see error messages after running `./tools/run-dev`,
you can try running `./tools/provision` again.