Chapter 10. Red Hat Quay upgrade guide

This document describes how to upgrade one or more Quay containers.

10.1. Backup the Quay database

The database is the "source of truth" for Quay, and some version upgrades will trigger a schema update and data migration. Such versions are clearly documented in the Red Hat Quay Release Notes.

Backup the database before upgrading Quay. Once the backup completes, use the procedure in this document to stop the running Quay container, start the new container, and check the health of the upgraded Quay service.

10.2. Provide Quay credentials to the Docker client

# docker login quay.io

10.3. Pull the latest Quay release from the repository.

Check the list of Red Hat Quay releases for the latest version.

# docker pull quay.io/coreos/registry:RELEASE_VERSION

Replace RELEASE VERSION with the desired version of Quay.

10.4. Find the running Quay container ID

# docker ps -a

The Quay image will be labeled quay.io/coreos/registry.

10.5. Stop the existing Quay container

# docker stop QE_CONTAINER_ID

10.6. Start the new Quay container

# docker run --restart=always -p 443:443 -p 80:80 --privileged=true \
   -v /mnt/quay/config:/conf/stack \
   -v /mnt/quay/storage:/datastorage \
   -d quay.io/coreos/registry:RELEASE_VERSION

Replace /local/path/to/config/directory and /local/path/to/storage/directory with the absolute paths to those directories on the host. Replace RELEASE_VERSION with the desired Quay version.

Rarely, but occasionally, the new Quay version may perform a database schema upgrade and migration. Versions requiring such database migrations will take potentially much longer to start the first time. These versions are clearly documented in the Red Hat Quay Release Notes, which should be consulted before each Quay upgrade.

10.7. Check the health of the upgraded container

Visit the /health/endtoend endpoint on the registry hostname and verify that the code is 200 and is_testing is false.

10.8. Upgrade the rest of the containers in the cluster.

If the upgraded container is healthy, repeat this process for all remaining Quay containers.