Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To aid easy migration, ODCS 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 ODCS 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 ODCS 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:

...

  • -c    Path to the backend configuration of the application to be exported.
  • By default this is the path '$HOME/.odcs/config.properties'
  • -t    Path to the directory where the export is to be created.
    • By default this is the current working directory.

...

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

The exporting process

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

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

...

Import utility

Utility for importing ODCS 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.

...

  • -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.

  • By default this is the path '/home/janvojt/.odcs/config.properties'.
  • -v    Command to use for Virtuoso isql client.
    • By default 'isql' is used.

...

  • Bash
    • Unix shell
  • isql
    • Virtuoso database client. Only required if ODCS UnifiedViews is configured to use Virtuoso database.
  • mysql
    • MySQL database client. Only required if ODCS 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 odcsuv-export, which will be used as a working directory.
  2. Untar contents of TAR archive into odcsuv-export.
  3. Read odcsuv-export/config.properties, so we have DB login and platform.
  4. Run odcsuv-export/schema.sql to delete and recreate database schema.
  5. Run odcsuv-export/data.sql to import data.
  6. Copy and overwrite {module.path}/dpu with odcsuv-export/dpu, where {module.path} is is taken from loaded configuration.
  7. Copy and overwrite {module.path}/lib with odcsuv-export/lib.
  8. Copy odcsuv-export/backend.jar to backend/target/backend.jar
  9. Copy odcsuv-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.

...