Enabling the Migration Portal AI Copilot

After deploying the EDB Postgres AI Platform with Hybrid Manager (HM), Migration Portal, a Launchpad tool to help you migrate external databases, works out of the box.

However, the AI Copilot, a chat-bot tool that helps you resolve migration compatibility issues within the Migration Portal, is not enabled by default, so you need additional configuration to enable it.

You can configure the AI Copilot using OpenAI, Azure OpenAI, or an alternative AI vendor.

Prerequisites

Prepare the resources your environment will require to deploy the Migration Portal AI Copilot with your vendor’s AI solution.

  • You need access credentials to the specific AI vendor’s services.
    • If you are using OpenAI, you need your organization’s ID and API key.
    • If you are using Azure OpenAI, you need your organization’s endpoint URL and an API key. Additionally, in your Azure OpenAI instance, create the following deployments:
      • gpt-4o deployment:
        • Deployment name: gpt-4o
        • Suggested version: 2024-11-20
      • text-embedding-3-small deployment:
        • Deployment name: text-embedding-3-small
        • Suggested version: 1

Enabling the AI Copilot

You can enable the AI Copilot before or after you install the HM.

  1. Check if the edb-migration-copilot exists:

    kubectl get namespaces edb-migration-copilot

    The namespace is created during the installation of the Hybrid Manager. If you are enabling the AI Copilot before installing the HM, you must create the namespace in advance.

  2. If the edb-migration-copilot namespace doesn't exist yet, create it:

    kubectl create ns edb-migration-copilot
  3. Set the following environment variables to link the AI Copilot to an existing AI account. Replace the placeholders with your AI vendor's account information:

    For OpenAI:

    export OPENAI_ORG_ID=<openai_org_id>   # organisation id for the openai account
    export OPENAI_API_KEY=<openai_api_key> # api key for accessing the openai account

    For Azure OpenAI:

    export AZURE_OPENAI_ENDPOINT=<azure_openai_endpoint> # endpoint for the azure openai instance
    export AZURE_OPENAI_API_KEY=<azure_openai_api_key>   # api key for accessing the azure openai instance
  4. Configure your vendor’s credentials, by adding a secret to the edb-migration-copilot namespace:

    For OpenAI:

    kubectl create secret generic ai-vendor-secrets \
      --namespace=edb-migration-copilot \
      --type=opaque \
      --from-literal=AI_VENDOR=OPENAI \
      --from-literal=OPENAI_ENDPOINT="${OPENAI_ORG_ID}" \
      --from-literal=OPENAI_API_KEY="${OPENAI_API_KEY}"

    For Azure OpenAI:

    kubectl create secret generic ai-vendor-secrets \
      --namespace=edb-migration-copilot \
      --type=opaque \
      --from-literal=AI_VENDOR=AZURE_OPENAI \
      --from-literal=AZURE_OPENAI_ENDPOINT="${AZURE_OPENAI_ENDPOINT}" \
      --from-literal=AZURE_OPENAI_API_KEY="${AZURE_OPENAI_API_KEY}"
  5. Create a new file called migration-portal-values.yaml with the following helm value to override the default AI vendor secrets with the secret created in the previous step.

    For OpenAI:

    parameters:
      edb-migration-copilot:
        ai_vendor_secrets: ai-vendor-secrets         

    For Azure OpenAI:

    parameters:
      edb-migration-copilot:
        ai_vendor_secrets: ai-vendor-secrets         
        chat_model: gpt-4o
    • The secret referenced in ai_vendor_secrets must match the name of the secret previously created.

    • The LLM version specified in chat_model is gpt-4o by default as it is the recommended version for the copilot.

  6. Reference the created file with when running the helm upgrade command during the installation, so it uses the customized values for the Migration Portal. Use this option each subsequent time you invoke helm upgrade. Otherwise, your secrets will be overridden with the vendor’s default secrets.

    helm upgrade \
      -n edbpgai-bootstrap \
      --install \
      ...
      -f migration-portal-values.yaml \
      ...

Could this page be better? Report a problem or suggest an addition!