Manual upgrade steps by version
Complete the manual steps that each version of the AWS Terraform package needs in addition to the standard upgrade.
Read time 50 minutesLast updated 8 hours ago
Use this page to complete the manual steps that an existing deployment of the AWS Terraform package needs when it upgrades to a release. These steps are in addition to the standard upgrade. The newest release comes first, and a release that needs no such step has no section. For everything else that each release changes, refer to the release notes.
When you upgrade across several releases, complete the section of every release after your current one, up to and including your target, oldest first.
Version 1.5.0
Decide which items apply to your deployment
Each move away from a data store is a maintenance window of its own. This order keeps each window short and checks each move before the next:
- On your 1.4.x package, move Elasticsearch to Elastic Cloud on Kubernetes (ECK), including retiring the old cluster.
- On your 1.4.x package, move MongoDB into the cluster. Change Keycloak's admin password in the console in the same window, as Keep Keycloak's admin password describes.
- Optionally, still on 1.4.x, move PostgreSQL from Amazon Relational Database Service (RDS) into the cluster, as Move PostgreSQL on 1.4.x before you upgrade describes. The 1.5 window is then shorter. Until you upgrade, PostgreSQL backs up to a volume in the cluster, not to Amazon Simple Storage Service (S3), so keep RDS and its snapshot until the upgrade is verified.
- Upgrade to this release in one window: the RabbitMQ queue check, the apply, the workflow artifacts copy, the collaboration data move, and PostgreSQL if it is still on RDS.
Most deployments need only some of the items in this section. Start at the top of the chart and follow the answers:
The chart shows these decisions:
- If you still run the chart, move Elasticsearch to ECK first. Then set
elasticsearch.enable_elasticsearch = false - If MongoDB runs on a virtual machine or outside the cluster, move it into the cluster first. Then set and leave
enable_mongo = falseunset.mongo_connection_uri - Keep Keycloak's admin password, let any workloads of your own that call Mini-USF connect through its network policy, and add missing RabbitMQ queue replicas before you run .
make apply-<YOUR_REGION> - If PostgreSQL still runs on Amazon RDS, choose whether to move it on 1.4.x first or during the 1.5 upgrade. If you already moved it on 1.4.x, upgrade after that move.
- Copy workflow artifacts before the deploy, and move collaboration data to PostgreSQL during it.
Move Elasticsearch to ECK before you upgrade
This release always runs Elasticsearch on ECK, and no longer has the chart or the script that copies its data. Set in your Terraform variables file (). The plan stops while the variable is missing or .
elasticsearchenable_elasticsearch = falsetfvars/<YOUR_REGION>.tfvarstrueTo move Elasticsearch to ECK before you upgrade, complete these steps:
-
Before you extract this release, check whether your deployment still runs thechart:
elasticsearchkubectl -n asset-solutions get statefulset elasticsearch-master -
If the command finds the, use your 1.4.x package to complete Migrate Elasticsearch to the ECK operator first, including retiring the existing cluster.
StatefulSet -
If Argo CD deploys the charts, check that ECK has its credentials after the first reapply in that procedure, before you stop writes:kubectl -n asset-solutions get secret elasticsearch-apps-credentialsYour 1.4.xcreates this
cluster-configonly during a sync operation, which Argo CD doesn't start when nothing else inSecretchanged. If thecluster-configis missing, syncSecretonce, either in the Argo CD UI or by runningcluster-config, and check again. Without it, ECK has noargocd app sync cluster-configuser, and the copy can't sign in.unity-apps -
Setin your Terraform variables file, if it isn't already.
enable_elasticsearch = false
After you upgrade and verify the upgrade, complete these steps:
-
Delete the
elasticsearch-master-*objects, which this command lists:PersistentVolumeClaimkubectl -n asset-solutions get pvc | grep elasticsearch-master -
Delete theobjects that the claims leave
PersistentVolume, and the Amazon Elastic Block Store (EBS) volumes behind them, which theReleasedstorage class retains. Thegp3field of eachspec.csi.volumeHandleis the ID of its EBS volume.PersistentVolume
Move MongoDB into the cluster before you upgrade
This release always runs MongoDB in the cluster, as Percona Server for MongoDB (), and removes the Amazon Elastic Compute Cloud (EC2) instance that ran MongoDB, and its data volume. Terraform builds the in-cluster connection itself. Set in your Terraform variables file, and leave unset. The plan stops while is missing or , or while is set in that file or as .
psmdb-dbenable_mongo = falsemongo_connection_urienable_mongotruemongo_connection_uriTF_VAR_mongo_connection_uriTo move MongoDB into the cluster before you upgrade, complete these steps:
-
If your services still use the MongoDB EC2 instance (is
enable_mongoin your Terraform variables file), use your 1.4.x package to complete Migrate your data to Percona Server for MongoDB before you extract this release.true -
Ifpoints at a MongoDB outside the cluster, move that data into the cluster the same way.
mongo_connection_uri -
Setin your Terraform variables file, if it isn't already.
enable_mongo = false -
Delete.
mongo_connection_uriIt namesif you followed earlier steps that set it.psmdb-db-rs0
Your 1.4.x package created an and a for the MongoDB EC2 instance's certificate authority (CA) certificate. This release no longer declares them or writes the value they read, so the reports , and nothing uses it. Neither Argo CD nor Helm removes them, because 1.4.x created them as Helm hooks.
ExternalSecretSecretStoremongo_pem_fileExternalSecretSecretSyncedErrorAfter you upgrade and verify the upgrade, complete these steps:
-
Delete the, and the
ExternalSecretmongo-ca-certificate-pemgoes with it:Secretkubectl -n asset-solutions delete externalsecret mongo-ca-certificate-pem -
Delete the:
SecretStorekubectl -n asset-solutions delete secretstore mongo-ca-certificate-pem-secret-store
Keep Keycloak's admin password
This item applies to every existing deployment. Keycloak's admin password now comes from the Terraform variable, or a password Terraform generates when you leave it empty, but an existing deployment's Keycloak keeps the admin password it already has, which is unless you changed it. Until the two match, anything that signs in with the secret's password is refused.
keycloak_admin_passwordchange-in-uikeycloak-adminTo keep Keycloak's admin password, complete these steps before you run :
make apply-<YOUR_REGION>-
If Keycloak'spassword is still
admin, go to Users in the master realm of the Keycloak admin console.change-in-uiIf you already changed the password, skip the steps that selectand reset the password.admin -
Select.
admin -
On the Credentials tab, reset the password with Temporary turned off.
-
In your Terraform variables file, setto the password that the
keycloak_admin_passworduser has now.admin
Let your own callers connect to Mini-USF through its network policy
This item applies if a workload of yours calls Mini-USF at . Mini-USF now has a . On its API port, 8080, it admits only pods in labeled , which the package sets on its own callers, and the admin pod (). Its port 9090 serves only the metrics () and the health check (), and admits every pod. If a scrape configuration of your own targets Mini-USF, change its port to 9090.
http://mini-usf:8080NetworkPolicyasset-solutionsasset-solutions.unity.com/mini-usf-client: "true"upc-clirun: upc-cli/metrics/healthThe policy takes effect only where the cluster's network plugin applies . The Amazon Virtual Private Cloud (VPC) Container Network Interface (CNI) plugin of the Amazon Elastic Kubernetes Service (EKS) cluster that this package creates doesn't, until you turn on its network policy support, as Limit Pod traffic with Kubernetes network policies in the Amazon EKS User Guide describes.
NetworkPolicyBefore you run , let each of your own callers through, depending on where it runs:
make apply-<YOUR_REGION>-
For a workload in, add the label to its pod template (
asset-solutions), not to its selector, because the selector of an existingspec.template.metadata.labelscan't change.Deployment -
For a workload in another namespace, add it toin
allowFrom. Each key is a name you choose, each value aapplications/mini-usf/values.yamlpeer:NetworkPolicycommon-chart: networkPolicy: allowFrom: my-app: namespaceSelector: matchLabels: kubernetes.io/metadata.name: my-namespace podSelector: matchLabels: app.kubernetes.io/name: my-app
After the cluster applies , check that the policy refuses a pod without the label. The image of your deployment has :
NetworkPolicyupc-clicurlimage=$(kubectl -n asset-solutions get jobs -o jsonpath='{..image}' | tr ' ' '\n' | grep -m1 upc-cli)kubectl -n asset-solutions run np-test --rm -it --restart=Never --image="$image" \ --command -- curl -sS -m 5 http://mini-usf:8080/health
The command times out after 5 seconds when the policy applies, and prints when it doesn't.
HealthyAdd missing RabbitMQ queue replicas before you upgrade
This item applies to every existing deployment. This release moves the EKS cluster to Kubernetes 1.35 in , which replaces every node, one at a time, and restarts every pod, RabbitMQ's included.
make apply-<YOUR_REGION>A RabbitMQ queue that was created while one of the RabbitMQ nodes was still starting can be missing a replica. A RabbitMQ pod that holds such a queue doesn't stop. It waits up to seven days for the replica. Its node then can't be drained, and fails on the node group update with . From this release on, RabbitMQ adds missing replicas itself, but the node replacement runs before this release's RabbitMQ is deployed.
make apply-<YOUR_REGION>PodEvictionFailureTo check for missing queue replicas and add them, complete these steps before you run for this release:
make apply-<YOUR_REGION>-
Make sure that all the RabbitMQ pods areand ready.
Running -
Check each RabbitMQ pod:replicas=$(kubectl -n asset-solutions get statefulset rabbitmq-asset-solutions-server -o jsonpath='{.spec.replicas}')for i in $(seq 0 $((replicas - 1))); do kubectl -n asset-solutions exec rabbitmq-asset-solutions-server-$i -c rabbitmq -- rabbitmq-queues check_if_node_is_quorum_criticaldoneA pod that reportsis fine. If every pod reports it, skip the rest of these steps.
no queues/streams with minimum quorum -
If a pod lists a queue that, add the missing replicas on every node:
will become unavailablereplicas=$(kubectl -n asset-solutions get statefulset rabbitmq-asset-solutions-server -o jsonpath='{.spec.replicas}')for i in $(seq 0 $((replicas - 1))); do kubectl -n asset-solutions exec rabbitmq-asset-solutions-server-0 -c rabbitmq -- rabbitmq-queues grow rabbit@rabbitmq-asset-solutions-server-$i.rabbitmq-asset-solutions-nodes.asset-solutions alldone -
Run the check in step 2 (check each RabbitMQ pod) again.
If already failed on the node group update, and a RabbitMQ pod is stuck in , complete these steps:
make apply-<YOUR_REGION>Terminating-
Use the command from step 3 (add the missing replicas on every node) to add the missing replicas.The pod finishes stopping within a minute.
-
Runagain.
make apply-<YOUR_REGION>It resumes the node replacement.
Copy workflow artifacts from RustFS to Amazon S3
This release stores workflow artifacts in an S3 bucket that Terraform creates (), instead of the in-cluster RustFS, and no longer deploys Unity Studio. Its publications move to a bucket that Terraform keeps as an archive, and the database stays where it is. Copy RustFS's data after and before you deploy any chart of this release, including , because the credentials that deploys no longer reach RustFS, and the deploy removes RustFS.
argo-artifactsstudio-assetspublishermake apply-<YOUR_REGION>cluster-configcluster-configIf you also move PostgreSQL from RDS in this upgrade, do the copy in step 6 (copy the workflow artifacts) of Move PostgreSQL during the 1.5 upgrade. The platform is already stopped there, so one is enough.
migrateTo copy the workflow artifacts, complete these steps:
-
Runfor this release, but don't deploy its charts yet. If Argo CD deploys them, don't push the charts that
make apply-<YOUR_REGION>wrote, and don't change yourmake apply-<YOUR_REGION>, because an Application that leaves anApplicationSetis deleted with everything it deployed, RustFS included.ApplicationSet -
From, read the names of the new buckets and set your region by running these commands:
aws/terraformexport STUDIO_ASSETS_BUCKET=$(terraform output -json | jq -r '.configuration.value.studio_assets_bucket')export ARGO_ARTIFACTS_BUCKET=$(terraform output -json | jq -r '.configuration.value.argo_artifacts_bucket')export AWS_REGION=<YOUR_REGION>The script uses your currentcontext, and AWS credentials that can write to both buckets. Its header, inkubectl, documents its options.aws/scripts/migrate-rustfs-to-s3.sh -
Compare the buckets:../scripts/migrate-rustfs-to-s3.sh check
-
Copy what is missing:../scripts/migrate-rustfs-to-s3.sh migratecopies only what is missing, so you can run it again. The script doesn't copy workflow artifacts written to RustFS after the last
migrate. Unless the platform is stopped, runmigrateonce more right before you deploy, in a maintenance window.migrate -
Compare the buckets again:../scripts/migrate-rustfs-to-s3.sh checkThe lastexits with 0 when both buckets are in sync.
check -
Deploy this release.
-
If you deploy with the direct Helm targets, remove the RustFS and Studio releases after:
make helm-upgrade-<YOUR_REGION>helm -n asset-solutions uninstall rustfs studio-file-server studio-publisher-serviceArgo CD prunes them itself. Uninstalling deletes only the workloads, never the bucket or the database. -
For either method, delete thethat nothing prunes:
Secretkubectl -n asset-solutions delete secret publisher-service-external-secrets -
To keep a copy of Studio's publications, run, where
aws s3 sync "s3://$STUDIO_ASSETS_BUCKET" <LOCAL_DIRECTORY>holds the bucket name you read in step 2 (read the bucket names and set your region).STUDIO_ASSETS_BUCKETTerraform still manages the bucket, so don't delete it by hand. -
If PostgreSQL moves from RDS during this upgrade, runagainst RDS before you delete the instance, to keep a copy of Studio's
pg_dump -d publisherdatabase.publisherThedatabase isn't created in the cluster. If PostgreSQL moves from RDS during this upgrade, the database stays on RDS. If PostgreSQL ran in your cluster before this upgrade, the database stays there.publisher -
After you verify the deployment, delete the RustFSobjects, which this command lists:
PersistentVolumeClaimkubectl -n asset-solutions get pvc | grep rustfsThey hold the RustFS data until you delete them. On a storage class that retains its volumes, such as, also delete thegp3objects they leavePersistentVolumeand their EBS volumes.Released
Move PostgreSQL from Amazon RDS into the cluster
This release runs PostgreSQL in the cluster () instead of on Amazon RDS. This item applies to every deployment whose PostgreSQL runs on RDS, which is the default. If PostgreSQL ran in your cluster before you started ( in your 1.4.x Terraform variables file, and your services pointed at it), skip it, unless you moved it there on 1.4.x. In that case, follow only Upgrade after you move PostgreSQL on 1.4.x in the 1.5 window.
pg-dbenable_percona_postgresThe move is a cutover with downtime. You stop the platform, copy its databases from RDS into the cluster, and start it again on the copies. RDS isn't modified. This release stops managing it and leaves it running until you delete it yourself. In the cluster, PostgreSQL runs as three replicas on separate nodes, each requesting 2 CPU and 8 GiB of memory with a 400 GiB volume, and from this release backs up to a new S3 bucket.
Choose when to move PostgreSQL:
- Move PostgreSQL on 1.4.x before you upgrade uses a window of its own on your 1.4.x package, then Upgrade after you move PostgreSQL on 1.4.x in the 1.5 window. Each window is shorter, and you check the move before the upgrade.
- Move PostgreSQL during the 1.5 upgrade uses one window, which also includes the workflow artifacts copy and the collaboration data move.
Both options use the same procedures for what they share. These are Prepare for the maintenance window, then Stop the platform, Start the copy pod, Copy and compare, Start the platform, and Take a full backup, and afterwards Clean up after the window.
Prepare for the maintenance window
To prepare for the maintenance window, complete these steps:
-
Measure the size of each database on RDS. From a machine that reaches RDS, run this query inas
psql, using theassetsolutionsvalue inpostgres_user_passwordas the password:asset-solutions/configurationSELECT datname, pg_size_pretty(pg_database_size(datname)) FROM pg_database WHERE NOT datistemplate;The copy time depends on the size of each database. -
Use the same access to measure the compressed dump of the largest database:pg_dump -Fc -d <DATABASE_NAME> | wc -cThis command reads the database and writes nothing. The copy writes the dump to the disk of the copy pod's node, which needs that much free space, with a margin. The time the command takes is the copy's dump time. The restore rebuilds the indexes one at a time, so expect it to take several times longer. For example, a 68 GB database dumped to 4.7 GB in 16 minutes and took 86 minutes to restore in a test environment.
-
Make sure that three nodes can each take a PostgreSQL replica, or that the cluster autoscaler can add them.
-
Take a manual RDS snapshot:aws rds create-db-snapshot --db-instance-identifier asset-solutions-postgres --db-snapshot-identifier asset-solutions-postgres-before-1-5Keep the snapshot until you delete the instance.
-
In the 1.5 window, take an on-demand backup of MongoDB too, as Move collaboration data to PostgreSQL shows, and wait until it is ready.Steps 13 and 14 (copy the collaboration data and check the copy) of the 1.5 upgrade procedure also copy the collaboration data from MongoDB into the cluster's PostgreSQL.
-
In the 1.5 window, decide whether the cutover also upgrades Kubernetes.This release moves the EKS cluster to Kubernetes 1.35 in the same, which replaces every node and restarts every pod. To keep the window short, set
make apply-<YOUR_REGION>in your Terraform variables file for the cutover, and remove it in step 19 (removeeks_cluster_version = "1.34") of the 1.5 upgrade procedure.eks_cluster_version -
If Argo CD deploys the charts, prepare thefor the release you move on.
ApplicationSetBoth releases add, with thepg-operatorsync option, andServerSideApply=true. This release also givespg-dbpg-dband anRespectIgnoreDifferences=trueentry forignoreDifferencesof its/spec/backups/pgbackrest/manual(groupPerconaPGCluster), which the operator rewrites at every backup. Each release'spgv2.percona.comwrites its settings.aws/scripts/generate-appsets.sh
Stop the platform
If the platform is still stopped, as when you roll back right after you copy and compare the databases, skip this procedure, because recording the replica counts again would overwrite them with zeros.
To stop the platform, complete these steps:
-
If Argo CD deploys the charts, removefrom the sync policy of your
automated, keep the original, and apply it.ApplicationSetThis turns off automated sync for every Application until you start the platform. Otherwise a sync could start the platform before you copy its data. -
If Argo CD deploys the charts, check that no Application keeps:
automatedkubectl get applications -A -o custom-columns='NAMESPACE:.metadata.namespace,NAME:.metadata.name,AUTOMATED:.spec.syncPolicy.automated' -
Record the replica counts of the platform services and of Keycloak by running these commands:kubectl -n asset-solutions get deployment -l creator-services-app=asset-solutions -o custom-columns='NAME:.metadata.name,REPLICAS:.spec.replicas' --no-headers > replicas-before-1-5.txtkubectl -n asset-solutions get statefulset keycloak -o jsonpath='{.spec.replicas}{"\n"}'
-
Stop everything that writes to PostgreSQL, which is the platform services, Keycloak, and the Argo Workflows server and controller, by running these commands:kubectl -n asset-solutions scale deployment -l creator-services-app=asset-solutions --replicas=0kubectl -n asset-solutions scale statefulset keycloak --replicas=0kubectl -n asset-solutions scale deployment argo-workflows-server argo-workflows-workflow-controller --replicas=0
-
Check that RDS has no client connection left:SELECT datname, client_addr FROM pg_stat_activity WHERE usename = 'assetsolutions';Continue only when this query returns no row except your own session's.
Start the copy pod
The copy pod has the PostgreSQL client tools, from the image runs. names the database the copy leaves out. In the 1.5 window it's , where Studio is gone and its database stays on RDS. On 1.4.x it's , where Studio still runs and its database moves too.
pg-dbSKIP_DBpublishernoneTo start the copy pod, complete these steps:
-
Make sure thatis set in your shell, to
SKIP_DBin the 1.5 window orpublisheron 1.4.x.noneThe step that starts the pod stops ifis unset.SKIP_DB -
Start a pod with the PostgreSQL client tools, from the imageruns:
pg-db: "${SKIP_DB:?set SKIP_DB first: publisher in the 1.5 window, none on 1.4.x}"RDS_HOST=$(aws rds describe-db-instances --db-instance-identifier asset-solutions-postgres --query 'DBInstances[0].Endpoint.Address' --output text)IMAGE=$(kubectl -n asset-solutions get perconapgcluster pg-db -o jsonpath='{.spec.image}')kubectl -n asset-solutions apply -f - <<EOFapiVersion: v1kind: Podmetadata: name: pg-copyspec: restartPolicy: Never imagePullSecrets: - name: asset-solutions-docker-credentials securityContext: runAsNonRoot: true runAsUser: 26 runAsGroup: 26 seccompProfile: type: RuntimeDefault containers: - name: pg-copy image: ${IMAGE} command: ["sleep", "infinity"] resources: requests: {cpu: 500m, memory: 512Mi} limits: {cpu: "2", memory: 2Gi} securityContext: allowPrivilegeEscalation: false capabilities: drop: ["ALL"] env: - name: RDS_HOST value: ${RDS_HOST} - name: SKIP_DB value: ${SKIP_DB} - name: PGUSER value: assetsolutions - name: PGPASSWORD valueFrom: secretKeyRef: name: postgres-config-keycloak key: passwordEOFkubectl -n asset-solutions wait --for=condition=Ready pod/pg-copy --timeout=5m -
Check that the cluster accepts theuser:
assetsolutionskubectl -n asset-solutions exec pg-copy -- psql -h pg-db-primary -d postgres -c 'SELECT 1'Both RDS and the cluster accept theuser with the password the pod uses.assetsolutions -
In the 1.5 window, if step 3 (check that the cluster accepts theuser) reports
assetsolutions, empty thepassword authentication failedkey of theverifierpg-db-pguser-assetsolutionsonce:Secretkubectl -n asset-solutions patch secret pg-db-pguser-assetsolutions --type merge -p '{"data":{"verifier":""}}'The operator then sets the user's password from that.Secret -
If you emptied thekey, wait a minute, and then run the check in step 3 (check that the cluster accepts the
verifieruser) again.assetsolutions
Copy and compare
To copy the databases and compare the copy, complete these steps:
-
Copy every database the platform created on RDS, Keycloak's and Argo Workflows' included, into the cluster:kubectl -n asset-solutions exec -i pg-copy -- bash -s <<'EOF'set -euo pipefaildbs=$(psql -h "$RDS_HOST" -d postgres -Atc "SELECT datname FROM pg_database WHERE NOT datistemplate AND datname NOT IN ('postgres', 'rdsadmin', '$SKIP_DB') ORDER BY 1")for db in $dbs; do echo "Copying $db" if [ -z "$(psql -h pg-db-primary -d postgres -Atc "SELECT 1 FROM pg_database WHERE datname = '$db'")" ]; then createdb -h pg-db-primary "$db" fi pg_dump -h "$RDS_HOST" -d "$db" -Fc --no-owner --no-acl -f "/tmp/$db.dump" pg_restore -h pg-db-primary -d "$db" --no-owner --no-acl --exit-on-error "/tmp/$db.dump" rm "/tmp/$db.dump"doneEOFThe command leaves out the databasenames. It dumps one database at a time to the pod's disk, so the node needs free disk for the largest dump.
SKIP_DB -
Compare the exact row count of every table on both sides:kubectl -n asset-solutions exec -i pg-copy -- bash -s <<'EOF'set -euo pipefaildbs=$(psql -h "$RDS_HOST" -d postgres -Atc "SELECT datname FROM pg_database WHERE NOT datistemplate AND datname NOT IN ('postgres', 'rdsadmin', '$SKIP_DB') ORDER BY 1")tables=0 mismatches=0for db in $dbs; do for table in $(psql -h "$RDS_HOST" -d "$db" -Atc "SELECT format('%I.%I', schemaname, tablename) FROM pg_tables WHERE schemaname NOT IN ('pg_catalog', 'information_schema') ORDER BY 1"); do rds=$(psql -h "$RDS_HOST" -d "$db" -Atc "SELECT count(*) FROM $table") cluster=$(psql -h pg-db-primary -d "$db" -Atc "SELECT count(*) FROM $table") tables=$((tables + 1)) if [ "$rds" != "$cluster" ]; then echo "$db $table: $rds rows on RDS, $cluster in the cluster" mismatches=$((mismatches + 1)) fi donedoneecho "$tables tables compared, $mismatches mismatches"EOFIf any count differs, stop and roll back. The copy doesn't modify RDS.
Start the platform
To start the platform, complete these steps:
-
If Argo CD deploys the charts, apply yourwith
ApplicationSetrestored.automatedArgo CD then syncs every Application, and prunes what the release removes. -
If Argo CD deploys the charts, check that every Application isand
Synced.Healthy -
Use the replica counts you recorded to start the platform services again:while read -r name replicas; do kubectl -n asset-solutions scale deployment "$name" --replicas="$replicas"; done < replicas-before-1-5.txtA sync leaves a stopped service stopped, and so does its autoscaler. The command reports a service that the release removes as not found.
-
Check that Keycloak runs as many replicas as before:kubectl -n asset-solutions get statefulset keycloakIf it doesn't, scale it to that count.
-
Check that you can sign in, list assets, run a transformation, and read a comment thread.
Take a full backup
The first backup that PostgreSQL took on its own ran before the copy, so it holds none of your data.
To take a full backup, complete these steps:
-
Create a full backup named after the window:kubectl -n asset-solutions apply -f - <<'EOF'apiVersion: pgv2.percona.com/v2kind: PerconaPGBackupmetadata: name: pg-db-after-copyspec: pgCluster: pg-db repoName: repo1 options: - --type=fullEOFGive a repeated backup a new name.
-
Wait untilshows the backup
kubectl -n asset-solutions get perconapgbackup pg-db-after-copy.Succeeded -
Check that the PostgreSQL backup bucket holds the backup, or on 1.4.x that the backup volume does.
Move PostgreSQL on 1.4.x before you upgrade
The platform keeps running until step 6 (start the maintenance window).
To move PostgreSQL on 1.4.x, use your 1.4.x package and its Terraform variables file to complete these steps:
-
Setto
enable_percona_postgresin your Terraform variables file.true -
Run.
make apply-<YOUR_REGION> -
Deploy the charts:
- If Argo CD deploys the charts, push the charts it wrote and apply your with
ApplicationSetandpg-operatoradded, as the last step of the maintenance window preparation describes.pg-db - If you deploy with the direct Helm targets, run .
make helm-upgrade-<YOUR_REGION>
- If Argo CD deploys the charts, push the charts it wrote and apply your
-
Wait untilshows it
kubectl -n asset-solutions get perconapgcluster pg-db.readyNothing uses it yet. -
Give the cluster'suser the password it has on RDS.
assetsolutionsYour 1.4.xalready declares that user, with a password of its own, and this release's keeps whatever password it has. Write RDS's password into the user'spg-dband empty itsSecret, so that the operator applies it, by running these commands in order:verifierPW=$(kubectl -n asset-solutions get secret postgres-config-keycloak -o jsonpath='{.data.password}' | base64 -d)echo "${#PW} characters"Themust printecho. Stop if it prints24 characters.0kubectl -n asset-solutions patch secret pg-db-pguser-assetsolutions --type merge -p "{\"stringData\":{\"password\":\"$PW\"},\"data\":{\"verifier\":\"\"}}"unset PWThe operator applies the password within a minute, and the check that the cluster accepts the password, in step 3 of Start the copy pod, passes from then on. -
Start the maintenance window, and stop the platform.
-
Setto
SKIP_DB:noneexport SKIP_DB=none -
Copy and compare the databases.
-
Setto
postgres_serverin your Terraform variables file.pg-db-primary.asset-solutions.svc.cluster.localLeaveas it is. RDS keeps running, and nothing modifies it.enable_rds_postgres -
Run.
make apply-<YOUR_REGION> -
If Argo CD deploys the charts, push the charts it wrote, still without.
automated -
Make the services' secrets read the new host now rather than at their next refresh:kubectl -n asset-solutions annotate externalsecrets --all force-sync=$(date +%s) --overwrite
-
Check one of the services' secrets:kubectl -n asset-solutions get secret postgres-config-keycloak -o jsonpath='{.data.host}' | base64 -d; echoIt must print.
pg-db-primary.asset-solutions.svc.cluster.local -
If you deploy with the direct Helm targets, run.
make helm-upgrade-<YOUR_REGION> -
Check that RDS serves no service anymore. From the copy pod, run this query:kubectl -n asset-solutions exec pg-copy -- sh -c 'psql -h "$RDS_HOST" -d postgres -Atc "SELECT datname, client_addr FROM pg_stat_activity WHERE usename = current_user AND pid <> pg_backend_pid()"'The query returns no row.
-
Delete the copy pod:kubectl -n asset-solutions delete pod pg-copyKeep RDS and your snapshot until you verify the 1.5 upgrade.
To roll back to RDS, complete these steps:
-
Stop the platform, unless it is still stopped.
-
Removefrom your Terraform variables file.
postgres_server -
Run.
make apply-<YOUR_REGION> -
Push or deploy the charts.
-
Run steps 13 and 14 (force-sync the services' secrets and check one of them). The check must print RDS's host.
The copied databases stay in the cluster. Before you copy again, on 1.4.x or in the 1.5 window, drop them with the command in step 3 (drop the copied databases in the cluster) of the rollback procedure.
Move PostgreSQL during the 1.5 upgrade
To move PostgreSQL during the 1.5 upgrade, complete these steps:
-
Start the maintenance window, and stop the platform.
-
Extract this release and update your Terraform variables file, as in Upgrade your solution.
-
Run.
make plan-<YOUR_REGION> -
Check that the four RDS resources (the instance, its parameter group, its subnet group, and its security group) show as "will no longer be managed by Terraform", and that none is destroyed.
-
Run.
make apply-<YOUR_REGION> -
Copy the workflow artifacts now, before you deploy anything of this release, by completing steps 2 through 5 (set the variables, compare the buckets, copy what is missing, compare again) of Copy workflow artifacts from RustFS to Amazon S3.
-
Deploy the PostgreSQL operator, the configuration, and PostgreSQL, but nothing else yet:
-
If Argo CD deploys the charts, push the charts thatwrote, apply this release's
make apply-<YOUR_REGION>withApplicationSetstill removed, and then syncautomated,pg-operator, andcluster-config, in this order.pg-db -
If you deploy with the direct Helm targets, run this command from:
aws/terraformfor release in pg-operator cluster-config pg-db; do helm upgrade --install --dependency-update "$release" "../argocd/charts/<YOUR_REGION>/$release" --namespace asset-solutions --wait; doneThe charts are inif you set../argocd/charts/<ENVIRONMENT_DIRECTORY>/<YOUR_REGION>, or inENVif you set it.TARGET_DIR
-
-
Wait untilshows it
kubectl -n asset-solutions get perconapgcluster pg-db.readyPostgreSQL has no data yet. -
Setto
SKIP_DB:publisherexport SKIP_DB=publisher -
Copy and compare the databases.
-
Run this release's database migrations on the copied data, and recreate Keycloak:
- If Argo CD deploys the charts, sync the ,
asset-collaboration,authoring,automation,linksharing,mini-usf,public-api, andsecret-managerApplications. A sync runs their migrationworkspace-serviceobjects even when nothing else changed. Check that each succeeded by runningJob. Then synckubectl -n asset-solutions get jobs. It reports a sync error on itskeycloak, whose fields can't change. Delete theStatefulSetby runningStatefulSet, and synckubectl -n asset-solutions delete statefulset keycloakagain. Then synckeycloak.argo-workflows - If you deploy with the direct Helm targets, delete the Keycloak by running
StatefulSet, and then deploy every chart and run the migrations by runningkubectl -n asset-solutions delete statefulset keycloak.make helm-upgrade-<YOUR_REGION>
- If Argo CD deploys the charts, sync the
-
While every service is still at zero, run this command from the extracted package, withpointed at the cluster, to copy the collaboration data:
kubectl./common/scripts/collab-migration.sh copyThis runs from the service's image and configuration, not from its pods, as the collaboration data procedure explains. The copy refuses to run while the service runs. It must exit 0. -
Check the copy, before the service starts:./common/scripts/collab-migration.sh checkThe check must run before the service starts, because the service's first start purges the comments deleted more than 30 days ago, which MongoDB still holds, and the check would report those. It must exit 0.
-
Delete the copy pod:kubectl -n asset-solutions delete pod pg-copy
-
End the maintenance window.
-
If you setat the start, remove it.
eks_cluster_version = "1.34" -
If you removed, run
eks_cluster_versionand deploy again.make apply-<YOUR_REGION>This upgrades Kubernetes, about 4 minutes per node.
Upgrade after you move PostgreSQL on 1.4.x
To upgrade after you move PostgreSQL on 1.4.x, complete these steps:
-
In your Terraform variables file, deleteand
enable_percona_postgres.postgres_serverLeaveunset. This release takes the password the cluster'spostgres_user_passworduser already has.assetsolutions -
Run.
make plan-<YOUR_REGION> -
Check that the four RDS resources (the instance, its parameter group, its subnet group, and its security group) show as "will no longer be managed by Terraform", and that none is destroyed.
-
Upgrade as the standard upgrade describes.Complete Copy workflow artifacts from RustFS to Amazon S3 and Move collaboration data to PostgreSQL in the same window.
-
Recreate Keycloak.This release changes itsin fields that can't change in place.
StatefulSet- If Argo CD deploys the charts, reports a sync error on its
keycloak. Delete theStatefulSetby runningStatefulSet, and synckubectl -n asset-solutions delete statefulset keycloakagain. Argo CD doesn't retry a failed sync by itself.keycloak - If you deploy with the direct Helm targets, delete the before you run
StatefulSet.make helm-upgrade-<YOUR_REGION>
- If Argo CD deploys the charts,
-
When the platform runs, take a full backup and name it.
pg-db-after-upgradeDon't use the name the 1.4.x window used, because this release moves PostgreSQL's backups to the S3 bucket, which holds none yet. -
After the backup shows, delete the volume the 1.4.x backups used, which the operator released.
SucceededOn, that is thegp3thatPersistentVolumereleased, and its EBS volume.pg-db-repo1
Clean up after the window
To clean up after the window, complete these steps at your own pace, when you no longer need RDS:
-
If PostgreSQL moved during the 1.5 upgrade and you want to keep Studio's data, runagainst RDS.
pg_dump -d publisher -
Take a final RDS snapshot.
-
Turn off the instance's deletion protection:aws rds modify-db-instance --db-instance-identifier asset-solutions-postgres --no-deletion-protection --apply-immediately
-
Delete the instance:aws rds delete-db-instance --db-instance-identifier asset-solutions-postgres --skip-final-snapshot
-
Delete its DB subnet group, DB parameter group, and security group. Terraform no longer manages any of them.
Roll back the PostgreSQL move
- On 1.4.x, follow the rollback steps at the end of Move PostgreSQL on 1.4.x before you upgrade.
- After you complete Upgrade after you move PostgreSQL on 1.4.x, RDS holds your data only as of the 1.4.x copy, and you can't use the previous release's Terraform or the 1.4.x volume backups again. Contact support before you act. The only way to roll back is to copy from RDS again, as the rollback during the 1.5 upgrade after the apply describes, and every write after the 1.4.x window is lost.
- During the 1.5 upgrade, before you run for this release, start the platform. Nothing else has changed.
make apply-<YOUR_REGION> - During the 1.5 upgrade, after the apply, you can't apply the previous release's Terraform again, because this release moves resources within the Terraform state and creates others that the previous release doesn't know. Copy the data from RDS again instead, while the instance exists.
If you roll back during the 1.5 upgrade after the apply, complete these steps:
-
Stop the platform again, unless it is still stopped.
-
If you deleted the copy pod, start it again, as in Start the copy pod.
-
Drop the copied databases in the cluster:kubectl -n asset-solutions exec -i pg-copy -- bash -s <<'EOF'set -euo pipefaildbs=$(psql -h "$RDS_HOST" -d postgres -Atc "SELECT datname FROM pg_database WHERE NOT datistemplate AND datname NOT IN ('postgres', 'rdsadmin', '$SKIP_DB') ORDER BY 1")for db in $dbs; do dropdb -h pg-db-primary --if-exists --force "$db"; doneEOF
-
Repeat the steps of Move PostgreSQL during the 1.5 upgrade from step 9 (setto
SKIP_DB), and give the backup a new name.publisher
Move collaboration data to PostgreSQL
This release moves the collaboration service's data (comments, annotations, their attachments, and read receipts) from MongoDB into the cluster's PostgreSQL, in a new database the chart creates. The sync creates the tables. The copy is a step of this upgrade that you run once, after the sync and with the service stopped. A comment written while the copy runs would never reach PostgreSQL, and nobody can read or write comments from the moment you stop the service until you start it again. Sync this release during a maintenance window and tell your users.
collaborationpg-dbIf this upgrade also moves PostgreSQL from Amazon RDS into the cluster, Move PostgreSQL during the 1.5 upgrade covers this move too, in order. Its step 1 (start the maintenance window and stop the platform) stops the collaboration service with the rest, step 7 (deploy the PostgreSQL operator, the configuration, and PostgreSQL) starts with the database, steps 13 and 14 (copy the collaboration data and check the copy) run this copy and its check, and step 15 (start the platform) starts the service again. Step 5 (take an on-demand backup of MongoDB) of Prepare for the maintenance window is the MongoDB backup. The rest of this section describes what the copy does and how to roll back.
pg-dbcollaborationTo move the collaboration data to PostgreSQL, complete these steps:
-
Before you sync, create an on-demand backup of MongoDB:backup=$(kubectl -n asset-solutions create -o name -f - <<'EOF'apiVersion: psmdb.percona.com/v1kind: PerconaServerMongoDBBackupmetadata: generateName: before-upgrade-spec: clusterName: psmdb-db storageName: s3-primaryEOF)It goes to the backup storage your 1.4.xnames
psmdb-db, which this release renamess3-primary.managed -
Wait until the backup is ready:kubectl -n asset-solutions wait "$backup" --for=jsonpath='{.status.state}'=ready --timeout=60m
-
Stop the collaboration service, from the extracted package withpointed at the cluster:
kubectl./common/scripts/collab-migration.sh stopThe command scales itsto zero and waits for its pods to stop. Its autoscaler takes no action while theDeploymentis at zero, and the sync leaves it there, so the service stays stopped until you start it again in step 7 (start the service).Deployment -
Sync this release as you usually do, either in Argo CD or by running.
make helm-upgrade-<YOUR_REGION>The sync creates the tables, in theasset-cloud-collaboration-service-migration-schemathat runs ahead of the service's new pods and retries on its own whileJobis still creating the database, and it leaves the service stopped.pg-db -
After the sync completes, copy the documents:./common/scripts/collab-migration.sh copyThe copy runs the migration tool from the service's image and configuration, not from its pods, so it needs none running. It refuses to run while one does, or before you sync this release.It runs from a short-lived, reads every MongoDB document, inserts what PostgreSQL lacks, and prints the tool's summary, which lists the counts per collection and any documents it couldn't copy. It took 17 minutes for 50,000 comments in a test environment, in three passes, because the tool retries a reply on the next pass when it reads the reply before its thread. The script waits up to two hours (
Job, in seconds). Exit code 0 means the script copied every document. Exit code 1 means it couldn't copy some documents, which its log names, so keep that log and contact support. Exit code 2 means it couldn't run, and it says why. You can run it again, because it copies nothing twice.TIMEOUT -
Check the copy document by document, still before you start the service again:./common/scripts/collab-migration.sh checkThe check must run before the service starts, because the service's first start purges the comments deleted more than 30 days ago, which MongoDB still holds, and the check would report those.It compares every MongoDB document with its PostgreSQL row and changes nothing in either store. Exit code 0 means every document matches. Exit code 1 means it found differences, which its log lists, so keep that log and contact support. Exit code 2 means the check couldn't run. Run it only once, because every comment written after the upgrade exists only in PostgreSQL, and a later run reports those comments as differences.
-
Start the service again:./common/scripts/collab-migration.sh startIts autoscaler then controls the number of replicas.
Contact support before you roll back.
If you have to roll back after the upgrade, don't deploy an earlier release. To switch the collaboration service to MongoDB instead, complete these steps:
-
In, switch the collaboration service to MongoDB:
applications/asset-collaboration/values.yamlcommon-chart: configMaps: asset-collaboration-service: data: CollaborationServiceDataAccessSettings__Implementation: MongoDb -
Sync again.The service then reads and writes MongoDB again, which still holds everything it held before the upgrade. Comments written after the upgrade stay in PostgreSQL and aren't shown until you switch the service to PostgreSQL again.
To switch the service to PostgreSQL again, complete these steps:
-
Set the value to.
Postgresql -
Stop the service, as step 3 (stop the collaboration service) shows.
-
Sync, as step 4 (sync this release) shows.
-
Run the copy once more, as step 5 (copy the documents) shows.The copy adds the comments written on MongoDB in the meantime, but not the edits made to older threads during that time.
-
Start the service, as step 7 (start the service) shows.
The MongoDB collections stay in place for now, and a later release removes them.
Version 1.4.0
Migrate Elasticsearch to the ECK operator
The chart is deprecated, and release 1.5.0 removes it.
elasticsearchStatefulSetYou need to migrate to ECK. There's no data loss or downtime, but expect a brief write pause during the final copy, because the procedure scales to zero while the script copies the data.
asset-catalog-writerPlan capacity for the parallel run
Plan capacity for the parallel run of the ECK and existing Elasticsearch.
The ECK cluster needs about 5.5 CPU and 22 GiB of memory. This is in addition to the existing cluster, until you retire it. In total, you need three dedicated primary nodes and two data nodes at 4 CPU and 8 GiB limits, sized so that org-wide asset search stays fast.
Upgrade
To migrate Elasticsearch to ECK, complete these steps:
-
Upgrade to this release and set.
enable_elasticsearch_eck = true -
Run.
make apply-<YOUR_REGION> -
Deploy the regenerated charts, either by runningor by syncing in your GitOps tool.
make helm-upgrade-<YOUR_REGION>In this procedure, reapply means running, then deploying the regenerated charts.make apply-<YOUR_REGION>The ECK operator and an emptystart alongside your existing Elasticsearch.elastic-eck-clusterCatalog services keep using the existing cluster, so nothing changes yet. -
If Argo CD deploys the charts through anthat lists them, add
ApplicationSetandelasticsearch-eck-operatorto it, aselasticsearch-ecknow writes them.make apply-<YOUR_REGION> -
Stop writes during the copy:kubectl scale deploy/asset-catalog-writer --replicas=0 -n asset-solutions
-
Copy your data into the ECK cluster. Run the command from, where you run
aws/terraform. It streamsmakefrom the 1.4 package.aws/scripts/elasticsearch-reindex.shThe script runs as a one-shot pod streamed over standard input, and uses the publicdebug image for itsnicolaka/netshoot,bash, andcurltooling.jqIf your nodes can't pull from Docker Hub, substitute any image that has those three tools.The command injects the Elasticsearch password from theelasticsearch-apps-credentials, so it never appears in your shell or in the pod spec:Secretkubectl run es-reindex -n asset-solutions --restart=Never --rm -i \ --pod-running-timeout=10m \ --image=docker.io/nicolaka/netshoot:v0.14 \ --overrides='{ "spec": { "securityContext": {"runAsNonRoot": true, "runAsUser": 1001, "runAsGroup": 1001, "seccompProfile": {"type": "RuntimeDefault"}}, "containers": [{ "name": "es-reindex", "image": "docker.io/nicolaka/netshoot:v0.14", "stdin": true, "stdinOnce": true, "command": ["bash", "-s"], "securityContext": {"allowPrivilegeEscalation": false, "capabilities": {"drop": ["ALL"]}}, "resources": {"requests": {"cpu": "100m", "memory": "128Mi"}, "limits": {"cpu": "500m", "memory": "256Mi"}}, "env": [{"name": "ELASTIC_PASSWORD", "valueFrom": {"secretKeyRef": {"name": "elasticsearch-apps-credentials", "key": "password"}}}] }] } }' < ../scripts/elasticsearch-reindex.shTo pass the optional overrides, add them to thearray. For example, passenv. The optional overrides are{"name": "DST_SHARDS", "value": "2"},DST_SHARDS,DST_REPLICAS,SRC, andDST. The script header documents each one.ES_USEREach index's shard count is based on its actual data size, with one primary shard for each started 25 GB and one replica. SetandDST_SHARDSif you need a specific layout.DST_REPLICASWhile the script looks for each index on ECK, ais expected. The script compares each index's document count on both clusters itself, and ends withcurl: (22) … 404. The document counts thatReindex complete.shows are higher, because it also counts nested documents._cat/indicesRe-running the script only creates indices that are missing on the destination. An index that already exists there keeps its current shard layout, and the script reports it. To recreate such an index with a new layout, delete it on the destination first. -
Setto cut over.
use_eck_elasticsearch = true -
Reapply, so catalog services take the ECK endpoint.
-
Scaleback up, to your
asset-catalog-writer(2 by default), because its autoscaler stays off while it is at 0.kubernetes_pod_min_replicas -
Verify search and catalog operations.
-
Retire the existing cluster by settingand reapplying.
enable_elasticsearch = false- If Argo CD deploys the charts through an that lists them, remove
ApplicationSetfrom it.elasticsearch - If you deploy with the direct Helm targets, run once to uninstall the release.
helm -n asset-solutions uninstall elasticsearch
- If Argo CD deploys the charts through an
Release 1.5.0 removes the existing chart. After you upgrade to it, you can delete the old objects to reclaim storage.
elasticsearch-master-*PersistentVolumeClaimRoll back an Elasticsearch migration
To roll back before you scale up again, set and reapply. Catalog services return to the still-running existing cluster with no data loss.
asset-catalog-writeruse_eck_elasticsearch = falseIf you've started writing against the ECK cluster, the existing cluster is stale. If you roll back at this point, catalog services return to a dataset that's missing everything written after cutover. You must copy the new data before you roll back. To copy it, complete these steps:
-
Stop writes again.
-
Delete the affected indices on the existing cluster (the script skips indices that already exist on the destination).
-
Re-run the script withand
SRCswapped.DST -
Setand reapply.
use_eck_elasticsearch = false
Move Unity Licensing Server storage to EBS
The Unity Licensing Server data volume () doesn't provision to Amazon Elastic File System (EFS) anymore. It now provisions on EBS block storage. The variable sets the storage class, and it defaults to .
licserver-datakubernetes_ebs_storage_class_namegp3Because volume claims are immutable, you must move the volume manually. To move it, complete these steps:
StatefulSet- Choose how to keep your licensing data, before you delete anything:
- Request and import a new license bundle after the upgrade. No data backup is required. For more information, refer to Licensing.
- Use to keep your existing license data. The script header documents its usage. Run
common/scripts/migrate-licserver-storage.shnow, while the original volume still exists. The backup reads the volume thebackuphas bound.StatefulSet
- If a GitOps tool such as Argo CD manages the deployment, pause its reconciliation of the application.
license-server - Delete the
unity-licensing-serverand itsStatefulSetvolume claim.licserver-data-unity-licensing-server-0 - Deploy this release.
- Import your new license bundle, or, if you backed up your data, run the script's into the new volume.
restore
Version 1.3.0
Migrate Mini-USF from version 1 to version 2
You must migrate Mini-USF from version 1 to version 2, due to architectural changes that decouple Keycloak from entities such as projects. This section describes the required steps.
Complete the steps before the migration
Before the migration, while the application still uses Mini-USF v1, complete the procedures in this section.
Recreate the service accounts
Recreate the service accounts that you had created directly in Keycloak as clients instead of using Unity Dashboard, because all service accounts must follow the common Unity model. To do so, complete these steps:
-
In Unity Dashboard, create the new service accounts that you will use instead of the old ones.
-
Create a key for each new account in Unity Dashboard, and save the secrets.The key names use the universally unique identifier (UUID) format instead of the free-form names that the previous keys used.
-
Assign the required roles to these accounts.
-
Replace the keys of the old accounts with the keys of the new accounts wherever you use the service accounts, for example, in scripts or in pipelines.
Run the migration tool in dry run mode
Prepare the migration tool to run against the installation of Self-Hosted Deployment and run it in dry run mode. To do so, complete these steps:
-
To deploy the migration tool in dry run mode, run this command:kubectl run migrator-tool -n asset-solutions \ --image=uccmpprivatecloud.azurecr.io/docker/migrator:2026.13.19 \ --restart=Never \ --attach \ --rm -it \ --overrides='{ "spec": { "securityContext": { "runAsNonRoot": true, "runAsUser": 1000, "runAsGroup": 1000, "fsGroup": 1000 }, "imagePullSecrets": [{"name": "asset-solutions-docker-credentials"}], "containers": [{ "name": "migrator-tool", "image": "uccmpprivatecloud.azurecr.io/docker/migrator:2026.13.19", "resources": { "limits": {"cpu": "1", "memory": "1Gi"}, "requests": {"cpu": "200m", "memory": "512Mi"} }, "envFrom": [ {"secretRef": {"name": "mini-usf"}} ], "env": [ {"name": "MINIUSF_DryRun", "value": "true"}, {"name": "MINIUSF_MigrateEntities", "value": "true"}, {"name": "MINIUSF_MigrateRoleAssignments", "value": "true"}, {"name": "ASPNETCORE_ENVIRONMENT", "value": "Production"}, {"name": "MINIUSF_Keycloak_Realm", "value": "unity"}, {"name": "MINIUSF_Keycloak_EventType", "value": "LOGIN"}, {"name": "MINIUSF_Keycloak_EventsMaxNumber", "value": "10000"}, {"name": "MINIUSF_Keycloak__RealmPathPrefix", "value": "auth/realms"}, {"name": "MINIUSF_Keycloak__RealmAdminPathPrefix", "value": "auth/admin/realms"}, {"name": "MINIUSF_Jwt__Issuer", "value": "http://keycloak"}, {"name": "MINIUSF_Jwt__HttpsRequired", "value": "false"}, {"name": "MINIUSF_Jwt__RealmPathPrefix", "value": "auth/realms"}, {"name": "MINIUSF_Keycloak__BaseUri", "value": "http://keycloak"} ] }] }}'
-
Check that the tool runs successfully, and fix any reported errors.
Complete the migration
Prepare to start the migration
To prepare for the migration, complete these steps:
-
Block the network access to the solution for users. To do so, you can temporarily take down the DNS route, because administrators who perform the migration still need access.
-
To disable the cron jobs of therelease, which include the identity sync, run this command:
upc-cronjobhelm uninstall upc-cronjob -n asset-solutions -
To uninstall Mini-USF, run this command:helm uninstall mini-usf -n asset-solutions
-
Back up the PostgreSQL instance that Keycloak and Mini-USF use.
Perform the migration
Perform the first part of the migration
If an operation fails and you can't fix it, stop the migration and perform the post-migration steps. You don't need to perform a rollback at this stage.
To complete the first part of the migration, complete these steps:
-
Run the migration tool in dry run mode. Check that it runs successfully, and fix any reported errors.
-
Run the migration tool in full mode.The tool copies information from Keycloak to the Mini-USF database, while Keycloak data remains intact.To run the migration tool in full mode, run this command:kubectl run migrator-tool -n asset-solutions \ --image=uccmpprivatecloud.azurecr.io/docker/migrator:2026.13.19 \ --restart=Never \ --attach \ --rm -it \ --overrides='{ "spec": { "securityContext": { "runAsNonRoot": true, "runAsUser": 1000, "runAsGroup": 1000, "fsGroup": 1000 }, "imagePullSecrets": [{"name": "asset-solutions-docker-credentials"}], "containers": [{ "name": "migrator-tool", "image": "uccmpprivatecloud.azurecr.io/docker/migrator:2026.13.19", "resources": { "limits": {"cpu": "1", "memory": "1Gi"}, "requests": {"cpu": "200m", "memory": "512Mi"} }, "envFrom": [ {"secretRef": {"name": "mini-usf"}} ], "env": [ {"name": "MINIUSF_DryRun", "value": "false"}, {"name": "MINIUSF_MigrateEntities", "value": "true"}, {"name": "MINIUSF_MigrateRoleAssignments", "value": "true"}, {"name": "ASPNETCORE_ENVIRONMENT", "value": "Production"}, {"name": "MINIUSF_Keycloak_Realm", "value": "unity"}, {"name": "MINIUSF_Keycloak_EventType", "value": "LOGIN"}, {"name": "MINIUSF_Keycloak_EventsMaxNumber", "value": "10000"}, {"name": "MINIUSF_Keycloak__RealmPathPrefix", "value": "auth/realms"}, {"name": "MINIUSF_Keycloak__RealmAdminPathPrefix", "value": "auth/admin/realms"}, {"name": "MINIUSF_Jwt__Issuer", "value": "http://keycloak"}, {"name": "MINIUSF_Jwt__HttpsRequired", "value": "false"}, {"name": "MINIUSF_Jwt__RealmPathPrefix", "value": "auth/realms"}, {"name": "MINIUSF_Keycloak__BaseUri", "value": "http://keycloak"} ] }] }}'
Perform the second part of the migration
If an operation fails and you can't fix it, stop the migration and perform a rollback operation.
To complete the second part of the migration, complete these steps:
-
To upgrade Mini-USF to version 2, run this command from the generatedchart directory,
mini-usf, which holds its values:aws/argocd/charts/<YOUR_REGION>/mini-usfhelm upgrade --install --debug --dependency-update -n asset-solutions mini-usf . -
To assign the global administrator role to the users who need it, run this command:kubectl run upc-cli -n asset-solutions \ --image=uccmpprivatecloud.azurecr.io/docker/upc-cli:1.1.3 \ --restart=Never \ --attach \ --rm \ --overrides='{"spec":{"imagePullSecrets":[{"name":"asset-solutions-docker-credentials"}]}}' \ -- --fqdn http://mini-usf:8080 --path-prefix="" --no-auth roles assign --user-id "<USER_ID>" --role-id 812804b0-b643-4579-be8c-ef180e8c2c5a
-
Configure the default access for new users.
-
For the default access to an organization, run this command:kubectl run upc-cli -n asset-solutions \ --image=uccmpprivatecloud.azurecr.io/docker/upc-cli:1.1.3 \ --restart=Never \ --attach \ --rm \ --overrides='{"spec":{"imagePullSecrets":[{"name":"asset-solutions-docker-credentials"}]}}' \ -- --fqdn http://mini-usf:8080 --path-prefix="" --no-auth default-access set-org --organization-id "<ORGANIZATION_ID>" --user-type-id 39943160-54da-49ac-b1c7-bf26adc65855 --role-ids=""
-
For the default access to a project, run this command:kubectl run upc-cli -n asset-solutions \ --image=uccmpprivatecloud.azurecr.io/docker/upc-cli:1.1.3 \ --restart=Never \ --attach \ --rm \ --overrides='{"spec":{"imagePullSecrets":[{"name":"asset-solutions-docker-credentials"}]}}' \ -- --fqdn http://mini-usf:8080 --path-prefix="" --no-auth default-access set-project --project-id "<PROJECT_ID>" --role-ids 4101ecc8-2223-4066-aa4b-6b6f4d0d01e6
-
Complete the steps after the migration
To finish the migration, complete these steps:
-
Check that existing functionality works as expected.
-
Deploy thechart again to enable its cron jobs.
upc-cronjob -
Restore the network access to the solution.
Version 1.1.0
Migrate your data to Percona Server for MongoDB
Use a staged approach to migrate your data, at your own pace, from the MongoDB virtual machine (VM), which is the MongoDB EC2 instance, to Percona Server for MongoDB (PSMDB) in your Kubernetes cluster.
The Terraform variable is for the deployment of the PSMDB operator and database in your Kubernetes cluster as a parallel setup. This variable is disabled by default. However, to ensure zero downtime, all services initially continue using your current MongoDB instance. The connection string logic follows this priority order:
enable_percona_mongo- The custom URI, if provided
- The existing MongoDB VM
- The new PSMDB cluster
The switch itself needs a maintenance window, because anything written to the MongoDB VM after the backup doesn't reach PSMDB. Release 1.5.0 removes the MongoDB VM, so if your deployment still uses it, use your 1.4.x package to complete these steps before you upgrade to 1.5.0 or later. The steps use the package's and , and two passwords from the secret in AWS Secrets Manager. They are the VM's password inside , and the PSMDB password, .
aws/scripts/mongodb-backup.shmongodb-restore.shasset-solutions/configurationasset-managermongo_db_connection_stringpsmdb_asset_manager_passwordTo move your data to PSMDB, complete these steps:
-
Set, then run
enable_percona_mongo = trueand deploy.make apply-<YOUR_REGION>If Argo CD deploys the charts through anthat lists them, addApplicationSetandpsmdb-operatorto it, andpsmdb-dbif you setpmm. PSMDB (enable_percona_monitoring = true) starts beside the VM, and the services keep using the VM.psmdb-db -
Wait untilis ready.
psmdb-db -
Start a maintenance window. No one uses the platform and no transformation runs until step 18 (end the maintenance window). Anything written to the VM after the backup in step 5 (back up the VM) is lost.
-
Open an AWS Systems Manager (SSM) session on the MongoDB VM, and grantthe
asset-managerrole in thebackupdatabase:adminmongosh --username asset-manager --password <YOUR_VM_PASSWORD> --authenticationDatabase admin admin --eval 'db.grantRolesToUser("asset-manager", ["backup"])' -
Puton the VM and run it. It writes
mongodb-backup.sh:/tmp/mongo_data_backup_<TIMESTAMP>.archivebash mongodb-backup.sh asset-manager <YOUR_VM_PASSWORD> -
Back up thedatabase as well, and restore it after step 13 (restore the archive on the PSMDB primary), or the bulk operations in progress are lost. The script leaves it out, without warning.
BulkOperation -
In the SSM session, add a temporary public key of yours to's
ec2-user.~/.ssh/authorized_keysThe VM has no SSH key. -
Copy the archive to your machine:AWS_REGION=<YOUR_REGION> scp -o ProxyCommand="aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters portNumber=%p" ec2-user@<INSTANCE_ID>:/tmp/mongo_data_backup_<TIMESTAMP>.archive .
-
Remove the temporary key from's
ec2-user.~/.ssh/authorized_keys -
Find the PSMDB primary. Its pod is the first part of the host name that this command prints,:
psmdb-db-rs0-<POD_NUMBER>kubectl -n asset-solutions exec psmdb-db-rs0-0 -c mongod -- mongosh --username asset-manager --password <YOUR_PSMDB_PASSWORD> --authenticationDatabase admin --eval 'db.hello().primary' -
Copy the archive to the primary:kubectl cp mongo_data_backup_<TIMESTAMP>.archive asset-solutions/<PRIMARY_POD_NAME>:/tmp/mongo_data_backup_<TIMESTAMP>.archive -c mongod
-
Copy the restore script to the primary:kubectl cp aws/scripts/mongodb-restore.sh asset-solutions/<PRIMARY_POD_NAME>:/tmp/mongodb-restore.sh -c mongod
-
Restore the archive, and answerwhen the script prompts you:
ykubectl -n asset-solutions exec -it <PRIMARY_POD_NAME> -c mongod -- bash /tmp/mongodb-restore.sh asset-manager <YOUR_PSMDB_PASSWORD> /tmp/mongo_data_backup_<TIMESTAMP>.archive -
Check that every collection holds as many documents in PSMDB as on the VM. If one differs, stop. The services still use the VM, and nothing is lost.
-
Set, and leave
enable_mongo = falseunset.mongo_connection_uri -
Runand deploy.
make apply-<YOUR_REGION>This deletes the VM and its data volume, and points the services' MongoDB connection at PSMDB. -
A minute after the apply, restart every service that reads MongoDB:kubectl rollout restart deployment -l creator-services-app=asset-solutions -n asset-solutions
-
End the maintenance window.