docs: Cleanup setup-recommended.md.

For consistency, using `console` instead of `bash` to show commands to run, and dropping the name "christie" from examples.
This commit is contained in:
Robert Dyer
2024-03-12 14:13:59 -05:00
committed by Tim Abbott
parent e367718283
commit 32c8d89eeb
6 changed files with 64 additions and 76 deletions

View File

@@ -93,7 +93,6 @@ Now you are ready for [Step 2: Get Zulip code](#step-2-get-zulip-code).
##### 1. Install Vagrant, Docker, and Git ##### 1. Install Vagrant, Docker, and Git
```console ```console
christie@ubuntu-desktop:~
$ sudo apt install vagrant docker.io git $ sudo apt install vagrant docker.io git
``` ```
@@ -136,20 +135,20 @@ installation method described here. We require version 0.67.6+ of WSL 2.
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 ```console
sudo apt update && sudo apt upgrade $ sudo apt update && sudo apt upgrade
``` ```
1. Install dependencies with the following command: 1. Install dependencies with the following command:
```bash ```console
sudo apt install rabbitmq-server memcached redis-server postgresql $ sudo apt install rabbitmq-server memcached redis-server postgresql
``` ```
1. Open `/etc/rabbitmq/rabbitmq-env.conf` using e.g.: 1. Open `/etc/rabbitmq/rabbitmq-env.conf` using e.g.:
```bash ```console
sudo nano /etc/rabbitmq/rabbitmq-env.conf $ sudo nano /etc/rabbitmq/rabbitmq-env.conf
``` ```
Confirm the following lines are at the end of your file, and add Confirm the following lines are at the end of your file, and add
@@ -163,10 +162,10 @@ installation method described here. We require version 0.67.6+ of WSL 2.
1. Run the command below to make sure you are inside the WSL disk and not 1. Run the command below to make sure you are inside the WSL disk and not
in a Windows mounted disk. You will run into permission issues if you in a Windows mounted disk. You will run into permission issues if you
run `provision` from `zulip` in a Windows mounted disk. run `./tools/provision` from `zulip` in a Windows mounted disk.
```bash ```console
cd ~ # or cd /home/USERNAME $ cd ~ # or cd /home/USERNAME
``` ```
1. [Create your fork](../git/cloning.md#step-1a-create-your-fork) of 1. [Create your fork](../git/cloning.md#step-1a-create-your-fork) of
@@ -179,23 +178,23 @@ installation method described here. We require version 0.67.6+ of WSL 2.
1. Clone and connect to the Zulip upstream repository: 1. Clone and connect to the Zulip upstream repository:
```bash ```console
git clone --config pull.rebase git@github.com:YOURUSERNAME/zulip.git ~/zulip $ git clone --config pull.rebase git@github.com:YOURUSERNAME/zulip.git ~/zulip
cd zulip $ cd zulip
git remote add -f upstream https://github.com/zulip/zulip.git $ git remote add -f upstream https://github.com/zulip/zulip.git
``` ```
1. Run the following to install the Zulip development environment and 1. Run the following to install the Zulip development environment and
start it. (If Windows Firewall creates popups to block services, start it. (If Windows Firewall creates popups to block services,
simply click **Allow access**.) simply click **Allow access**.)
```bash ```console
# 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
source /srv/zulip-py3-venv/bin/activate $ source /srv/zulip-py3-venv/bin/activate
# Start the development server $ # Start the development server
./tools/run-dev $ ./tools/run-dev
``` ```
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`,
@@ -206,8 +205,8 @@ installation method described here. We require version 0.67.6+ of WSL 2.
recommended for editing files when developing with WSL. When you recommended for editing files when developing with WSL. When you
have it installed, you can run: have it installed, you can run:
```bash ```console
code . $ code .
``` ```
to open VS Code connected to your WSL environment. to open VS Code connected to your WSL environment.
@@ -232,10 +231,10 @@ WSL 2 can be uninstalled by following [Microsoft's documentation][uninstall-wsl]
[clone your fork of the Zulip repository](../git/cloning.md#step-1b-clone-to-your-machine) and [clone your fork of the Zulip repository](../git/cloning.md#step-1b-clone-to-your-machine) and
[connect the Zulip upstream repository](../git/cloning.md#step-1c-connect-your-fork-to-zulip-upstream): [connect the Zulip upstream repository](../git/cloning.md#step-1c-connect-your-fork-to-zulip-upstream):
```bash ```console
git clone --config pull.rebase git@github.com:YOURUSERNAME/zulip.git $ git clone --config pull.rebase git@github.com:YOURUSERNAME/zulip.git
cd zulip $ cd zulip
git remote add -f upstream https://github.com/zulip/zulip.git $ git remote add -f upstream https://github.com/zulip/zulip.git
``` ```
This will create a `zulip` directory and download the Zulip code into it. This will create a `zulip` directory and download the Zulip code into it.
@@ -263,15 +262,15 @@ environment](#step-3-start-the-development-environment).
Change into the zulip directory and tell Vagrant to start the Zulip Change into the zulip directory and tell Vagrant to start the Zulip
development environment with `vagrant up`: development environment with `vagrant up`:
```bash ```console
# On Windows: $ # On Windows:
cd zulip $ cd zulip
vagrant plugin install vagrant-vbguest $ vagrant plugin install vagrant-vbguest
vagrant up --provider=virtualbox $ vagrant up --provider=virtualbox
# On macOS or Linux: $ # On macOS or Linux:
cd zulip $ cd zulip
vagrant up --provider=docker $ vagrant up --provider=docker
``` ```
:::{warning} :::{warning}
@@ -436,9 +435,9 @@ was:
If this error starts happening unexpectedly, then just run: If this error starts happening unexpectedly, then just run:
```bash ```console
vagrant halt $ vagrant halt
vagrant up $ vagrant up
``` ```
to reboot the guest. After this, you can do `vagrant provision` and to reboot the guest. After this, you can do `vagrant provision` and
@@ -467,8 +466,8 @@ When running `vagrant up` or `provision`, if you see the following error:
It means that your local apt repository has been corrupted, which can It means that your local apt repository has been corrupted, which can
usually be resolved by executing the command: usually be resolved by executing the command:
```bash ```console
apt-get -f install $ apt-get -f install
``` ```
#### ssh connection closed by remote host #### ssh connection closed by remote host
@@ -531,11 +530,9 @@ then print out the custom settings for this virtual machine with
`vboxmanage getextradata YOURVMNAME enumerate`: `vboxmanage getextradata YOURVMNAME enumerate`:
```console ```console
christie@win10 ~/zulip
$ vboxmanage list vms $ vboxmanage list vms
"zulip_default_1462498139595_55484" {5a65199d-8afa-4265-b2f6-6b1f162f157d} "zulip_default_1462498139595_55484" {5a65199d-8afa-4265-b2f6-6b1f162f157d}
christie@win10 ~/zulip
$ vboxmanage getextradata zulip_default_1462498139595_55484 enumerate $ vboxmanage getextradata zulip_default_1462498139595_55484 enumerate
Key: VBoxInternal2/SharedFoldersEnableSymlinksCreate/srv_zulip, Value: 1 Key: VBoxInternal2/SharedFoldersEnableSymlinksCreate/srv_zulip, Value: 1
Key: supported, Value: false Key: supported, Value: false
@@ -549,8 +546,8 @@ If `vboxmanage enumerate` prints nothing, or shows a value of 0 for
VBoxInternal2/SharedFoldersEnableSymlinksCreate/srv_zulip, then enable VBoxInternal2/SharedFoldersEnableSymlinksCreate/srv_zulip, then enable
symbolic links by running this command in Terminal/Git BASH/Cygwin: symbolic links by running this command in Terminal/Git BASH/Cygwin:
```bash ```console
vboxmanage setextradata YOURVMNAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/srv_zulip 1 $ vboxmanage setextradata YOURVMNAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/srv_zulip 1
``` ```
The virtual machine needs to be shut down when you run this command. The virtual machine needs to be shut down when you run this command.
@@ -564,7 +561,6 @@ Virtualbox as the virtualization provider. You can fix this by
explicitly passing the virtualbox provider to `vagrant up`: explicitly passing the virtualbox provider to `vagrant up`:
```console ```console
christie@win10 ~/zulip
$ vagrant up --provide=virtualbox $ vagrant up --provide=virtualbox
``` ```
@@ -645,7 +641,7 @@ Once you've provisioned successfully, you'll get output like this:
```console ```console
Zulip development environment setup succeeded! Zulip development environment setup succeeded!
(zulip-py3-venv) vagrant@vagrant-base-trusty-amd64:~/zulip$ (zulip-py3-venv) vagrant@vagrant:/srv/zulip$
``` ```
If the `(zulip-py3-venv)` part is missing, this is because your If the `(zulip-py3-venv)` part is missing, this is because your
@@ -714,8 +710,8 @@ the VirtualBox Guest Additions for Linux on Windows hosts. You can
check the running version of VirtualBox Guest Additions with this check the running version of VirtualBox Guest Additions with this
command: command:
```bash ```console
vagrant ssh -- 'sudo modinfo -F version vboxsf' $ vagrant ssh -- 'sudo modinfo -F version vboxsf'
``` ```
The bug has not been fixed upstream as of this writing, but you may be The bug has not been fixed upstream as of this writing, but you may be
@@ -729,10 +725,10 @@ VBOXADD_VERSION 5.2.44
Then run these commands (yes, reload is needed twice): Then run these commands (yes, reload is needed twice):
```bash ```console
vagrant plugin install vagrant-vbguest $ vagrant plugin install vagrant-vbguest
vagrant reload $ vagrant reload
vagrant reload --provision $ vagrant reload --provision
``` ```
### Specifying an Ubuntu mirror ### Specifying an Ubuntu mirror
@@ -755,8 +751,8 @@ If you need to use a proxy server to access the Internet, you will
need to specify the proxy settings before running `vagrant up`. need to specify the proxy settings before running `vagrant up`.
First, install the Vagrant plugin `vagrant-proxyconf`: First, install the Vagrant plugin `vagrant-proxyconf`:
```bash ```console
vagrant plugin install vagrant-proxyconf $ vagrant plugin install vagrant-proxyconf
``` ```
Then create `~/.zulip-vagrant-config` and add the following lines to Then create `~/.zulip-vagrant-config` and add the following lines to

View File

@@ -1,10 +1,9 @@
##### 2. Add yourself to the `docker` group: ##### 2. Add yourself to the `docker` group:
```console ```console
christie@ubuntu-desktop:~
$ sudo adduser $USER docker $ sudo adduser $USER docker
Adding user `christie' to group `docker' ... Adding user `YOURUSERNAME' to group `docker' ...
Adding user christie to group docker Adding user YOURUSERNAME to group docker
Done. Done.
``` ```
@@ -12,9 +11,8 @@ You will need to reboot for this change to take effect. If it worked,
you will see `docker` in your list of groups: you will see `docker` in your list of groups:
```console ```console
christie@ubuntu-desktop:~
$ groups | grep docker $ groups | grep docker
christie adm cdrom sudo dip plugdev lpadmin sambashare docker YOURUSERNAME adm cdrom sudo dip plugdev lpadmin sambashare docker
``` ```
##### 3. Make sure the Docker daemon is running: ##### 3. Make sure the Docker daemon is running:
@@ -36,8 +34,8 @@ If the service is not running, you'll see `Active: inactive (dead)` on
the second line, and will need to enable and start the Docker service the second line, and will need to enable and start the Docker service
using the following: using the following:
```bash ```console
sudo systemctl unmask docker $ sudo systemctl unmask docker
sudo systemctl enable docker $ sudo systemctl enable docker
sudo systemctl start docker $ sudo systemctl start docker
``` ```

View File

@@ -14,13 +14,12 @@ KeyboardInterrupt
(zulip-py3-venv) vagrant@vagrant:/srv/zulip$ exit (zulip-py3-venv) vagrant@vagrant:/srv/zulip$ exit
logout logout
Connection to 127.0.0.1 closed. Connection to 127.0.0.1 closed.
christie@win10 ~/zulip $
``` ```
Now you can suspend the development environment: Now you can suspend the development environment:
```console ```console
christie@win10 ~/zulip
$ vagrant suspend $ vagrant suspend
==> default: Saving VM state and suspending execution... ==> default: Saving VM state and suspending execution...
``` ```
@@ -28,7 +27,6 @@ $ vagrant suspend
If `vagrant suspend` doesn't work, try `vagrant halt`: If `vagrant suspend` doesn't work, try `vagrant halt`:
```console ```console
christie@win10 ~/zulip
$ vagrant halt $ vagrant halt
==> default: Attempting graceful shutdown of VM... ==> default: Attempting graceful shutdown of VM...
``` ```

View File

@@ -4,10 +4,8 @@ connect to the virtual machine with `vagrant ssh` and re-start the
Zulip server: Zulip server:
```console ```console
christie@win10 ~/zulip
$ vagrant up $ vagrant up
$ vagrant ssh $ vagrant ssh
(zulip-py3-venv) vagrant@vagrant:/srv/zulip (zulip-py3-venv) vagrant@vagrant:/srv/zulip$ ./tools/run-dev
$ ./tools/run-dev
``` ```

View File

@@ -1,8 +1,7 @@
Once `vagrant up` has completed, connect to the development Once `vagrant up` has completed, connect to the development environment
environment with `vagrant ssh`: with `vagrant ssh`:
```console ```console
christie@win10 ~/zulip
$ vagrant ssh $ vagrant ssh
``` ```
@@ -22,8 +21,7 @@ provisioning failed and you should look at the
Next, start the Zulip server: Next, start the Zulip server:
```console ```console
(zulip-py3-venv) vagrant@vagrant:/srv/zulip (zulip-py3-venv) vagrant@vagrant:/srv/zulip$ ./tools/run-dev
$ ./tools/run-dev
``` ```
You will see something like: You will see something like:

View File

@@ -6,8 +6,8 @@ does the following:
- configures this virtual machine/container for use with Zulip, - configures this virtual machine/container for use with Zulip,
- creates a shared directory mapping your clone of the Zulip code inside the - creates a shared directory mapping your clone of the Zulip code inside the
virtual machine/container at `~/zulip` virtual machine/container at `~/zulip`
- runs the `tools/provision` script inside the virtual machine/container, which - runs the `./tools/provision` script inside the virtual machine/container, which
downloads all required dependencies, sets up the python environment for downloads all required dependencies, sets up the Python environment for
the Zulip development server, and initializes a default test the Zulip development server, and initializes a default test
database. We call this process "provisioning", and it is documented database. We call this process "provisioning", and it is documented
in some detail in our [dependencies documentation](/subsystems/dependencies.md). in some detail in our [dependencies documentation](/subsystems/dependencies.md).