Rate This Document
Findability
Accuracy
Completeness
Readability

Uploading a Large File

If the file to be uploaded is greater than the upper limit or the file size after decompression is greater than half of the remaining drive space, you need to free up some drive space or manually upload the file to the server and use WebUI to perform subsequent operations. Or you can directly use the CLI mode (applicable only to source code porting and software porting assessment).

Uploading Files to the Server

The following uses /opt as an example tool installation directory. Replace it with the actual directory.

  1. Obtain the file to be uploaded.
  2. Save the file to be uploaded in a subdirectory of the created user's directory. (Table 1 lists the possible directories.) The following describes how to use the devadmin user to upload the source file.
    1. Use an SFTP tool (for example WinSCP) to log in to the server OS as the root user.
    2. Copy the source file to be scanned to the /opt/DevKit/workspace/devadmin/porting/sourcecode/ directory.
      Table 1 Directories to which files are manually uploaded

      Feature

      Directory

      Software porting assessment

      /opt/DevKit/workspace/devadmin/porting/package/

      Source code porting

      /opt/DevKit/workspace/devadmin/porting/sourcecode/

      Batch importing source components

      /opt/DevKit/workspace/devadmin/porting/sysmig/no_source_package

      Image

      /opt/DevKit/workspace/devadmin/porting/sysmig/images/

      Mounted volume

      /opt/DevKit/workspace/devadmin/porting/sysmig/volumes/

      Container layer

      /opt/DevKit/workspace/devadmin/porting/sysmig/containers/

      Redis data

      /opt/DevKit/workspace/devadmin/porting/sysmig/data/

      Source component package (application)

      /opt/DevKit/workspace/devadmin/porting/sysmig/src/Application

      Source component package (middleware)

      /opt/DevKit/workspace/devadmin/porting/sysmig/src/${Component_name}

      Target component package

      /opt/DevKit/workspace/devadmin/porting/sysmig/target/${Component_name}

      Note 1: Determine the paths to the source and target component packages as prompted.

      Note 2: Perform 2.c to 2.e only for source code porting.

      If a feature directory does not exist, manually create it. For example, upload source code porting files as devadmin:

      1
      2
      3
      mkdir -p /opt/DevKit/workspace/devadmin/porting/sourcecode/
      chown -R devkit:devkit /opt/DevKit/workspace/devadmin/porting/
      chmod -R 700 /opt/DevKit/workspace/devadmin/porting/
      

      /opt is the default installation directory. Replace it with the actual one.

    3. Switch to the directory where the file is located.
      1
      cd /opt/DevKit/workspace/devadmin/porting/sourcecode/
      
    4. Decompress the file, for example, a tar.gz file. If the file does not need to be decompressed, skip this step.
      1
      tar -zxvf xxx.tar.gz
      
    5. Change the file owner group and permission (xxx indicates the decompressed folder or the folder uploaded by the user).
      chown -R devkit:devkit xxx
      find xxx -type d -exec chmod 700 {} \;
      find xxx -type f -exec chmod 600 {} \;

      If you do not run the chown -R devkit:devkit xxx command, run the following chmod command:

      1
      chmod -R o+rw xxx
      

CLI Mode

Before using the source code porting and software porting assessment function, you need to install the Porting Advisor CLI tool. For details, see Porting Advisor.