03 Projekt Setupguide ONYX
System requirements
All components
- Linux-based OS
- Java 21
- Apache Tomcat 9 (latest update)
ONYX Editor (additionally)
- PostgreSQL 16
- Java unlimited security enabled
Download from http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
Build process
- Linux-based OS
- Java 11 (latest update, Oracle or OpenJDK)
- Eclipse for JEE (Kepler or later)
- Maven2
- Eclipse Maven integration (m2)
Inhalt
Steps for build
All ONYX parts are delivered as Eclipse projects
- preOnyx (ONYX QTI test player)
- preWebEditor (ONYX QTI test editor)
- onyx (ONYX QTI core)
- LaTeXRenderer (LaTeX image renderer connector, used to render LaTeX math formulas to images, which can be included in PDFs. This project only offers an interface to connect whatever lib you want, e.g. jlatexmath (GPL, delivered as example)
- Use Eclipse
- Import -> Existing project, start with LaTeXRenderer project
- Import all four projects
Due to license restrictions the project LaTeXRenderer is not linked or integrated by default. This must be done manually.
Maven will build all projects automatically (you can do this manually on console, anyhow this is not tested in development environment and may disturb Eclipse Maven integration)
Setup database for ONYX Editor
- Locate setupdatabase.postgre.sql
- Log on to Postgres
- Create user owe with password owe
- Create database owe and assign to user owe
- Import setupdatabase.postgre.sql to this database
Hint: you may use other user/database names, change configuration in
Changes on ONYX QTI core
Since all ONYX components are managed by Maven, the ONYX QTI core from BPS Maven artifactory is used by default. If you want to change some code you are required to create a JAR from project onyx on your own and either adopt the pom.xml references in preWebOnyx and preWebEditor to your own artifactory or put the JAR in classpath.
Configuration
preWebOnyx
- Locate onyxplugin.default.config.xml, copy it to a classpath folder and rename to onyxplugin.config.xml
- Configure as needed
- Service provider named “preview” is required if used as preview instance for ONYX Editor
preWebEditor
- applicationContext.xml: general configurations (database, mail configuration, preview ONYX (you can change this to your local installation), ...)
- metadataConfigurationContext.xml: normally no changes needed as long as no further metadata are required
- moduleConfigurationContext.xml: repository configuration
- pageModelContext.xml: normally no changes required, defines the main tabs in shown application
- webServiceContext.xml: reporter statistics connection, can be changed to your local ONYX installation
Deployment
- Deploy preWebOnyx and preWebEditor to Tomcat in Eclipse (it is recommended to use two Tomcat servers in Eclipse to be able to restart both independently)
- Configure Tomcat deployment to use different ports
- Check path the applications are mounted to
- Start Tomcat(s)
- Call http://localhost:<port>/<path> in browser
Important notes
Before running any ONYX application in Eclipse/Tomcat, always clean Tomcat Work Directory first. This is also required in server environment after each update. Since ONYX creates large amounts of temporary files in server environment it is also strictly recommended to clean servers and tomcat temp directory before each application starts.
When run from Eclipse/Tomcat ONYX applications may not shut down properly. In this case just “kill” them using the red “Terminate” button in console view.
In server environment ONYX applications uses memory strongly dependent from load and users activities. BPS runs them with 8 GB each.