Migrate Postgresql database for Aria Config to Tanzu Salt
search cancel

Migrate Postgresql database for Aria Config to Tanzu Salt

book

Article ID: 384675

calendar_today

Updated On:

Products

VMware Aria Suite Tanzu Hub Self-Managed

Issue/Introduction

Aria Config is rebranded as Tanzu Salt and is now part of the Tanzu Platform. Thus new releases will become available as container images intended to be deployed in the Tanzu Platform. If you are an existing customer and intend to carry your existing environment from Aria Config forward to Tanzu Salt, then please review these steps for migrating your database.

Environment

Tanzu 8.10+

Aria Config 8.16+

SaltStack - all versions

Resolution

Steps for Migrating RaaS Data from Aria Config to Tanzu SM

  1. Export the RaaS Database

    • Log in to the Aria Config Postgres instance.
    • Export the raas_* database to the specified directory: /path/to/dir.
  2. Copy the RaaS Encryption Key

    • Copy the encryption key from the Aria Config server: /etc/raas/pki/.raas.key.
    • Save it to /path/to/dir.
  3. Verify Kubernetes Access

    • Log in to the TanzuSM Kubernetes cluster.
    • Ensure you can list pods by running the following command:
      kubectl -n tanzusm get po | grep raas
  4. Scale Down RaaS Deployment

    • Scale down the deployment using the following command:
      kubectl -n tanzuhub scale deploy raas --replicas=0
  5. Retrieve Organization ID

    • Log in to the TanzuSM UI.
    • Note down the organization ID.
  6. Access TanzuSM Postgres

    • Log in to the TanzuSM Postgres instance.
    • Locate the database named raas_<org_id_without_dashes>.
  7. Drop and Recreate the Database

    • Drop the database raas_<org_id_without_dashes>.
    • Create a new database with the same name.
    • Import the data exported from the Aria Config into the new database.
  8. Map Users to TanzuSM Auth

    • For each user, map their usernames with the following SQL command:
      UPDATE USERS SET username = '<tanzu_okta_user>', normalized_username = '<tanzu_okta_user>' WHERE username = '<aria_config_username>';
    • Repeat this step for all required user mappings.
  9. Update Kubernetes Secret

    • Edit the Kubernetes secret named raas-db-encryption-key:
      • Encode the contents of the RaaS encryption key to Base64 using the command:
        echo -n "contents_of_raas_key_file" | base64
      • Replace the secret value with the encoded string.
  10. Run the Database Upgrade Job

    • Re-run the database upgrade job to align the Aria Config database with the TanzuSM release. Use the following command:
      kubectl create job --from=job/db-upgrade new-db-upgrade -n tanzusm
  11. Scale Up RaaS Deployment

    • Re-enable the RaaS deployment by scaling it up with the following command:
      kubectl -n tanzuhub scale deploy raas --replicas=1

This should now be easy to paste into any WYSIWYG editor with proper spacing and structure intact. Let me know if you need further refinements!