Upgrade rcstack#

It’s usually recommended to start with updating the installer itself by running:

./rcstack self-update

Note

It’s possible to change the update channel, or update to only specific versions. This can be done by providing extra flags to self-update

# upgrade to master branch release line
./rcstack self-update --force --cli-revision master --docker-revision master

# upgrade to a specific version corresponding to a git tag
./rcstack self-update --force --cli-revision v5.3.0 --docker-revision v5.3.0

Upgrade of services#

Then upgrade each stack based on instructions provided from the help output:

./rcstack stack-upgrade <STACK_NAME>

Note

./rcstack stack-upgrade rhodecode is a 0 downtime upgrade procedure. This will spawn 2x more nodes to perform the upgrade and then remove the old instances. This way all incoming traffic will be handled continuously without any interruptions on upgrade

Example for full upgrade procedure:

./rcstack self-update
./rcstack stack-upgrade router
./rcstack stack-upgrade services
./rcstack stack-upgrade rhodecode
./rcstack stack-upgrade metrics

Note

./rcstack stack-upgrade does scaling of services which might use more RAM to handle the double instance amount. To avoid that stop each stack before running stack upgrade. This way services get upgraded without 2x scaling. This method however would cause a downtime.

./rcstack self-update
./rcstack stack router down && ./rcstack stack-upgrade router
./rcstack stack services down && ./rcstack stack-upgrade services
./rcstack stack rhodecode down && ./rcstack stack-upgrade rhodecode
./rcstack stack metrics down && ./rcstack stack-upgrade metrics

The above upgrade uses default timeouts to wait for any currently ongoing traffic to stop to kill the workers. There are two additional flags that can be used for a faster upgrade that could let to end users errors, or small downtime but will enforce the upgrade to be performed as fast as possible.

Fast upgrade with max 65s wait time after new upgraded containers start, and wait 5s before force killing old containers. This is still 0 downtime upgrade, but stoping existing containers is forced to 5s which might result in killed ongoing connections

./rcstack stack-upgrade rhodecode --stop-wait 65 --docker-stop-wait 5

Install specific version of RhodeCode#

In order to run a specific version of RhodeCode stack simply follow this:

./rcstack cli set-runtime-image 5.0.0
./rcstack stack all down
./rcstack stack all up -d