A Java EE 8 web application for Program Deputy (PD) presentations at Jefferson Lab.
The JLab presenter app assists crew chiefs in documenting and program deputies reporting on shift activity. The app tightly integrates with other JLab apps to report downtime (DTM), system readiness (SRM), schedules (Calendar), time accounting (BTM), geographical task hazards (Workmap), and even the weather. The resize app ensures images are reasonably sized.
- Grab project
git clone https://github.com/JeffersonLab/presenter
cd presenter
- Launch Compose
docker compose up
- Navigate to page
http://localhost:8080/presenter
Note: Login with demo username "tbrown" and password "password".
This application requires a Java 11+ JVM and standard library to run, plus a Java EE 8+ application server (developed with Wildfly).
- Install service dependencies
- Download Wildfly 26.1.3
- Configure Wildfly and start it
- Download presenter.war and deploy it to Wildfly
- Navigate your web browser to localhost:8080/presenter
Wildfly must be pre-configured before the first deployment of the app. The wildfly bash scripts can be used to accomplish this. See the Dockerfile for an example.
Uses a subset of the Smoothness Environment Variables including:
- BACKEND_SERVER_URL
- FRONTEND_SERVER_URL
- PUPPET_SHOW_SERVER_URL
The following application specific envs are also used:
Name | Description |
---|---|
CALENDAR_URL | ATLis SAD Calendar URL |
BTM_URL | Beam time mananger URL |
DTM_URL | Down time manager URL |
POWER_URL | Power meters URL |
RESIZE_URL | ImageMagick resize service URL |
SRM_URL | System readiness manager URL |
WEATHER_URL | Weather app URL |
WHITEBOARD_URL | Whiteboard app URL |
WORKMAP_URL | ATLis Workmap URL |
ONSITE_WHITELIST_PATTERN | Regex pattern pf IP addresses to match to ignore forced auth prompt to view content. If not set, then no forced prompt is made. |
ONSITE_WHITELIST_LOCAL | Use string "true" to ensure localhost (127.0.0.1) users aren't forced into login to view content. Note: The built-in cron-like facility of Wildfly to fetch HTML version of presentation to submit to the elog daily requires this to be true if you're going to restrict IPs |
See: Docker config example.
The application requires an Oracle 18+ database with the following schema installed. The application server hosting the app must also be configured with a JNDI datasource.
This project is built with Java 17 (compiled to Java 11 bytecode), and uses the Gradle 7 build tool to automatically download dependencies and build the project from source:
git clone https://github.com/JeffersonLab/presenter
cd presenter
gradlew build
Note: If you do not already have Gradle installed, it will be installed automatically by the wrapper script included in the source
Note for JLab On-Site Users: Jefferson Lab has an intercepting proxy
In order to iterate rapidly when making changes it's often useful to run the app directly on the local workstation, perhaps leveraging an IDE. In this scenario run the service dependencies with:
docker compose -f deps.yaml up
Note: The local install of Wildfly should be configured to proxy connections to services via localhost and therefore the environment variables should contain:
KEYCLOAK_BACKEND_SERVER_URL=http://localhost:8081
FRONTEND_SERVER_URL=https://localhost:8443
Further, the local DataSource must also leverage localhost port forwarding so the standalone.xml
connection-url field should be: jdbc:oracle:thin:@//localhost:1521/xepdb1
.
The server and app setup scripts can be used to setup a local instance of Wildfly.
- Bump the version number in the VERSION file and commit and push to GitHub (using Semantic Versioning).
- The CD GitHub Action should run automatically invoking:
- The Create release GitHub Action to tag the source and create release notes summarizing any pull requests. Edit the release notes to add any missing details. A war file artifact is attached to the release.
- The Publish docker image GitHub Action to create a new demo Docker image.
- The Deploy to JLab GitHub Action to deploy to the JLab test environment.
At JLab this app is found at ace.jlab.org/presenter and internally at acctest.acc.jlab.org/presenter. However, those servers are proxies for wildfly6.acc.jlab.org
and wildflytest6.acc.jlab.org
respectively. A deploy script is provided to automate wget and deploy. Example:
/root/setup/deploy.sh presenter v1.2.3
JLab Internal Docs: InstallGuideWildflyRHEL9