Files
zulip/tools/ci/production-upgrade
Alex Vandiver 63d2565467 ci: Do not pre-install rabbitmq-server in Docker images.
Before Zulip 4.9, the Zulip install process left any already-installed
rabbitmq with whatever nodename it had previously configured.  Wince
this encodes the name of the host when it was installed, this does not
function well with containers.

Leave rabbitmq-server uninstalled, which lets the Zulip installation
process set the nodename to `localhost`, which ensures that it is
usable across container restarts.
2022-10-25 14:53:32 -04:00

30 lines
943 B
Bash

#!/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
# Start the services that would be running on a working Zulip host;
# since this is a container, these services are not started
# automatically.
# Start the postgresql service.
sudo service postgresql start
# Starting the rabbitmq-server
epmd -daemon
sudo service rabbitmq-server start
# Start the supervisor
sudo service supervisor start
# 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