UiPath Documentation
ai-center
2022.4
true
Guía de instalación de AI Center
Importante :
La localización de contenidos recién publicados puede tardar entre una y dos semanas en estar disponible.

Migrar al entorno independiente o de Automation Suite

Nota:

A classic upgrade to AI Center 2022.4 from 2020.10 or 2021.4 is not available, instead you need to install AI Center standalone 2022.4 or as part of a new Automation Suite installation and you can migrate your work from the previous environment. This migration script works for both type of installations, AI Center standalone or Automation Suite environment.

To upgrade from AI Center 2021.10, follow the procedures from the Upgrading AI Center page.

Información general

Utiliza este procedimiento para migrar de 2021.4 o 2020.10 a 2022.4. Para ello, se necesita una nueva instalación y una migración en lugar de una actualización.

Sigue los siguientes pasos para migrar los datos de tenant de AI Center al entorno independiente de AI Center o al entorno de Automation Suite. Este procedimiento ofrece soporte de migración para lo siguiente:

  • Base de datos

  • Conjuntos de datos

  • Paquetes ML

    Nota:

    El paquete bajo demanda de Document Understanding debe ejecutarse antes de implementar y entrenar los paquetes ML migrados de DU.

    In case of airgapped installation, make sure that the models with the same major version are added to your out of the box models. For more information on installing models offline, see ML Packages Offline Installation.

Requisitos previos

Comprueba que AI Center está activo y se está ejecutando en ambos entornos.

Además, los siguientes requisitos previos deben cumplirse en máquina en la que se ejecuta el script de migración:

  • Una máquina Linux con las siguientes dependencias instaladas: aws s3" id="1"/>, s3cmd" id="2"/>, jq" id="3"/>, zip" id="4"/>. La máquina puede ser una de las máquinas de AI Center o una nueva. Para obtener más información, consulta el ejemplo que aparece a continuación.

Instalación de las dependencias aws, s3, s3cmd, jq y zip

Nota:

In case of unmet dependencies, run the following commands with no packages:

sudo susudo apt install -y jq awscli s3cmd zip gitsudo apt --fix-broken installsudo apt install -y jq awscli s3cmd zip
sudo susudo apt install -y jq awscli s3cmd zip gitsudo apt --fix-broken installsudo apt install -y jq awscli s3cmd zip
  • Instala la utilidad de MS SQL desde aquí. Puedes hacerlo ejecutando los siguientes comandos:

    sudo su
    curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.listsudo apt-get update
    sudo apt-get install mssql-tools unixodbc-devsudo apt-get update
    sudo apt-get install mssql-toolsecho 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profileecho 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
    source ~/.bashrc
    sudo su
    curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.listsudo apt-get update
    sudo apt-get install mssql-tools unixodbc-devsudo apt-get update
    sudo apt-get install mssql-toolsecho 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profileecho 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
    source ~/.bashrc
    
  • Conectividad con ambas instancias de AI Center.

  • Conectividad con ambas instancias de Orchestrator (en caso de que las instancias no sean las mismas).

  • Conectividad con servidores SQL (en caso de que las instancias no sean las mismas).

  • Posibilidad de acceder a ambas instancias de AI Center.

Procedimiento

Step 1: Create a tenant with the same name in the Automation Suite or new AI Center environment

Crea el tenant correspondiente en el entorno Automation Suite o del nuevo AI Center para cada tenant que quieras migrar.

Paso 2: generar el archivo Storage-creds.json en la primera máquina (también conocida como máquina de origen)

Este paso debe ejecutarse en la primera máquina, a la que quieres migrar el nuevo entorno.

  1. Conéctate mediante SSH a la máquina que quieres migrar.

  2. Genera el archivo storage-creds.json" id="1"/> ejecutando el siguiente comando:

    wget https://raw.githubusercontent.com/UiPath/ai-customer-scripts/stable/platform/sfmigration/storagemigration/get-credentials.sh
    chmod 777 get-credentials.sh
    ./get-credentials.sh
    wget https://raw.githubusercontent.com/UiPath/ai-customer-scripts/stable/platform/sfmigration/storagemigration/get-credentials.sh
    chmod 777 get-credentials.sh
    ./get-credentials.sh
    
Nota:

If running from a third machine make sure to run the following command :

./get-credentials.sh {PUBLIC_IP_REPLICATED_MACHINE}
./get-credentials.sh {PUBLIC_IP_REPLICATED_MACHINE}
Nota:

If the error message from below is displayed after running the above script, run the bash -l command and try running the above script again

El archivo generado en el Paso 2 (storage-creds.json" id="1"/>) se utilizará en más pasos. Comprueba que copias y guardas el contenido del archivo localmente.

Paso 3: generar el archivo Storage-creds.json en la segunda máquina

Este paso debe ejecutarse en la segunda máquina, la que se ejecuta en el entorno de Automation Suite.

  1. Abre el puerto 22 en la máquina de Automation Suite

  2. Conéctate mediante SSH a la máquina de Automation Suite.

  3. Ejecuta el siguiente comando:

    sudo su
    export KUBECONFIG=/etc/rancher/rke2/rke2.yaml PATH=$PATH:/var/lib/rancher/rke2/bin
    sudo su
    export KUBECONFIG=/etc/rancher/rke2/rke2.yaml PATH=$PATH:/var/lib/rancher/rke2/bin
    
  4. Descarga el archivo de credenciales ejecutando el siguiente comando:

    wget https://raw.githubusercontent.com/UiPath/ai-customer-scripts/stable/platform/sfmigration/storagemigration/get-credentials-sf.sh
    chmod 777 get-credentials-sf.sh
    ./get-credentials-sf.sh
    wget https://raw.githubusercontent.com/UiPath/ai-customer-scripts/stable/platform/sfmigration/storagemigration/get-credentials-sf.sh
    chmod 777 get-credentials-sf.sh
    ./get-credentials-sf.sh
    

El archivo generado en el Paso 4 (storage-creds-sf.json" id="1"/>) se utilizará en más pasos. Comprueba que copias y guardas el contenido del archivo localmente.

Paso 4: Configura la máquina ejecutando el scritp

Antes de proceder con los siguientes pasos, crea un tenant con el mismo nombre en el entorno de Automation Suite manualmente. Sin importar el tenant que tiene que migrarse, el tenant correspondiente deberá crearse también en Automation Suite.

Este paso debe ejecutarse en la máquina que ejecuta el script.

  1. Ejecuta el siguiente comando para descargar el script de migración (esto descargará el script desde el repositorio de git público):

    sudo su
    cd ~
    mkdir migration
    cd migration
    git clone https://github.com/UiPath/ai-customer-scripts
    cd ai-customer-scripts
    git checkout stable
    cd platform
    chmod 777 -R sfmigration
    cd ~/migration/ai-customer-scripts/platform/sfmigration/storagemigration/
    sudo su
    cd ~
    mkdir migration
    cd migration
    git clone https://github.com/UiPath/ai-customer-scripts
    cd ai-customer-scripts
    git checkout stable
    cd platform
    chmod 777 -R sfmigration
    cd ~/migration/ai-customer-scripts/platform/sfmigration/storagemigration/
    
  2. Sustituye el contenido del SOURCE_CREDENTIAL_FILEarchivo por el contenido de storage-creds.json (consulta el Paso 2).

  3. Sustituye el contenido en el archivo TARGET_CREDENTIAL_FILE por el contenido de storage-creds-sf.json (consulta el Paso 3).

  4. Dirígete al directorio base ejecutando el siguiente comando:

    cd ~/migration/ai-customer-scripts/platform/sfmigration/
    cd ~/migration/ai-customer-scripts/platform/sfmigration/
    

Sustituye los detalles en el archivo input.json" id="1"/> (el archivo ya está presente en el directorio). Para una mejor referencia, las credenciales se marcan como TO-BE-REPLACED" id="2"/> en el archivo input.json" id="3"/>.

El archivo de muestra JSON con la descripción de cada campo se indica a continuación.

{
"SRC_AIC_INSTALLATION_VERSION": "TO-BE-REPLACED", // Values can be : 20.10 OR 21.4
"SRC_SERVER": "TO-BE-REPLACED",   // Replicated SQL Server host
"SRC_PKGMANAGER_DB_NAME": "TO-BE-REPLACED", // Replicated SQL Server Pkgmanager DB name
"SRC_PKGMANAGER_DB_SCHEMA": "ai_pkgmanager", // Replicated SQL Server Pkgmanager DB schema, Note : Please check schema in case of multiple dbs in replicated
"SRC_PKGMANAGER_DB_USERNAME": "TO-BE-REPLACED", // Replicated SQL Server Pkgmanager DB Username
"SRC_PKGMANAGER_DB_PASSWORD": "TO-BE-REPLACED",  // Replicated SQL Server Pkgmanager DB Password
"SRC_TRAINER_DB_NAME": "TO-BE-REPLACED", // Replicated SQL Server AI-Trainer DB Name
"SRC_TRAINER_DB_SCHEMA": "ai_trainer", // Replicated SQL Server AI-Trainer DB Schema, Note : Please check schema in case of multiple dbs in replicated
"SRC_TRAINER_DB_USERNAME": "TO-BE-REPLACED", // Replicated SQL Server AI-Trainer DB Username
"SRC_TRAINER_DB_PASSWORD": "TO-BE-REPLACED",// Replicated SQL Server AI-Trainer DB Password
"DESTINATION_SERVER": "TO-BE-REPLACED", // Destination SQL Server host i.e ServiceFabric SQL Server host
"DESTINATION_DB_NAME": "TO-BE-REPLACED", // Destination SQL Server DB Name
"DESTINATION_PKGMANAGER_DB_SCHEMA": "ai_pkgmanager",
"DESTINATION_TRAINER_DB_SCHEMA": "ai_trainer",
"DESTINATION_DB_USERNAME": "TO-BE-REPLACED", // Destination SQL Server Username
"DESTINATION_DB_PASSWORD": "TO-BE-REPLACED", // Destination SQL Server Password
"TENANT_MAP": [
{
"SRC_TENANT_ID": "TO-BE-REPLACED", // Source Tenant Id i.e tenant UUID in replicated environment
"DESTINATION_TENANT_ID": "TO-BE-REPLACED", // Destination Tenant Id i.e Tenant UUID in the destination environment
"DESTINATION_ACCOUNT_ID": "TO-BE-REPLACED" // Destination Account UUID Id , host if Migrating to ServiceFabric standalone environment otherwise provide the actual Account UUID
}
]
{
"SRC_AIC_INSTALLATION_VERSION": "TO-BE-REPLACED", // Values can be : 20.10 OR 21.4
"SRC_SERVER": "TO-BE-REPLACED",   // Replicated SQL Server host
"SRC_PKGMANAGER_DB_NAME": "TO-BE-REPLACED", // Replicated SQL Server Pkgmanager DB name
"SRC_PKGMANAGER_DB_SCHEMA": "ai_pkgmanager", // Replicated SQL Server Pkgmanager DB schema, Note : Please check schema in case of multiple dbs in replicated
"SRC_PKGMANAGER_DB_USERNAME": "TO-BE-REPLACED", // Replicated SQL Server Pkgmanager DB Username
"SRC_PKGMANAGER_DB_PASSWORD": "TO-BE-REPLACED",  // Replicated SQL Server Pkgmanager DB Password
"SRC_TRAINER_DB_NAME": "TO-BE-REPLACED", // Replicated SQL Server AI-Trainer DB Name
"SRC_TRAINER_DB_SCHEMA": "ai_trainer", // Replicated SQL Server AI-Trainer DB Schema, Note : Please check schema in case of multiple dbs in replicated
"SRC_TRAINER_DB_USERNAME": "TO-BE-REPLACED", // Replicated SQL Server AI-Trainer DB Username
"SRC_TRAINER_DB_PASSWORD": "TO-BE-REPLACED",// Replicated SQL Server AI-Trainer DB Password
"DESTINATION_SERVER": "TO-BE-REPLACED", // Destination SQL Server host i.e ServiceFabric SQL Server host
"DESTINATION_DB_NAME": "TO-BE-REPLACED", // Destination SQL Server DB Name
"DESTINATION_PKGMANAGER_DB_SCHEMA": "ai_pkgmanager",
"DESTINATION_TRAINER_DB_SCHEMA": "ai_trainer",
"DESTINATION_DB_USERNAME": "TO-BE-REPLACED", // Destination SQL Server Username
"DESTINATION_DB_PASSWORD": "TO-BE-REPLACED", // Destination SQL Server Password
"TENANT_MAP": [
{
"SRC_TENANT_ID": "TO-BE-REPLACED", // Source Tenant Id i.e tenant UUID in replicated environment
"DESTINATION_TENANT_ID": "TO-BE-REPLACED", // Destination Tenant Id i.e Tenant UUID in the destination environment
"DESTINATION_ACCOUNT_ID": "TO-BE-REPLACED" // Destination Account UUID Id , host if Migrating to ServiceFabric standalone environment otherwise provide the actual Account UUID
}
]

Archivo input.json" id="1"/> de muestra con valores de muestra como referencia (ten en cuenta que la siguiente captura de la pantalla es la migración de Base de datos de origen único a una Base de datos de destino único)

{
        "SRC_AIC_INSTALLATION_VERSION": "20.10",
        "SRC_SERVER": "sankar-sf-migration1sqlserver.database.windows.net",
        "SRC_PKGMANAGER_DB_NAME": "aifabric",
        "SRC_PKGMANAGER_DB_SCHEMA": "ai_pkgmanager",
        "SRC_PKGMANAGER_DB_USERNAME": "test",
        "SRC_PKGMANAGER_DB_PASSWORD": "test",
        "SRC_TRAINER_DB_NAME": "aifabric",
        "SRC_TRAINER_DB_SCHEMA": "ai_trainer",
        "SRC_TRAINER_DB_USERNAME": "test",
        "SRC_TRAINER_DB_PASSWORD": "test",
        "DESTINATION_SERVER": "sfdev2290542-9a5254d2-sql.database.windows.net",
        "DESTINATION_DB_NAME": "AutomationSuite_AICenter",
        "DESTINATION_PKGMANAGER_DB_SCHEMA": "ai_pkgmanager",
        "DESTINATION_TRAINER_DB_SCHEMA": "ai_trainer",
        "DESTINATION_DB_USERNAME": "test",
        "DESTINATION_DB_PASSWORD": "test",
        "TENANT_MAP": [
                {
                        "SRC_TENANT_ID": "d1eb428c-e188-46bf-a1dd-8908f90b4084",
                        "DESTINATION_TENANT_ID": "03527165-b242-4b98-834f-2eb3e5957223",
                        "DESTINATION_ACCOUNT_ID": "8cd64e27-12f4-427c-a575-dd4f2ea82551"
                }
        ]
}
{
        "SRC_AIC_INSTALLATION_VERSION": "20.10",
        "SRC_SERVER": "sankar-sf-migration1sqlserver.database.windows.net",
        "SRC_PKGMANAGER_DB_NAME": "aifabric",
        "SRC_PKGMANAGER_DB_SCHEMA": "ai_pkgmanager",
        "SRC_PKGMANAGER_DB_USERNAME": "test",
        "SRC_PKGMANAGER_DB_PASSWORD": "test",
        "SRC_TRAINER_DB_NAME": "aifabric",
        "SRC_TRAINER_DB_SCHEMA": "ai_trainer",
        "SRC_TRAINER_DB_USERNAME": "test",
        "SRC_TRAINER_DB_PASSWORD": "test",
        "DESTINATION_SERVER": "sfdev2290542-9a5254d2-sql.database.windows.net",
        "DESTINATION_DB_NAME": "AutomationSuite_AICenter",
        "DESTINATION_PKGMANAGER_DB_SCHEMA": "ai_pkgmanager",
        "DESTINATION_TRAINER_DB_SCHEMA": "ai_trainer",
        "DESTINATION_DB_USERNAME": "test",
        "DESTINATION_DB_PASSWORD": "test",
        "TENANT_MAP": [
                {
                        "SRC_TENANT_ID": "d1eb428c-e188-46bf-a1dd-8908f90b4084",
                        "DESTINATION_TENANT_ID": "03527165-b242-4b98-834f-2eb3e5957223",
                        "DESTINATION_ACCOUNT_ID": "8cd64e27-12f4-427c-a575-dd4f2ea82551"
                }
        ]
}

Archivo input.json" id="1"/> de muestra con valores de muestra como referencia (ten en cuenta que la siguiente captura de la pantalla es la migración de Base de datos de origen múltiple a una Base de datos de destino único)

{
        "SRC_AIC_INSTALLATION_VERSION": "20.10",
        "SRC_SERVER": "sankar-sf-migration1sqlserver.database.windows.net",
        "SRC_PKGMANAGER_DB_NAME": "aifabric_pkgmanager",
        "SRC_PKGMANAGER_DB_SCHEMA": "ai_pkgmanager",
        "SRC_PKGMANAGER_DB_USERNAME": "test_1",
        "SRC_PKGMANAGER_DB_PASSWORD": "test_1",
        "SRC_TRAINER_DB_NAME": "aifabric_trainer",
        "SRC_TRAINER_DB_SCHEMA": "ai_trainer",
        "SRC_TRAINER_DB_USERNAME": "test_2",
        "SRC_TRAINER_DB_PASSWORD": "test_2",
        "DESTINATION_SERVER": "sfdev2290542-9a5254d2-sql.database.windows.net",
        "DESTINATION_DB_NAME": "AutomationSuite_AICenter",
        "DESTINATION_PKGMANAGER_DB_SCHEMA": "ai_pkgmanager",
        "DESTINATION_TRAINER_DB_SCHEMA": "ai_trainer",
        "DESTINATION_DB_USERNAME": "test",
        "DESTINATION_DB_PASSWORD": "test",
        "TENANT_MAP": [
                {
                        "SRC_TENANT_ID": "d1eb428c-e188-46bf-a1dd-8908f90b4084",
                        "DESTINATION_TENANT_ID": "03527165-b242-4b98-834f-2eb3e5957223",
                        "DESTINATION_ACCOUNT_ID": "8cd64e27-12f4-427c-a575-dd4f2ea82551"
                }
        ]
}
{
        "SRC_AIC_INSTALLATION_VERSION": "20.10",
        "SRC_SERVER": "sankar-sf-migration1sqlserver.database.windows.net",
        "SRC_PKGMANAGER_DB_NAME": "aifabric_pkgmanager",
        "SRC_PKGMANAGER_DB_SCHEMA": "ai_pkgmanager",
        "SRC_PKGMANAGER_DB_USERNAME": "test_1",
        "SRC_PKGMANAGER_DB_PASSWORD": "test_1",
        "SRC_TRAINER_DB_NAME": "aifabric_trainer",
        "SRC_TRAINER_DB_SCHEMA": "ai_trainer",
        "SRC_TRAINER_DB_USERNAME": "test_2",
        "SRC_TRAINER_DB_PASSWORD": "test_2",
        "DESTINATION_SERVER": "sfdev2290542-9a5254d2-sql.database.windows.net",
        "DESTINATION_DB_NAME": "AutomationSuite_AICenter",
        "DESTINATION_PKGMANAGER_DB_SCHEMA": "ai_pkgmanager",
        "DESTINATION_TRAINER_DB_SCHEMA": "ai_trainer",
        "DESTINATION_DB_USERNAME": "test",
        "DESTINATION_DB_PASSWORD": "test",
        "TENANT_MAP": [
                {
                        "SRC_TENANT_ID": "d1eb428c-e188-46bf-a1dd-8908f90b4084",
                        "DESTINATION_TENANT_ID": "03527165-b242-4b98-834f-2eb3e5957223",
                        "DESTINATION_ACCOUNT_ID": "8cd64e27-12f4-427c-a575-dd4f2ea82551"
                }
        ]
}

SRC_TENANT_ID puede obtenerse siguiendo los pasos que se indican a continuación:

  1. Haz clic en el logotipo de UiPath en la página de inicio de la aplicación AI Center.

  2. Haz clic con el botón derecho en el navegador y ve a examinar. Cuando la ventana de examinar se abra, marca la pestaña de red para proyectos de llamada a la API. El ID de tenant puede verse en la sección Vista Preliminar como muestra la siguiente captura de pantalla.

  3. Añade el DNS del almacenamiento del objeto de la máquina de Automation Suite en la máquina que ejecuta el script. Este se encuentra en la pestaña de extensión del proceso desde donde se creó el entorno de Automation Suite.

    sudo bash -c "echo "LB_IP objectstore.DNS_NAME" >> /etc/hosts"
    sudo bash -c "echo "LB_IP objectstore.DNS_NAME" >> /etc/hosts"
    

Step 5: Run the migration script

Dirígete a la carpeta en la que se ha descargado sfmigration" id="1"/> en el directorio Uso: ejecuta el siguiente comando:

cd ~/migration/ai-customer-scripts/platform/sfmigration/

 ./mastermigrationscript.sh input.json
cd ~/migration/ai-customer-scripts/platform/sfmigration/

 ./mastermigrationscript.sh input.json

Solución de problemas

Crear tenants

El tenant necesita crearse en el entorno de Automation Suite antes de ejecutar el script de migración.

Volver a ejecutar la migración

El script de migración está destinado a migrar conjuntos de datos y paquetes ML solo una vez. En pocas ocasiones existen conjuntos de datos adicionales o paquetes ML añadidos en el entorno fuente después de terminar la migración, entonces, en este caso, la migración necesita volver a ejecutarse. Ejecuta los siguientes comandos en la base de datos de destino antes de volver a ejecutar la migración:

delete from [ai_pkgmanager].[ml_package_versions_temp];
delete from [ai_pkgmanager].[projects] where tenant_id in ('T1','T2',...);
delete from [ai_pkgmanager].[ml_packages] where tenant_id in ('T1','T2',...);
delete from [ai_pkgmanager].[ml_package_versions] where tenant_id in ('T1','T2',...);
delete from [ai_trainer].[datasets] where tenant_id in ('T1','T2',...);
delete from [ai_pkgmanager].[ml_package_versions_temp];
delete from [ai_pkgmanager].[projects] where tenant_id in ('T1','T2',...);
delete from [ai_pkgmanager].[ml_packages] where tenant_id in ('T1','T2',...);
delete from [ai_pkgmanager].[ml_package_versions] where tenant_id in ('T1','T2',...);
delete from [ai_trainer].[datasets] where tenant_id in ('T1','T2',...);

'T2'" id="2"/>NOTA : ,'T1'" id="1"/>,... en la consulta anterior están los UUID de tenant en el entorno de destino. Estas son las DESTINATION_TENANT_ID como se menciona en el archivo input.json" id="3"/> pasado al ejecutar el script de migración ./mastermigrationscript.sh input.json

A continuación, puedes volver a ejecutar la migración utilizando los siguientes comandos:

cd ~/migration/ai-customer-scripts/platform/sfmigration/

./mastermigrationscript.sh input.json
cd ~/migration/ai-customer-scripts/platform/sfmigration/

./mastermigrationscript.sh input.json

Paquetes clonados

Después de la migración, los paquetes ML clonados presentes en el entorno fuente, se marcarán como VALIDATION_FAILED" id="1"/> en el entorno de Automation Suite. Estos paquetes deben clonarse de nuevo en el entorno de destino una vez haya finalizado la migración.

Nota:

In this case, cloned packages refers to the packages from UiPath and Open-Source Packages.

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte

¿Quiere aprender? UiPath Academy

¿Tiene alguna pregunta? Foro de UiPath

Manténgase actualizado