Skip to content
Snippets Groups Projects
Select Git revision
  • redesign
  • development default protected
  • more_forwarding_to_staff
  • main protected
  • 389-queue-2-0-modules-page-pagination
  • 739-add-pdf-support-for-presentation-slides
  • 454-selection-for-student-groups-with-multiple-students
  • ask-why-student-requeued
  • 571-allowed-assignments-for-multiple-roles
  • 552-trying-to-create-a-lab-without-specifying-any-request-type-leads-to-oops-screen
  • 628-add-a-button-for-tas-to-redirect-a-request-to-a-head-ta-and-or-lecturer
  • 729-re-think-lab-create-page
  • busy-lab-notification
  • 732-allow-lab-creation-based-on-mytimetable-schedule
  • accountability
  • 691-notification-for-staff-about-busy-lab
  • profile
  • 695-refactor-methods-in-requesttableservice
  • 99-allow-adding-students-staff-using-email-student-number-name
  • flag-feedback
  • fix-mysql-tests
  • 2425.0.1-release protected
  • 2425.0.0-release protected
  • 2.3.2-release protected
  • 2.3.0-release protected
  • 2.2.2-release protected
  • 2.2.1-release protected
  • 2.2.0-release protected
  • 2.1.4-release protected
  • 2.1.3-release protected
  • 2.1.2-release protected
  • 2.1.1-release protected
  • 2.1.0-release protected
  • 1.0.1-release protected
  • 1.0.0-release protected
35 results

README.md

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    To learn more about this project, read the wiki.
    README.md 8.94 KiB

    Queue

    A queueing system to be used at labs at EWI (tudelft.nl).

    Requirements

    • Java 8+

    Project setup

    In order to have the project setup properly for development a few steps need to be taken.

    1. First the config file should be moved from the template into the actual properties file by executing cp src/main/resources/application.yaml.template src/main/resources/application.yaml from the root directory of the project.
    2. Follow these instructions to submit your work

    Run website from IDE

    1. Install IntelliJ IDEA Professional (free for students)
    2. Import project from Gradle model
    3. For IntelliJ to run the project make sure are running jdk 8.
    4. Start the project by right-clicking QueueApplication and clicking 'Run'
    5. Visit http://localhost:8081/
    6. Finally visit http://localhost:8081/login to login. Various test users credentials can be found in the DataBaseLoader class.

    Run website from CLI

    1. gradle build
    2. sudo java -jar build/libs/queue-0.0.1-SNAPSHOT.jar
    3. Visit http://localhost:8081/
    4. Finally visit http://localhost:8081/login to login. Various test users credentials can be found in the DataBaseLoader class.

    Deployment

    The deploy/ directory contains an Ansible playbook that can be used to provision the machine. Specifically, it contains:

    • an nginx site config (default) with an upstream for tomcat on port 8080 together with config for a letsencrypt generated SSL certificate.
    • a SystemD configuration (queue.service) that runs the jar at /var/www/queue/queue-0.0.1-SNAPSHOT.jar as root on startup and logs to /var/log/queue.log.
    • an ansible config that installs Oracle java 8, nginx, postgres, haveged, the SystemD job, the jar, and starts the services.
    • an application.yaml file with application-specific configuration, such as the database settings.

    To run the playbook, first replace the hostname and your SSH key in deploy/hosts, then run ./deploy/run.sh.

    Note that the current application.yaml contains spring.jpa.hibernate.ddl-auto=create which will drop and create the database upon reboot!

    Configuration

    See application.yaml. Chrome does not yet fully support the Web Push API and uses GCM to handle sending and delivery of push messages. To use the GCM API you need a GCM API key. This page explains how to obtain one.

    You can place an application.yaml on the classpath which overrides the application.yaml in the jar itself.

    Nowadays, Chrome supports VAPID (Voluntary Application Identification) for Web Push API and it is no longer necessary to obtain an API key. The Web Push library should be updated to the latest version that I'm maintaining at https://github.com/MartijnDwars/web-push. For VAPID, we need to generate yet another keypair..