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:

Export options

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

Export dependencies

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

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:

Import dependencies

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.