Page tree
Skip to end of metadata
Go to start of metadata

To aid easy migration, UnifiedViews application provides a bash utility for exporting the whole application with its configuration and state into a single TAR archive. This archive can further be copied to a different machine, where it can be easily deployed through automatic process using importing bash utility. Both utilities are provided for Unix systems only. If you are migrating UnifiedViews application to a Windows machine, please use the Installation Guide to do a clean install. Then migrate configuration, database, DPU modules, and caches manually.

Export utility

Utility for exporting UnifiedViews is a bash script placed in 'deploy/export.sh' in the project root. Tool assumes it is a part of the project workspace, where both applications frontend and backend are available in their respective build directories in the same state they are intended to be included in the exported archive. The exported file is a gzip-compressed TAR archive, and the same file is used for import. The contents of the TAR archive are the following:

  • file 'unifiedviews.war' ready to be deployed on Apache Tomcat (frontend),
  • file 'backend.jar' ready to be executed as a Java application (backend),
  • file 'config.properties' containing configuration for backend,
  • file 'schema.sql' containing database schema for platform specified in config.properties,
  • file 'data.sql' containing data for database platform specified in config.properties,
  • directory 'target/dpu' containing jar files for DPUs,
  • directory 'target/lib' containing libraries for DPUs,
  • directory 'workingdir' containing data of pipeline executions.

Export options

Export utility is configured through options. All options are optional, and thus have a default value. The following options are configurable:

  • -p    Path to the project root.
    • By default directory above the script location is used.
  • -c    Path to the backend configuration of the application to be exported.
  • -t    Path to the directory where the export is to be created.
    • By default this is the current working directory.
  • -v   Command to use as Virtuoso dumping tool.
    • By default 'dbdump' is used.

Export dependencies

Export utility further requires some dependencies, which should already be a part of standard Linux setup:

  • Bash
    • Unix shell
  • dbdump
    • Dumping tool for Virtuoso database. Only required if UnifiedViews is configured to use Virtuoso database.
  • mysqldump
    • Dumping tool for MySQL database. Only required if UnifiedViews is configured to use MySQL database.
  • TAR
    • Archiving utility.

The exporting process

  1. Create directory uv-export, which will be used as a working directory for export procedure.
  2. Copy config.properties given through -c option into uv-export.
  3. Read configuration uv-export/config.properties, as we need to know database platform and login.
  4. Copy frontend/target/unifiedviews.war into uv-export.
  5. Copy backend/target/backend.jar into uv-export.
  6. Copy target directory with DPU module JARs and libs into uv-export.
  7. Copy db/{platform}/rdbms/schema.sql to uv-export, where {platform} is the database platform found in configuration (virtuoso or mysql).
  8. Connect to database and dump data to uv-export/data.sql.
  9. Create TAR archive with contents of uv-export.

After the export procedure TAR archive is created in the current working directory. This archive represents UnifiedViews application state and can be easily copied and migrated to different destination.

 

Import utility

Utility for importing UnifiedViews is a bash script placed in 'deploy/import.sh' in the project root. The archive to be imported should be produced by exporting utility. As will be described in more detail shortly, import procedure works interactively and is able to deploy frontend application to Apache Tomcat as well as launch backend application if user agrees so. Therefore the import utility can also serve as an installer for a release exported in a TAR archive.

Import options

Import utility is configured through options. All options are optional, and thus have a default value. After all listed options, there is one required argument - path to the TAR archive which is to be imported. The following options are configurable:

  • -p    Path to the project root.
    • By default directory above the script location is used.
  • -c    Path where the backend configuration is to be created.

  • -v    Command to use for Virtuoso isql client.
    • By default 'isql' is used.

Import dependencies

  • Bash
    • Unix shell
  • isql
    • Virtuoso database client. Only required if UnifiedViews is configured to use Virtuoso database.
  • mysql
    • MySQL database client. Only required if UnifiedViews is configured to use MySQL database.
  • TAR
    • Archiving utility.
  • cURL
    • Command line tool used as HTTP client for deploying war file to Tomcat. Only required if user agrees to deploy during import.

The importing process

  1. Create directory uv-export, which will be used as a working directory.
  2. Untar contents of TAR archive into uv-export.
  3. Read uv-export/config.properties, so we have DB login and platform.
  4. Run uv-export/schema.sql to delete and recreate database schema.
  5. Run uv-export/data.sql to import data.
  6. Copy and overwrite {module.path}/dpu with uv-export/dpu, where {module.path} is is taken from loaded configuration.
  7. Copy and overwrite {module.path}/lib with uv-export/lib.
  8. Copy uv-export/backend.jar to backend/target/backend.jar
  9. Copy uv-export/config.properties to target path of backend configuration given in option.
  10. Ask user whether to deploy frontend on Apache Tomcat. If so ask for login and deploy the application through HTTP (cURL).
  11. Ask user whether to start backend, if so start in background.

 

 

  • No labels