Using the Linux shell to upgrade existing Lookup Manager and ITE applications

This procedure describes how you upgrade a Lookup Manager or ITE application that was created with an earlier version of the TEDA application framework, by using the teda-create-project command-line tool.

Before you begin

Install and configure Streams.

Identify the applications that you want to upgrade. If you have Lookup Manager and ITE applications that belong together, you must upgrade all of these applications.

About this task

Upgrade a Lookup Manager or ITE application to the newest version of the application framework and toolkit by using the teda-create-project command-line tool. Run the procedure for each application that you want to upgrade.

For the fifth step, you can prepare an XML input file that contains the settings for all applications you want to upgrade. That means, that you must complete steps 1 until 3 for all projects before you start with step 4.

Procedure

  1. Open a console window.
  2. Change the current working directory to the <PathToYourWorkspace> directory. For example,

    
    cd <PathToYourWorkspace>
    
  3. Rename the project that you want to upgrade. For example, you can add the extension .backup.

    You can use the Linux mv (move) command. For example,

    
    mv <YourProjectFolder> <YourProjectFolder>.backup
    
  4. Use the teda-create-project command-line tool to create a new project. Perform the following steps:

    • Create the XML input file for the teda-create-project tool. If the XML input file exists because you created it in the past, you can skip this step and the next five steps and run the command. Copy the template to get a working copy in your current working directory. For example:
      
      cp $STREAMS_INSTALL/toolkits/com.teracloud.streams.teda/etc/templates/TelcoFrameworkSample.xml ./
      
    • Open the TelcoFrameworkSample.xml file in an editor

    • Change <ProjectBase> to your workspace path: <ProjectBase><PathToYourWorkspace><ProjectBase>

      For example:

      
      <ProjectBase>/home/myuser/workspace<\ProjectBase>
      
    • Set the XML Namespace attributes to the namespaces that are used in the original projects. For example:

      
      <ITEMain … Namespace="<YourITEProjectNamespace>" …/>
      <LookupMgr … Namespace="<Your LookupMgrProjectNamespace>" …>
      
    • Set the XML ApplicationFolder attributes to the project folders that are used in the original projects. For example:

      
      <ITEMain … ApplicationFolder="<YourProjectFolder>" …/>
      <LookupMgr … ApplicationFolder="<YourProjectFolder>" …>
      
    • Save the TelcoFrameworkSample.xml file and close the editor.

    • Run the following command to create the project or the projects:

      
      teda-create-project -x TelcoFrameworkSample.xml -f
      
  5. Copy the customized sources from <YourRenamedProject> to the new <YourProject>. You can use a file browser or the command line to copy the content of the following directories or files from the backup project to the same location in the new project.

    a. For an ITE application,

    • Copy the following sources:
      • <YourRenamedProjectFolder>/etc
      • <YourRenamedProjectFolder>/*.custom (means: all directory names that end with .custom)
      • <YourRenamedProjectFolder>/xxx (means: any required directory that you introduced with your original project)
      • <YourRenamedProjectFolder>/config

      For example:

      
      YourProjectFolder=$HOME/workspace/yourProject
      cd $HOME/workspace/yourProject.backup # = YourRenamedProjectFolder
      cp -v --parents --recursive --preserve=all -t $YourProjectFolder etc *.custom config
      
    • Update your customized code according to the description in the Migrating customized code chapter.If your implementation does not follow the typical customizing procedures then the mentioned chapter describes the necessary code changes. You can use it as a hint to determine the relevant parts of your customized code that needs migration for the new features.

    b. For a Lookup Manager application copy the following sources:

    • <YourRenamedProjectFolder>/LookupMgrCustomizing.xml
    • <YourRenamedProjectFolder>/connections.xml
    • <YourRenamedProjectFolder>/config/config.cfg

    For example: YourProjectFolder=$HOME/workspace/yourProject

    
    cd $HOME/workspace/yourProject.backup # = YourRenamedProjectFolder
    cp -v --parents --preserve=all -t $YourProjectFolder LookupMgrCustomizing.xml connections.xml config/config.cfg
    
  6. Build the upgraded application. For example, change the current working directory to <YourProjectFolder> and run make. For example:

    
    cd <YourProjectFolder>; make all; cd -
    
  7. Use your existing test suites to verify that the upgraded application works as expected.

  8. If you have a backup of your original project in a source control management system, you can delete the renamed and old project from your workspace. For example, run the rm -rfv <YourRenamedProjectFolder> command. If you do not use a source control management system and neither created another backup of the original project, you should keep the renamed project in your workspace.