Skip to content

Latest commit

 

History

History
75 lines (57 loc) · 5.33 KB

README.md

File metadata and controls

75 lines (57 loc) · 5.33 KB

Segue and Isaac Server project

Segue is a Java (J2EE) Content Management System that ingests JSON content from a git repository and builds an augmented and queryable content model. This model is exposes a number of useful REST endpoints.

Features include:

  • Single Sign On with Google, Facebook and Twitter
  • Local account creation via creating a username and password.
  • An accompanying structured content editor (https://github.com/ucam-cl-dtg/scooter)
  • Logging of all user events for the purpose of research and analysis
  • An extensible architecture so that it can be extended for other Content Management Projects.
  • Allows questions to be marked and results to be reported.

Note: currently the project is used for isaacphysics and as such there are some isaac specific functions included in this project. These, have been kept to the uk.ac.cam.cl.dtg.isaac.api package and can be deleted if you wish to fork this project. We will separate these out in the near future. The segue packages are reusable and it should be possible to use it as a stand alone server.

Prerequisites

  • Elastic Search (v1.4.x) - Windows Installation, Linux Installation
  • Git
  • MongoDb (optional depending on configuration)
  • Postgres (optional depending on configuration) - database build files are located: /src/main/resources/db_scripts
  • Tomcat 8 (for deployment. Not required for local development, which uses Jetty)
  • Check out of a git content repository containing json files for any content that should be served.

Deployment build

For a build that is configured to run on a remote linux server (as this is the intended deployment platform) you can run: mvn clean package -P deploy

This will produce the war file for deployment in the /var/lib/tomcat8/webapps directory along with a folder called generated-config containing auto generated sample configuration files.

These config files are auto generated by the parameters specified in the /profiles/deploy and /profiles/local directories. The only two properties that must be configured prior to building are GENERAL_CONFIG_LOCATION and LIVE_VERSION_CONFIG_LOCATION. These can be changed in /profiles/deploy-config.properties or profiles/local/local-config.roperties. If you change these you will need to run mvn clean package -P deploy again to make sure the war file is correctly configured. We intend to improve this in the future.

Configuration files are:

  • segue-config.properties - by default the war expects a file based on this generated file here /local/data/rutherford/conf/segue-config.properties
  • live-version.properties - by default the war expects a file based on this generated file here /local/data/rutherford/conf/live-version.properties

To change the default locations or default values for these generated files you should edit the file: profiles/deploy/deploy-config.properties.

Local Dev Builds

The local build process is the same as the deployment build process above but it will default to using a different source file for parameters.

Customise this file for local build settings: /profiles/local/local-config.properties

mvn clean package -P local

Local configuration will need to be customised for each machine but you can build a war this using command.

The local build is set as the default profile so eclipse is happy.

To run the local development Jetty server, do mvn jetty:run

Installation Notes

  1. After installing the pre-requisites check the config files under profiles/deploy and profiles/local and edit the values accordingly.
  2. Build the segue CMS using the instructions above (alternatively if you are building isaacphysics you can use segue_isaac_build.sh). N.B. If you want to change where the main config files are stored you must change it in /profiles/deploy-config.properties or profiles/local/local-config.roperties before running the build script. In particular GENERAL_CONFIG_LOCATION and LIVE_VERSION_CONFIG_LOCATION
  3. Install the war file so that it is unpacked on a local tomcat8 server e.g. /var/lib/tomcat8/webapps
  4. Create a rutherford data directory somewhere for config files and git databases to be stored. The application defaults to /local/data/rutherford/ and /local/data/rutherford/conf
  5. The directory in here must have read-write access for the tomcat8 user
  6. Update the automatically generated config files (these are created by segue_isaac_build.sh and stored in the generated-config folder).
  7. Copy the generated config files into the location specified in GENERAL_CONFIG_LOCATION and LIVE_VERSION_CONFIG_LOCATION.
  8. Ensure that a git repository is available for segue to use as a database (see property LOCAL_GIT_DB) - tomcat user requires read-write permissions.
  9. Ensure that elasticsearch, postgres and mongodb are running before starting tomcat8 and deploying the web app.
  10. The API endpoints should be available for testing using the deployed Swagger library from isaac-api/api-docs/ e.g. https://isaacphysics.org/api-docs/

Isaac project specific environments