mirror of https://github.com/zulip/zulip.git
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:
parent
1337f6a404
commit
4a18552ff8
|
@ -84,4 +84,4 @@ machine, take a look at our tips for
|
||||||
[using-dev-env]: using.md
|
[using-dev-env]: using.md
|
||||||
[testing]: ../testing/testing.md
|
[testing]: ../testing/testing.md
|
||||||
[ci]: ../git/cloning.md#step-3-configure-continuous-integration-for-your-fork
|
[ci]: ../git/cloning.md#step-3-configure-continuous-integration-for-your-fork
|
||||||
[install-via-wsl]: setup-recommended.md#windows-10
|
[install-via-wsl]: setup-recommended.md#windows-10-or-11
|
||||||
|
|
|
@ -66,7 +66,7 @@ ignoring the parts about `vagrant` (since you're not using it).
|
||||||
## Installing using Vagrant with VirtualBox on Windows 10
|
## Installing using Vagrant with VirtualBox on Windows 10
|
||||||
|
|
||||||
:::{note}
|
:::{note}
|
||||||
We recommend using [WSL 2 for Windows development](setup-recommended.md#windows-10)
|
We recommend using [WSL 2 for Windows development](setup-recommended.md#windows-10-or-11)
|
||||||
because it is easier to set up and provides a substantially better experience.
|
because it is easier to set up and provides a substantially better experience.
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ Jump to:
|
||||||
- [Ubuntu](#ubuntu)
|
- [Ubuntu](#ubuntu)
|
||||||
- [Debian](#debian)
|
- [Debian](#debian)
|
||||||
- [Fedora](#fedora)
|
- [Fedora](#fedora)
|
||||||
- [Windows](#windows-10)
|
- [Windows](#windows-10-or-11)
|
||||||
|
|
||||||
#### macOS
|
#### macOS
|
||||||
|
|
||||||
|
@ -157,12 +157,12 @@ official `docker-ce` package (named `docker.io` in the
|
||||||
docker distribution, you can follow
|
docker distribution, you can follow
|
||||||
[their documentation to install Docker on Fedora](https://docs.docker.com/engine/install/fedora/).
|
[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
|
Zulip's development environment is most easily set up on Windows using
|
||||||
the Windows Subsystem for Linux ([WSL
|
the Windows Subsystem for Linux ([WSL
|
||||||
2](https://docs.microsoft.com/en-us/windows/wsl/wsl2-about))
|
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
|
1. Enable virtualization through your BIOS settings. This sequence
|
||||||
depends on your specific hardware and brand, but here are [some
|
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. [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:
|
1. Launch the Ubuntu shell as an administrator and run the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
@ -225,8 +229,6 @@ installation method described here.
|
||||||
start it. (If Windows Firewall creates popups to block services, simply click `Allow Access`.)
|
start it. (If Windows Firewall creates popups to block services, simply click `Allow Access`.)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Start database, cache, and other services
|
|
||||||
./tools/wsl/start_services
|
|
||||||
# Install/update the Zulip development environment
|
# Install/update the Zulip development environment
|
||||||
./tools/provision
|
./tools/provision
|
||||||
# Enter the Zulip Python environment
|
# Enter the Zulip Python environment
|
||||||
|
@ -235,11 +237,6 @@ installation method described here.
|
||||||
./tools/run-dev
|
./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`,
|
1. If you are facing problems or you see error messages after running `./tools/run-dev`,
|
||||||
you can try running `./tools/provision` again.
|
you can try running `./tools/provision` again.
|
||||||
|
|
||||||
|
|
|
@ -99,8 +99,8 @@ If you haven't already, now is a good time to install the Zulip development envi
|
||||||
source projects in general, we recommend following our [detailed guide for
|
source projects in general, we recommend following our [detailed guide for
|
||||||
first-time contributors][zulip-rtd-dev-first-time].
|
first-time contributors][zulip-rtd-dev-first-time].
|
||||||
|
|
||||||
If you are in the middle of installing the recommended setup on Windows 10,
|
If you are in the middle of installing the recommended setup on Windows 10 or 11,
|
||||||
you are ready to [continue with step 8](../development/setup-recommended.md#windows-10).
|
you are ready to [continue with step 9](../development/setup-recommended.md#windows-10-or-11).
|
||||||
|
|
||||||
## Step 3: Configure continuous integration for your fork
|
## Step 3: Configure continuous integration for your fork
|
||||||
|
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
set -x
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# These services are no longer running when WSL is restarted
|
|
||||||
# and hence they have to be manually started.
|
|
||||||
sudo service rabbitmq-server start
|
|
||||||
sudo service memcached start
|
|
||||||
sudo service redis-server start
|
|
||||||
sudo service postgresql start
|
|
Loading…
Reference in New Issue