ai-center
2024.10
true
UiPath logo, featuring letters U and I in white

AI Center User Guide

Automation CloudAutomation SuiteStandalone
Last updated Nov 11, 2024

Procedure

For an overview of the procedure, check the steps below. Each step is detailed in the following pages.
  1. Create a tenant with the same name in the Automation Suite or new AI Center environment.
  2. Generate the storage-cred.json file on the first machine (also referred as Source Machine).
  3. Generate the storage-creds.json file on the second machine.
  4. Configure the machine executing the script.
  5. Run the migration script.

Step 1

Create a corresponding tenant in the Automation Suite or new AI Center environment for every tenant that you want to migrate.

Step 2

This step needs to be run on the first machine, the one you want to migrate to the new environment.

  1. Connect using SSH to the machine you want to migrate.
  2. Generate the storage-cred.json file by executing the command below:
    wget https://raw.githubusercontent.com/UiPath/ai-customer-scripts/stable/platform/sfmigration/storagemigration/get-credentials.sh
    
    chmod 777 get-credentials.sh
    
    ./get-credentials.shwget https://raw.githubusercontent.com/UiPath/ai-customer-scripts/stable/platform/sfmigration/storagemigration/get-credentials.sh
    
    chmod 777 get-credentials.sh
    
    ./get-credentials.sh
    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}
    If the error message from below is displayed after running the above script, run the bash -1 command and try running the above script again.
    docs image
The generated file (storage-creds.json) will be used in further steps. Make sure that you copy and save the content of the file locally.

Step 3

This step needs to be run on the second machine, the one running on the Automation Suite environment.

  1. Open port 22 on the Automation Suite machine.
  2. Connect using SSH to the Automation Suite machine.
  3. Run the command below:
    sudo su
    
    export KUBECONFIG=/etc/rancher/rke2/rke2.yaml PATH=$PATH:/var/lib/rancher/rke2/binsudo su
    
    export KUBECONFIG=/etc/rancher/rke2/rke2.yaml PATH=$PATH:/var/lib/rancher/rke2/bin
  4. Download the credential file by executing the command below:
    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.shwget 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
The generated file (storage-creds-sf.json) will be used in further steps. Make sure that you copy and save the content of the file locally.

Step 4

Before going through the steps below, create a tenant with the same name in the Automation Suite environment manually. Whichever tenant has to be migrated, a corresponding tenant must be created in Automation Suite as well.

This step needs to be run on the machine executing the script.

  1. Run the command below to download the migration script. This will download the script from a public git repository:
    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. Replace the content in the SOURCE_CREDENTIAL_FILE file with the content from storage-creds.json (see Step 2).
  3. Replace the content in the TARGE_CREDENTIAL_FILE file with the content from storage-creds-sf.json (see Step 3).
  4. Go to the base directory by running the following command:
    cd ~/migration/ai-customer-scripts/platform/sfmigration/cd ~/migration/ai-customer-scripts/platform/sfmigration/
  5. Replace the details in the input.json file. For easier reference, the credentials are marked as TO-BE-REPLACED in the input.json file.
The sample JSON file with the description of each field is mentioned below:
{
"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
}
]
Sample input.json file with filled sample values for reference:
{
        "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"
                }
        ]
}
Note: SRC_TENANT_ID can be obtained by following the steps below:
  • Click on the UiPath® logo on the home age of the AI Center application.
  • Right click on the browser and go to inspect .Once the inspect window is opened , check the network tab for projects API call. Tenant Id can be seen in the Preview Section.
  • Add the DNS of the object storage of the Automation Suite machine in the machine executing script. This can be found in the extension tab of the pipeline from where the Automation Suite environment was created.
    sudo bash -c "echo "LB_IP objectstore.DNS_NAME" >> /etc/hosts"sudo bash -c "echo "LB_IP objectstore.DNS_NAME" >> /etc/hosts"

Step 5

Go to the folder where the sfmigration is downloaded in the Usage directory and run the following command:
cd ~/migration/ai-customer-scripts/platform/sfmigration/
 
 ./mastermigrationscript.sh input.jsoncd ~/migration/ai-customer-scripts/platform/sfmigration/
 
 ./mastermigrationscript.sh input.json
  • Step 1
  • Step 2
  • Step 3
  • Step 4
  • Step 5

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.