Skip to content

Commit

Permalink
Remove Ubuntu 18.04 support.
Browse files Browse the repository at this point in the history
As a consequence:

• Bump minimum supported Python version to 3.7.
• Move Vagrant environment to Debian 10, which has Python 3.7.
• Move CI frontend tests to Debian 10.
• Move production build test to Debian 10.

Signed-off-by: Anders Kaseorg <[email protected]>
  • Loading branch information
andersk authored and timabbott committed Jan 22, 2022
1 parent d035efd commit a58a71e
Show file tree
Hide file tree
Showing 37 changed files with 95 additions and 217 deletions.
32 changes: 5 additions & 27 deletions .github/workflows/production-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ jobs:
production_build:
# This job builds a release tarball from the current commit, which
# will be used for all of the following install/upgrade tests.
name: Bionic production build
name: Debian 10 production build
runs-on: ubuntu-latest

# Docker images are built from 'tools/ci/Dockerfile'; the comments at
# the top explain how to build and upload these images.
# Bionic ships with Python 3.6.
container: zulip/ci:bionic
# Debian 10 ships with Python 3.7.3.
container: zulip/ci:buster
steps:
- name: Add required permissions
run: |
Expand Down Expand Up @@ -83,12 +83,6 @@ jobs:
key: v1-emoji-${{ github.job }}-${{ hashFiles('tools/setup/emoji/emoji_map.json') }}-${{ hashFiles('tools/setup/emoji/build_emoji') }}-${{ hashFiles('tools/setup/emoji/emoji_setup_utils.py') }}-${{ hashFiles('tools/setup/emoji/emoji_names.py') }}-${{ hashFiles('package.json') }}
restore-keys: v1-emoji-${{ github.job }}

- name: Do Bionic hack
run: |
# Temporary hack till `sudo service redis-server start` gets fixes in Bionic. See
# https://chat.zulip.org/#narrow/stream/3-backend/topic/Ubuntu.20bionic.20CircleCI
sudo sed -i '/^bind/s/bind.*/bind 0.0.0.0/' /etc/redis/redis.conf
- name: Build production tarball
run: ./tools/ci/production-build

Expand All @@ -115,27 +109,18 @@ jobs:
include:
# Docker images are built from 'tools/ci/Dockerfile'; the comments at
# the top explain how to build and upload these images.
- docker_image: zulip/ci:bionic
name: Bionic production install with custom db name and user
is_bionic: true
os: bionic
extra_args: --test-custom-db

- docker_image: zulip/ci:focal
name: Focal production install
is_focal: true
os: focal
extra_args: ""

- docker_image: zulip/ci:buster
name: Buster production install
is_buster: true
name: Buster production install with custom db name and user
os: buster
extra_args: ""
extra_args: --test-custom-db

- docker_image: zulip/ci:bullseye
name: Bullseye production install
is_bullseye: true
os: bullseye
extra_args: ""

Expand Down Expand Up @@ -181,13 +166,6 @@ jobs:
key: v1-yarn-deps-${{ matrix.os }}-${{ hashFiles('/tmp/package.json') }}-${{ hashFiles('/tmp/yarn.lock') }}
restore-keys: v1-yarn-deps-${{ matrix.os }}

- name: Do Bionic hack
if: ${{ matrix.is_bionic }}
run: |
# Temporary hack till `sudo service redis-server start` gets fixes in Bionic. See
# https://chat.zulip.org/#narrow/stream/3-backend/topic/Ubuntu.20bionic.20CircleCI
sudo sed -i '/^bind/s/bind.*/bind 0.0.0.0/' /etc/redis/redis.conf
- name: Install production
run: |
sudo service rabbitmq-server restart
Expand Down
20 changes: 6 additions & 14 deletions .github/workflows/zulip-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ jobs:
include:
# Base images are built using `tools/ci/Dockerfile.prod.template`.
# The comments at the top explain how to build and upload these images.
# Bionic ships with Python 3.6.
- docker_image: zulip/ci:bionic
name: Ubuntu 18.04 Bionic (Python 3.6, backend + frontend)
os: bionic
is_bionic: true
# Debian 10 ships with Python 3.7.3.
- docker_image: zulip/ci:buster
name: Debian 10 Buster (Python 3.7, backend + frontend)
os: buster
include_frontend_tests: true
# Focal ships with Python 3.8.2.
- docker_image: zulip/ci:focal
Expand Down Expand Up @@ -79,13 +78,6 @@ jobs:
key: v1-emoji-${{ matrix.os }}-${{ hashFiles('tools/setup/emoji/emoji_map.json') }}-${{ hashFiles('tools/setup/emoji/build_emoji') }}-${{ hashFiles('tools/setup/emoji/emoji_setup_utils.py') }}-${{ hashFiles('tools/setup/emoji/emoji_names.py') }}-${{ hashFiles('package.json') }}
restore-keys: v1-emoji-${{ matrix.os }}

- name: Do Bionic hack
if: ${{ matrix.is_bionic }}
run: |
# Temporary hack till `sudo service redis-server start` gets fixes in Bionic. See
# https://chat.zulip.org/#narrow/stream/3-backend/topic/Ubuntu.20bionic.20CircleCI
sudo sed -i '/^bind/s/bind.*/bind 0.0.0.0/' /etc/redis/redis.conf
- name: Install dependencies
run: |
# This is the main setup job for the test suite
Expand Down Expand Up @@ -135,7 +127,7 @@ jobs:
source tools/ci/activate-venv
# Currently our compiled requirements files will differ for different python versions
# so we will run test-locked-requirements only for Bionic.
# so we will run test-locked-requirements only for Debian 10.
# ./tools/test-locked-requirements
# ./tools/test-run-dev # https://github.com/zulip/zulip/pull/14233
#
Expand Down Expand Up @@ -195,7 +187,7 @@ jobs:
fi
- name: Test locked requirements
if: ${{ matrix.is_bionic }}
if: ${{ matrix.os == 'buster' }}
run: |
. /srv/zulip-py3-venv/bin/activate && \
./tools/test-locked-requirements
Expand Down
19 changes: 9 additions & 10 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Vagrant.configure("2") do |config|
vm_num_cpus = "2"
vm_memory = "2048"

ubuntu_mirror = ""
debian_mirror = ""
vboxadd_version = nil

config.vm.synced_folder ".", "/vagrant", disabled: true
Expand All @@ -32,7 +32,7 @@ Vagrant.configure("2") do |config|
when "HOST_IP_ADDR"; host_ip_addr = value
when "GUEST_CPUS"; vm_num_cpus = value
when "GUEST_MEMORY_MB"; vm_memory = value
when "UBUNTU_MIRROR"; ubuntu_mirror = value
when "DEBIAN_MIRROR"; debian_mirror = value
when "VBOXADD_VERSION"; vboxadd_version = value
end
end
Expand Down Expand Up @@ -63,21 +63,21 @@ Vagrant.configure("2") do |config|
config.vm.provider "docker" do |d, override|
d.build_dir = File.join(__dir__, "tools", "setup", "dev-vagrant-docker")
d.build_args = ["--build-arg", "VAGRANT_UID=#{Process.uid}"]
if !ubuntu_mirror.empty?
d.build_args += ["--build-arg", "UBUNTU_MIRROR=#{ubuntu_mirror}"]
if !debian_mirror.empty?
d.build_args += ["--build-arg", "DEBIAN_MIRROR=#{debian_mirror}"]
end
d.has_ssh = true
d.create_args = ["--ulimit", "nofile=1024:65536"]
end

config.vm.provider "virtualbox" do |vb, override|
override.vm.box = "hashicorp/bionic64"
override.vm.box = "bento/debian-10"
# It's possible we can get away with just 1.5GB; more testing needed
vb.memory = vm_memory
vb.cpus = vm_num_cpus

if !vboxadd_version.nil?
override.vbguest.installer = Class.new(VagrantVbguest::Installers::Ubuntu) do
override.vbguest.installer = Class.new(VagrantVbguest::Installers::Debian) do
define_method(:host_version) do |reload = false|
VagrantVbguest::Version(vboxadd_version)
end
Expand All @@ -88,15 +88,14 @@ Vagrant.configure("2") do |config|
end

config.vm.provider "hyperv" do |h, override|
override.vm.box = "bento/ubuntu-18.04"
override.vm.box = "bento/debian-10"
h.memory = vm_memory
h.maxmemory = vm_memory
h.cpus = vm_num_cpus
end

config.vm.provider "parallels" do |prl, override|
override.vm.box = "bento/ubuntu-18.04"
override.vm.box_version = "202005.21.0"
override.vm.box = "bento/debian-10"
prl.memory = vm_memory
prl.cpus = vm_num_cpus
end
Expand All @@ -105,5 +104,5 @@ Vagrant.configure("2") do |config|
# We want provision to be run with the permissions of the vagrant user.
privileged: false,
path: "tools/setup/vagrant-provision",
env: { "UBUNTU_MIRROR" => ubuntu_mirror }
env: { "DEBIAN_MIRROR" => debian_mirror }
end
2 changes: 1 addition & 1 deletion docs/contributing/code-reviewing.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ sooner is better.
the job to fail by clicking on the failed job. This will open
up a page in the CI that has more details on why the job failed.
For example [this](https://github.com/zulip/zulip/runs/2092955762)
is the page of the `Ubuntu 18.04 Bionic (Python 3.6, backend + frontend)` job.
is the page of the "Debian 10 Buster (Python 3.7, backend + frontend)" job.
See our docs on [continuous integration](../testing/continuous-integration.md)
to learn more.

Expand Down
2 changes: 1 addition & 1 deletion docs/development/setup-advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Contents:
If you'd like to install a Zulip development environment on a computer
that's running one of:

- Ubuntu 20.04 Focal, 18.04 Bionic
- Ubuntu 20.04 Focal
- Debian 10 Buster, 11 Bullseye (beta)
- CentOS 7 (beta)
- Fedora 33 and 34 (beta)
Expand Down
40 changes: 20 additions & 20 deletions docs/development/setup-vagrant.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
## Vagrant environment setup tutorial

This section guides first-time contributors through installing the
Zulip development environment on Windows, macOS, Ubuntu and Debian.
Zulip development environment on Windows, macOS, and Linux.

The recommended method for installing the Zulip development environment is to use
Vagrant with VirtualBox on Windows, and Vagrant with Docker on
macOS and Ubuntu. This method creates a virtual machine (for Windows)
or a Linux container (for macOS and Ubuntu) inside which the Zulip server and
macOS and Linux. This method creates a virtual machine (for Windows)
or a Linux container (for macOS and Linux) inside which the Zulip server and
all related services will run.

Contents:
Expand All @@ -18,7 +18,7 @@ Contents:
- [Step 3: Start the development environment](#step-3-start-the-development-environment)
- [Step 4: Developing](#step-4-developing)
- [Troubleshooting and common errors](#troubleshooting-and-common-errors)
- [Specifying an Ubuntu mirror](#specifying-an-ubuntu-mirror)
- [Specifying a Debian mirror](#specifying-a-debian-mirror)
- [Specifying a proxy](#specifying-a-proxy)
- [Customizing CPU and RAM allocation](#customizing-cpu-and-ram-allocation)

Expand Down Expand Up @@ -49,7 +49,7 @@ a proxy to access the internet.)

- **All**: 2GB available RAM, Active broadband internet connection, [GitHub account][set-up-git].
- **macOS**: macOS (10.11 El Capitan or newer recommended)
- **Ubuntu LTS**: 20.04 or 18.04
- **Ubuntu LTS**: 20.04
- or **Debian**: 10 "buster" or 11 "bullseye"
- **Windows**: Windows 64-bit (Win 10 recommended), hardware
virtualization enabled (VT-x or AMD-V), administrator access.
Expand Down Expand Up @@ -233,7 +233,7 @@ projects and to instead follow these instructions exactly.)
1. In your browser, visit <https://github.com/zulip/zulip>
and click the `fork` button. You will need to be logged in to GitHub to
do this.
2. Open Terminal (macOS/Ubuntu) or Git BASH (Windows; must
2. Open Terminal (macOS/Linux) or Git BASH (Windows; must
**run as an Administrator**).
3. In Terminal/Git BASH,
[clone your fork of the Zulip repository](../git/cloning.html#step-1b-clone-to-your-machine) and
Expand Down Expand Up @@ -285,8 +285,8 @@ vagrant up --provider=docker
The first time you run this command it will take some time because vagrant
does the following:

- downloads the base Ubuntu 18.04 virtual machine image (for macOS and Windows)
or container (for Ubuntu)
- downloads the base Debian 10 virtual machine image (for macOS and Windows)
or container (for Linux)
- configures this virtual machine/container for use with Zulip,
- creates a shared directory mapping your clone of the Zulip code inside the
virtual machine/container at `~/zulip`
Expand Down Expand Up @@ -324,7 +324,7 @@ $ vagrant ssh
You should see output that starts like this:

```console
Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.15.0-54-generic x86_64)
Linux debian-10 4.19.0-18-amd64 #1 SMP Debian 4.19.208-1 (2021-09-29) x86_64
```

Congrats, you're now inside the Zulip development environment!
Expand All @@ -337,7 +337,7 @@ provisioning failed and you should look at the
Next, start the Zulip server:

```console
(zulip-py3-venv) vagrant@ubuntu-bionic:/srv/zulip
(zulip-py3-venv) vagrant@debian-10:/srv/zulip
$ ./tools/run-dev.py
```

Expand Down Expand Up @@ -425,7 +425,7 @@ output.
#### Committing and pushing changes with Git

When you're ready to commit or push changes via Git, you will do this by
running Git commands in Terminal (macOS/Ubuntu) or Git BASH (Windows) in the
running Git commands in Terminal (macOS/Linux) or Git BASH (Windows) in the
directory where you cloned Zulip on your main machine.

If you're new to working with Git/GitHub, check out our [Git & GitHub
Expand Down Expand Up @@ -485,7 +485,7 @@ From the window where run-dev.py is running:
2016-05-04 18:33:13,330 INFO 127.0.0.1 GET 200 92ms /register/ (unauth@zulip via ?)
^C
KeyboardInterrupt
(zulip-py3-venv) vagrant@ubuntu-bionic:/srv/zulip$ exit
(zulip-py3-venv) vagrant@debian-10:/srv/zulip$ exit
logout
Connection to 127.0.0.1 closed.
christie@win10 ~/zulip
Expand Down Expand Up @@ -523,7 +523,7 @@ christie@win10 ~/zulip
$ vagrant up
$ vagrant ssh

(zulip-py3-venv) vagrant@ubuntu-bionic:/srv/zulip
(zulip-py3-venv) vagrant@debian-10:/srv/zulip
$ ./tools/run-dev.py
```

Expand Down Expand Up @@ -788,8 +788,8 @@ by rebooting the guest via `vagrant halt; vagrant up`.

The `vagrant up` command basically does the following:

- Downloads an Ubuntu image and starts it using a Vagrant provider.
- Uses `vagrant ssh` to connect to that Ubuntu guest, and then runs
- Downloads a Debian image and starts it using a Vagrant provider.
- Uses `vagrant ssh` to connect to that Debian guest, and then runs
`tools/provision`, which has a lot of subcommands that are
executed via Python's `subprocess` module. These errors mean that
one of those subcommands failed.
Expand Down Expand Up @@ -823,7 +823,7 @@ Finally, if you encounter any issues that weren't caused by your
Internet connection, please report them! We try hard to keep Zulip
development environment provisioning free of bugs.

##### `pip install` fails during `vagrant up` on Ubuntu
##### `pip install` fails during `vagrant up` on Linux

Likely causes are:

Expand Down Expand Up @@ -918,18 +918,18 @@ vagrant reload
vagrant reload --provision
```

### Specifying an Ubuntu mirror
### Specifying a Debian mirror

Bringing up a development environment for the first time involves
downloading many packages from the Ubuntu archive. The Ubuntu cloud
images use the global mirror `http://archive.ubuntu.com/ubuntu/` by
downloading many packages from the Debian archive. The Debian cloud
images use the global mirror `http://deb.debian.org/debian` by
default, but you may find that you can speed up the download by using
a local mirror closer to your location. To do this, create
`~/.zulip-vagrant-config` and add a line like this, replacing the URL
as appropriate:

```text
UBUNTU_MIRROR http://us.archive.ubuntu.com/ubuntu/
DEBIAN_MIRROR http://ftp.us.debian.org/debian
```

### Specifying a proxy
Expand Down
2 changes: 1 addition & 1 deletion docs/development/test-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ branch, or a significant time has passed since you last used it.
### Test an install

The `test-install` tooling takes a distribution release name
(e.g. "focal" or "bionic"), the path to an unpacked release directory
(e.g. "focal"), the path to an unpacked release directory
or tarball, and then any of the normal options you want to pass down
into the installer.

Expand Down
7 changes: 3 additions & 4 deletions docs/production/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ PostgreSQL 10, 11, 12, and 13 are all supported.

Previous versions of Zulip used whatever version of PostgreSQL was
included with the base operating system (E.g. PostgreSQL 12 on Ubuntu
Focal, 10 on Ubuntu Bionic, and 9.6 on Ubuntu Xenial). We recommend
that installations currently using older PostgreSQL releases [upgrade
to PostgreSQL 14][upgrade-postgresql], as we may drop support for
older PostgreSQL in a future release.
20.04). We recommend that installations currently using older
PostgreSQL releases [upgrade to PostgreSQL 14][upgrade-postgresql], as
we may drop support for older PostgreSQL in a future release.

[upgrade-postgresql]: ../production/upgrade-or-modify.html#upgrading-postgresql

Expand Down
3 changes: 1 addition & 2 deletions docs/production/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ To run a Zulip server, you will need:
- A dedicated machine or VM
- A supported OS:
- Ubuntu 20.04 Focal
- Ubuntu 18.04 Bionic
- Debian 11 Bullseye
- Debian 10 Buster
- At least 2GB RAM, and 10GB disk space
Expand Down Expand Up @@ -34,7 +33,7 @@ on issues you'll encounter](install-existing-server.md).

#### Operating system

Ubuntu 20.04 Focal, 18.04 Bionic, Debian 11 Bullseye, and Debian 10
Ubuntu 20.04 Focal, Debian 11 Bullseye, and Debian 10
Buster are supported for running Zulip in production. You can also
run Zulip on other platforms that support Docker using
[docker-zulip][docker-zulip-homepage].
Expand Down
Loading

0 comments on commit a58a71e

Please sign in to comment.