Migrating from one namespace to another

Solution Verified - Updated

Environment

Migrations of the initial version of EDA 2.5 to later versions of EDA 2.5 are still supported, but migrations of EDA version 2.4 to 2.5 are not supported. Database migrations between EDA 2.4 and EDA 2.5 are not compatible.

Issue

You must make sure that all of your existing deployments of AAP services (controller, hub, EDA) are deployed to the same, single namespace before upgrading to Ansible Automation Platform Operator on OpenShift Container Platform version 2.5.

Resolution

To migrate your services from one namespace to another, perform the following steps:

  1. Create a separate namespace on the Openshift cluster using the Openshift Console UI:
    a. Log in to Red Hat OpenShift Container Platform.
    b. Navigate to AdministrationNamespaces.
The Namespaces window of the Red Hat OpenShift console page with Create Namespace button emphasized.
Namespaces window of the Red Hat OpenShift console

c. Click **Create Namespace**.
The namespace is named `aap` by default when you installed the AAP Operator from OperatorHub, so provide a unique name to avoid conflict, if needed. 2. Recreate the `secret_key/db_encryption_fields_secret` and `postgres_configuration_secret` k8s secrets in the new namespace for all the components being migrated (AutomationController, AutomationHub, EDA, AnsibleAutomationPlatform). See [Creating a secret key secret](https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.4/html-single/deploying_the_red_hat_ansible_automation_platform_operator_on_openshift_container_platform/index#create-secret-key-secret_aap-migration) for more detail. 3. Create a new AnsibleAutomationPlatform custom resource in the new central namespace, specifying the secret key and `old_postgres_configuration_secret` secret for each component on the spec in the `controller`, `hub`, and `eda` sections. See [Create AnsibleAutomationPlatform custom resource](https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.5/html-single/installing_on_openshift_container_platform/index#con-operator-custom-resources_operator-install-planning) for more detail. 4. After creating the AnsibleAutomationPlatform custom resource, the operator will automatically create new AutomationController and AutomationHub custom resources, which will migrate the database from the old deployment in the previous namespace and use the secret key specified.

Note
The old deployment in the previous namespace should be kept running until the new deployment is complete.

Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.