HUB
Sign inSign up
dtm logo

jeffersonlab/dtm

By jeffersonlab

•Updated 3 days ago

Down time manager app

Image
0

7.2K

jeffersonlab/dtm repository overview

⁠dtm CI Docker

A Jakarta EE 10⁠ web application for managing downtime at Jefferson Lab built with the Smoothness⁠ web template.

Screenshot



⁠Overview

The Downtime application allows Operators to log machine downtime events. Downtime events are caused by one or more incidents, and incidents may occur concurrently. The machine requires time to recover after all incidents are resolved, and this time is also part of an event. Short temporary "trips" caused by Fast Shutdown System (FSD) faults, are also recorded. A trip that lasts longer than five minutes is considered eligible to be a downtime event. Most downtime events start off as trips.

See the User Guide⁠ for how to use it.

⁠Quick Start with Compose

  1. Grab project
git clone https://github.com/JeffersonLab/dtm
cd dtm
  1. Launch Compose⁠
docker compose up
  1. Navigate to page
http://localhost:8080/dtm

Note: Login with demo username "jdoe" and password "password".

⁠Ports

The containers publish these ports on the host, listening only on its local address (127.0.0.1), so other computers can't reach the demo database, accounts, and management consoles. To use them from another computer, forward them over SSH, such as ssh -N -L 8443:localhost:8443 -L 8081:localhost:8081 <host> for the app and Keycloak. If another project already uses some of them, or you run a second copy of the demo, set other ports in a .env file next to compose.yaml, which Compose reads, or in the environment:

VariableDefaultPort of
DTM_HTTPS_PORT8443app (HTTPS)
DTM_HTTP_PORT8080app (HTTP)
DTM_MANAGEMENT_PORT9990Wildfly management
DTM_KEYCLOAK_PORT8081Keycloak
DTM_KEYCLOAK_MANAGEMENT_PORT9991Keycloak management
DTM_ORACLE_PORT1521Oracle
DTM_ORACLE_EM_PORT5500Oracle Enterprise Manager
DTM_PUPPET_PORT3000Puppet Show
DTM_SMTP_PORT1025MailHog SMTP
DTM_MAILHOG_PORT8025MailHog web UI

The app and Keycloak are set up for the ports you choose, so log in at https://localhost:<DTM_HTTPS_PORT>/dtm.

Compose names the containers, network, and images after the project's directory, such as dtm-oracle-1, so a copy in another directory, such as a git worktree, gets its own.

See: Docker Compose Strategy⁠

⁠Dependencies

What dtm depends on: what each is used for, where it comes from, its license, and how it is maintained, as of November 2026. Library versions are pinned in build.gradle⁠, and the container images are named in deps.yaml⁠ and the Dockerfile⁠.

⁠To run it
DependencyUsed forSourceLicenseMaintenance
Java 17 or laterRuns the application serverEclipse Temurin⁠ or another OpenJDK buildGPL-2.0 with Classpath ExceptionActive (Eclipse Adoptium)
WildFly⁠ 37.0.1Jakarta EE 10 application server; provides the Jakarta EE API, JSTL, and Hibernate ORM with Envers, which keeps the audit history, to the appwildfly.org⁠Apache-2.0; the Hibernate ORM 6.6 in it is LGPL-2.1Active; the project's latest is 42.0.0 (October 2026)
Oracle Database 19 or laterStores the downtime eventsOracleCommercialSupported by Oracle
Oracle JDBC driverWildFly's datasource for the databaseMaven Central⁠Oracle Free Use Terms and ConditionsActive (Oracle)
Keycloak⁠Login with OpenID Connect, and the user directorykeycloak.org⁠; tested with 26.6Apache-2.0Active; latest is 26.8.2 (November 2026)
Puppet Show⁠PDF and image export of pagesDocker Hub⁠MITJLab's own; last release 3.0.2 (December 2024)
SMTP serverSends emailAny
Smoothness weblib⁠Page layout, login, settings and setup pages, and the shared scripts, such as Flot for charts; in the warMaven Central⁠MITJLab's own; active, latest is 5.3.0 (October 2026)
jLog⁠Posts incidents to the JLab logbook; installed in WildFlyMaven Central⁠MITJLab's own; last release 5.2.0 (August 2025)
Apache POI⁠Excel exports of the reports; installed in WildFlyMaven Central⁠Apache-2.0Active; latest is 6.0.0 (October 2026)
jsoup⁠Reads the app's own email pages to send them; in the warMaven Central⁠MITActive; latest is 1.24.1 (November 2026)
UrlRewriteFilter⁠Rewrites versioned resource links and incident addresses; installed in WildFlyMaven Central⁠BSDDormant: 5.1.3 (October 2023) is the latest release, and the repository last changed in February 2024
jsTree⁠ 3.3.8The category treeCopied into resources/jstree⁠MITLatest is 3.3.17 (September 2024), the repository's last change
Flot⁠ plugins: dashes, growraf, and a changed copy of the time pluginDashed lines, animation and time axes in the chartsCopied into resources/js⁠MIT for growraf and time; the dashes file states noneMaintained here: Flot's last release was 0.8.3 (April 2014)

With their settings on, dtm also posts to the JLab logbook, and reads SRM and the NPES schedule on JLab's servers: see the Settings⁠.

⁠To build and test it
DependencyUsed forSourceLicenseMaintenance
Gradle⁠ 9Builds the warThe wrapper in this repository; the gradle:9-jdk21 image for the Docker buildApache-2.0Active
JUnit⁠ 5Unit testsMaven CentralEPL-2.0Active; the project's current line is JUnit 6
Mockito⁠Stand-ins for collaborators in the unit testsMaven CentralMITActive; latest is 5.24.0 (September 2026)
Eclipse Parsson⁠JSON-P for the tests; WildFly provides it to the appMaven CentralEPL-2.0 or GPL-2.0 with Classpath ExceptionActive
Spotless⁠ with google-java-formatChecks formattingGradle Plugin PortalApache-2.0Active
gvenzl/oracle-xe⁠ imageOracle database for development and testsDocker HubImage scripts Apache-2.0; Oracle Database XE under Oracle's termsRepository last changed in December 2024
jeffersonlab/wildfly⁠ and jeffersonlab/keycloak⁠ images, tag 4WildFly and Keycloak, set up for development, tests and the demo imageDocker HubMITJLab's own; active, latest is 4.1.0 (November 2026)
MailHog⁠ imageCatches email in development and testsDocker HubMITUnmaintained: last release 1.0.1 (August 2020)
Zensical⁠Builds the user guide websitePyPI, pinned by uv.lockMITActive

⁠Install

This application requires a Java 17+ JVM and standard library to run, plus a Jakarta EE 10 application server (developed with Wildfly).

  1. Install service dependencies⁠
  2. Download Wildfly 37.0.1⁠
  3. Configure⁠ Wildfly and start it
  4. Download dtm.war⁠ and deploy it to Wildfly
  5. Navigate your web browser to localhost:8080/dtm⁠

⁠Configure

⁠Configtime

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.

⁠Runtime

Uses the Smoothness Environment Variables⁠ plus the following application specific:

NameDescription
RAR_DIRDirectory path to store Repair Assessment Reports

There are some Settings⁠ in the database as well that can be edited on the Setup tab by admins.

⁠Database

This application requires an Oracle 19+ database with the following schema⁠ installed. The application server hosting this app must also be configured with a JNDI datasource.

⁠Build

This project is built with Java 21⁠ (compiled to Java 17 bytecode), and uses the Gradle 9⁠ build tool to automatically download dependencies and build the project from source:

git clone https://github.com/JeffersonLab/dtm
cd dtm
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⁠

See: Docker Development Quick Reference⁠

⁠User Guide website

The user guide⁠ is Markdown, readable on GitHub, and also built into a website with Zensical⁠ (zensical.toml⁠). With uv⁠ installed:

uv run --locked zensical build --strict

builds it into site/, as CI does; --strict fails on a link to a missing page or heading. uv run --locked zensical serve previews it at http://localhost:8000⁠.

CI builds it and each release publishes it with the user guide workflows⁠ of general-workflows.

⁠Develop

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. These are the default ports⁠; use yours if you set others.

The server⁠ and app⁠ setup scripts can be used to setup a local instance of Wildfly.

⁠Release

  1. Bump the version number in the VERSION file and commit and push to GitHub (using Semantic Versioning⁠).
  2. 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.
    • The Publish user guide⁠ GitHub Action to publish the User Guide⁠ to GitHub Pages, in a folder for the release and in latest/.

⁠Deploy

The deploy to JLab's acctest is handled automatically via the release workflow.

At JLab this app is found at ace.jlab.org/dtm⁠ and internally at acctest.acc.jlab.org/dtm⁠. However, those servers are proxies for wildfly3.acc.jlab.org and wildflytest3.acc.jlab.org respectively. A deploy script⁠ is provided on each server to automate wget and deploy. Example:

/opt/wildfly/cd/deploy.sh dtm v1.2.3

JLab Internal Docs: RHEL9 Wildfly⁠

⁠See Also

Tag summary

Content type

Image

Digest

sha256:818401a01…

Size

1.2 GB

Last updated

3 days ago

docker pull jeffersonlab/dtm