After upgrading Cameo Collaborator for Teamwork Cloud from version 19.0-19.0 SP4 to version 2021x or a later, you need to migrate all the published Cameo Collaborator documents to a new version as well. This chapter explains how to perform an automated Cameo Collaborator document migration on Linux OS from the command-line interface using scripts. The workflow described below will update all the documents in the Teamwork Cloud server using the whole model as a scope.

Prerequisites

Migrating Cameo Collaborator documents using scripts consists of the following steps:

  1. Generate template properties files by using the template_properties_generator.sh script.
  2. Migrate documents by using the generated template properties files and the template_publisher.sh script.


Generating template properties files

Use the the template_properties_generator.sh script to generate template properties files as described below.


To generate template properties files


  1. Specify the credentials of the user who will migrate Cameo Collaborator documents by doing one of the following:
    • If you are the user who will migrate documents, open the template_properties_generator.sh file and uncomment the following lines (remove the # symbol):

      #sed -ri "s%server_username=.+$%server_username=$USER_NAME%" $templatePath
      #sed -ri "s%server_password=.+$%server_password=$PASSWORD%" $templatePath
    • If you are NOT the user who will migrate documents, open the <modeling_tool_install_directory>/plugins/com.nomagic.collaborator.publisher/template.properties file and change the values of the following properties to the credentials of the user who will perform document migration:

      server_username=<user_name>
      server_password=<password>
  2. In the template_properties_generator.sh file specify the following properties (you can skip this step and specify the required properties when running the script):

    # Optionally specify the version you want to migrate documents to. The default value is 2021x.
    VERSION=${VERSION:-'2021x'}
    
    # Optionally specify the Teamwork Cloud user name. The default value is Administrator.
    USER_NAME=${USER_NAME:-"Administrator"}
    
    # Optionally specify the Teamwork Cloud user password. The default value is Administrator.
    PASSWORD=${PASSWORD:-"Administrator"}
    
    # Specify the Teamwork Cloud server IP address.
    TWC_IP=${TWC_IP}
    
    # Specify the path to the modeling tool template properties directory.
    # The path should be <modeling_tool_installation_directory>/plugins/com.nomagic.collaborator.publisher
    MD_TEMPLATE_PATH=${MD_TEMPLATE_PATH}
    
    # Specify the path to the directory where the generated template properties files should be saved.
    GENERATED_TEMPLATE_PATH=${GENERATED_TEMPLATE_PATH}
  3. Execute the template_properties_generator.sh script to generate template properties files.

    Example of how to execute the script
    GENERATED_TEMPLATE_PATH=<path_to_directory_for_generated_templates> TWC_IP=<TWC_IP_or_domain> MD_TEMPLATE_PATH=<Path_to_Cameo_Collaborator_Publisher> VERSION=<version_to_migrate_documents_to> ./ template_properties_generator.sh


Migrating Cameo Collaborator documents

Once you generate template properties files as described in the previous section, you can migrate Cameo Collaborator documents by using the template_publisher.sh script.

It is recommended to distribute the template properties files to several virtual machines and run the template_publisher.sh script in parallel.


To migrate Cameo Collaborator documents


  1. Open the template_publisher.sh file and specify the following properties (you can skip this step and specify the required properties when running the script):

    # Optionally specify the version you want to migrate documents to. The default value is 2021x.
    VERSION=${VERSION:-'2021x'}
    
    # Specify the path to the modeling tool template properties directory.
    # The path should be <modeling tool installation directory>/plugins/com.nomagic.collaborator.publisher
    MD_TEMPLATE_PATH=${MD_TEMPLATE_PATH}
    
    # Specify the path to the directory where the generated template properties files are saved.
    GENERATED_TEMPLATE_PATH=${GENERATED_TEMPLATE_PATH}
  2. Execute the template_publisher.sh script to migrate Cameo Collaborator documents.

    Example of how to execute the script
    GENERATED_TEMPLATE_PATH=<path_to_generated_templates> TWC_IP=<TWC_IP_or_domain> MD_TEMPLATE_PATH=<path_to_Cameo_Collaborator_Publisher> VERSION=<version_to_migrate_documents_to> ./template_publisher.sh