2021-06-07 09:12:58 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# Given a Zulip production environment that had been installed with a
|
|
|
|
# previous version of Zulip, upgrade it to the commit being tested.
|
|
|
|
# This takes as input the tarball generated by production-build.
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
2021-11-29 22:53:18 +01:00
|
|
|
# Start the services that would be running on a working Zulip host;
|
|
|
|
# since this is a container, these services are not started
|
|
|
|
# automatically.
|
2021-06-07 09:12:58 +02:00
|
|
|
|
|
|
|
# Start the postgresql service.
|
|
|
|
sudo service postgresql start
|
|
|
|
|
|
|
|
# Starting the rabbitmq-server
|
2021-11-29 22:53:18 +01:00
|
|
|
epmd -daemon
|
|
|
|
sudo service rabbitmq-server start
|
2021-06-07 09:12:58 +02:00
|
|
|
|
2021-07-28 09:56:02 +02:00
|
|
|
# Start the supervisor
|
|
|
|
sudo service supervisor start
|
2021-06-07 09:12:58 +02:00
|
|
|
|
|
|
|
# Zulip releases before 2.1.8/3.5/4.4 have a bug in their
|
|
|
|
# `upgrade-zulip` scripts, resulting in them exiting with status 0
|
|
|
|
# unconditionally. We work around that by running
|
|
|
|
# scripts/lib/upgrade-zulip instead.
|
|
|
|
UPGRADE_SCRIPT=/home/zulip/deployments/current/scripts/lib/upgrade-zulip
|
|
|
|
|
|
|
|
# Execute the upgrade.
|
|
|
|
sudo "$UPGRADE_SCRIPT" /tmp/zulip-server-test.tar.gz
|