Take a consistent backup before every upgrade, with Ayakaleaf Pro stopped. Read the release notes for steps of the version you upgrade to.
sudo docker pull.
- One replica
- Several replicas
1
Stop Ayakaleaf Pro
2
Back up
MongoDB, from any member:The data volume, through a short-lived pod that mounts it (it lands on the volume’s node):Do the same for git-bridge’s volume (
data-git-bridge-0), and keep a copy of the Secret overleaf-secrets. If your storage supports VolumeSnapshots, a snapshot of the volumes does the same.3
Change the version and start
Set the new tag in The Deployment uses
40-overleaf.yaml (and in 45-git-bridge.yaml, which must use the same tag), then:strategy: Recreate, so even a changed tag never runs two versions at once.MongoDB and Redis
Upgrade them separately from Ayakaleaf Pro. For MongoDB, follow Updating MongoDB (one major version at a time,featureCompatibilityVersion after each step); a replica set takes the new image one member at a time when you change the image in 10-mongo.yaml, because the StatefulSet replaces mongo-2, mongo-1 and mongo-0 in turn.
Rolling back
Stop Ayakaleaf Pro as above, restore MongoDB from the archive (mongorestore --drop --archive --gzip) and the volumes or buckets from the backup, set the old tag and start again. The new version’s migrations cannot be undone otherwise.
Q&A
A replica stays not ready, and the other replicas never start
A replica stays not ready, and the other replicas never start
Answer: With We ran into this on our test cluster after a setting kept
podManagementPolicy: OrderedReady, overleaf-1 only starts once overleaf-0 is ready, and a rolling update does not replace a pod that never became ready. After you fixed the cause, for example a wrong setting in the ConfigMap, delete the stuck pod so that the StatefulSet creates it again from the current template:overleaf-0 from becoming ready; deleting the pod let all three replicas start.
