Importing project data for migration

Learn about importing Project data for migration.

Consider the following validation activities before the export activity:
  • Check if the user exists and is authorised to migrate the project.
  • Check if the rsync custom Runtime is available in the Target Runtime Catalog.
  • Check if the local output directory and the project metadata file exist on the third machine used.
  1. Create the import-config.ini file inside the <home-dir>/.cmlutils directory.
  2. Create a section for each project in the import-config.ini file, where you can include project-specific configurations. Place the common configurations shared across projects in the DEFAULT section.
    Example export-config.ini file:
    [DEFAULT]
    url=<Destination-Workspace-url>
    output_dir=~/Documents/temp_dir
    ca_path=~/Documents/custom-ca-target.pem
    username=user-default
    apiv1_key=user-default-dummy-key
    
    [Project-A]
    username=user-1
    apiv1_key=user-1-api-key
    
    [Project-B]
    username=user-2
    apiv1_key=user-2-api-key
    
    [Project-C] # Uses [DEFAULT] configuration as it doesn't have specific configuration
    The following configuration details have been used in the example file:
    • username: This is the username of the user who is migrating the project, which is a mandatory element.
    • url: This is the target workbench URL, which is a mandatory element.
    • apiv1_key: This is the source API v1, Legacy API key, element, which is mandatory.
    • output_dir: This is a temporary directory on the local machine where the project data or metadata is stored. This is a mandatory element.
    • ca_path: This is the path to a Certifying Authority (CA) bundle to use, in case Python is not able to pick up the CA from the system and the SSL certificate verification fails. This issue might occur with MacOS. this is an optional element.
  3. Import the project by running the following command:
    cmlutil project import -p "Project-A" 
    or
    cmlutil project import -p "Project-B"
    You can also import the project and initiate validation at the same time by using one of the following commands:
    cmlutil project import -p "Project-A" -v 
    or
    cmlutil project import -p "Project-B" --verify
    The above cmlutil command initiates a session in the source and validates the following aspects:
    • Consistency of project files between the source and local directories (directories created on the bastion host).
    • Consistency of project files between the local directory and the target.
    • Consistency in the count of Jobs, Models, and Applications between the source and target.
    • Consistency in the metadata of Jobs, Models, and Applications between the source and target.
  • The Project is created in the target workbench.
  • All the Project files, artifacts and logs corresponding to the Project are downloaded to the Project folder.
  • The import metrics JSON is created and it contains information related to the imported Project.