Upgrade Run:ai¶
Important
Run:ai data is stored in Kubernetes persistent volumes (PVs). Prior to Run:ai 2.12, PVs are owned by the Run:ai installation. Thus, uninstalling the runai-backend
helm chart may delete all of your data.
From version 2.12 forward, PVs are owned the customer and are independent of the Run:ai installation. As such, they are subject to storage class reclaim policy.
Preparations¶
Helm¶
Run:ai requires Helm 3.14 or later. Before you continue, validate your installed helm client version. To install or upgrade Helm, see Installing Helm. If you are installing an air-gapped version of Run:ai, The Run:ai tar file contains the helm binary.
Software files¶
Run the helm command below:
- Ask for a tar file
runai-air-gapped-<NEW-VERSION>.tar.gz
from Run:ai customer support. The file contains the new version you want to upgrade to.<NEW-VERSION>
is the updated version of the Run:ai control plane. - Upload the images as described here.
Before upgrade¶
Before proceeding with the upgrade, it's crucial to apply the specific prerequisites associated with your current version of Run:ai and every version in between up to the version you are upgrading to.
Upgrade from version 2.7 or 2.8¶
Before upgrading the control plane, run:
POSTGRES_PV=$(kubectl get pvc pvc-postgresql -n runai-backend -o jsonpath='{.spec.volumeName}')
kubectl patch pv $POSTGRES_PV -p '{"spec":{"persistentVolumeReclaimPolicy":"Retain"}}'
kubectl delete secret -n runai-backend runai-backend-postgresql
kubectl delete sts -n runai-backend keycloak runai-backend-postgresql
Then upgrade the control plane as described below. Before upgrading, find customizations and merge them as discussed below.
Upgrade from version 2.9, 2.10 or 2.11¶
Two significant changes to the control-plane installation have happened with version 2.12: PVC ownership and installation customization.
PVC ownership¶
Run:ai will no longer directly create the PVCs that store Run:ai data (metrics and database). Instead, going forward,
- Run:ai requires a Kubernetes storage class to be installed.
- The PVCs are created by the Kubernetes StatefulSets.
The storage class, as per Kubernetes standards, controls the reclaim behavior: whether the data is saved or deleted when the Run:ai control plane is deleted.
To remove the ownership in an older installation, run:
kubectl patch pvc -n runai-backend pvc-postgresql -p '{"metadata": {"annotations":{"helm.sh/resource-policy": "keep"}}}'
Installation customization¶
The Run:ai control-plane installation has been rewritten and is no longer using a backend values file. Instead, to customize the installation use standard --set
flags. If you have previously customized the installation, you must now extract these customizations and add them as --set
flag to the helm installation:
- Find previous customizations to the control plane if such exist. Run:ai provides a utility for that here
https://raw.githubusercontent.com/run-ai/docs/v2.13/install/backend/cp-helm-vals-diff.sh
. For information on how to use this utility please contact Run:ai customer support. - Search for the customizations you found in the optional configurations table and add them in the new format.
Upgrade Control Plane¶
Upgrade from version 2.13, or later¶
Upgrade from version 2.7, 2.8, 2.9, or 2.11¶
helm upgrade -i runai-backend -n runai-backend runai-backend/control-plane \
--set global.domain=runai.apps.<OPENSHIFT-CLUSTER-DOMAIN> \ #(1)
--set global.config.kubernetesDistribution=openshift \
--set thanos.query.stores={thanos-grpc-port-forwarder:10901} \
--set postgresql.primary.persistence.existingClaim=pvc-postgresql
- The subdomain configured for the OpenShift cluster.
Note
The helm repository name has changed from runai-backend/runai-backend
to runai-backend/control-plane
.
helm upgrade -i runai-backend ./control-plane-<NEW-VERSION>.tgz -n runai-backend \
--set global.domain=runai.apps.<OPENSHIFT-CLUSTER-DOMAIN> \ #(1)
--set global.config.kubernetesDistribution=openshift \
--set thanos.query.stores={thanos-grpc-port-forwarder:10901} \
--set postgresql.primary.persistence.existingClaim=pvc-postgresql
- The subdomain configured for the OpenShift cluster.
Upgrade Cluster¶
To upgrade the cluster follow the instructions here.