Once you have access to your Kubernetes cluster, you can deploy FTS3 for a given overlay (found in overlays/[dev,prod]) using the Makefile found there with (most simply)
make apply
This will use kustomizations to create or update fts3 and fts3-db namespaces and the resources to run an FTS3 application in those namespaces. FTS3 application containers will run in the fts3 namespace, while the fts3-db namespace is used for a MariaDB Kubernetes operator managed MySQL-compliant database.
This framework uses kustomize to allow modification of YAML templates at deployment time.
-
(optional if only backing up configuration) Seet fts3 servers in Drain Mode (done via rest config ui /config)
-
(optional if only backup up configuration) Scale down fts3 deployments to 0
-
Manually back up the database in the primary database replica (with
mariadb-dump). Copy the resulting .sql file to a local machine
kubectl cp -n <namespace> <fts3-db-pod>:/tmp/backup.sql backup.sql --retries=10
-
Deploy a new
MariaDBcustom resource defining a database cluster with one replica to the same namespace -
Deploy a
Backupcustom resource to this new “cluster”. This creates aPersistentVolumeClaimcontaining the backup -
Deploy a temporary pod that mounts the
BackupPVC -
Copy the mariadb-dump .sql file to this temporary pod and into the mounted PVC. Replace the existing .sql file from the Backup with the manually backed up .sql mariadb-dump
-
Delete the temporary pod
-
Deploy a
Restorecustom resource that points to the new MariaDB cluster and the Backup PVC. -
Switching the database connection string for fts3 to point to the new MariaDB cluster.