-
Notifications
You must be signed in to change notification settings - Fork 31
Upgrading Oracle database
Build the latest version of the rucio-upgrade container and push to docker hub. Dockerfile and instructions are here: https://github.com/dmwm/CMSRucio/tree/master/docker/rucio-upgrade
Set your kubernetes cluster to an un-upgraded version of the same instance (int, dev, prod, etc). by setting KUBECONFIG correctly (see https://github.com/dmwm/CMSRucio/wiki/Rucio-instances.) on lxplus-cloud.cern.ch
. Double check with kubectl get nodes
and kubectl get pods
that you are in the right place. You can do kubectl get pods -o yaml [some daemon]
to check the current running version.
Edit int_upgrade.yaml to require the NEW version (the container built in the first step).
Start a pod with kubectl apply -f int_upgrade.yaml
(The file is here https://github.com/dmwm/CMSRucio/blob/master/RucioOps/int_upgrade.yaml for integration, look for or create one for other instances.)
Login to the database or otherwise find the latest alembic version (from the table alembic_version) $ALEMVER
Log into the running pod
kubectl exec -it rucio-upgrade-[hash]-[hash] -- /bin/bash
Edit the resulting alembic.ini file to point to the correct version_table_schema (depends on the instance).
Run the commands
export ALEMVER=[alembic version hash from above]
and
alembic upgrade $ALEMVER:head --sql
Save and inspect the results
Apply it with SQLPlus or another route after inspection
Remove the deployment from Kubernetes with kubectl delete deployment rucio-upgrade