Skip to content
JeffersonLabPublic

About

Software Inventory Manager app

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

8 watching

Forks

Latest commit

 

History

206 Commits

Folders and files

Repository files navigation

sim CI Docker

A Jakarta EE 10 web application for searching a software inventory spanning multiple repos, relying on the Smoothness web lib.

Screenshot



Overview

A web app for managing a registry of software for the Accelerator Controls Group (ACG) at JLab.

See the User Guide for how to use it.

Quick Start with Compose

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

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

Note: The app container starts once Oracle has loaded the schema and Keycloak has created the test realm and users, about a minute after docker compose up.

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 test 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 app, set other ports in a .env file next to compose.yaml, which Compose reads, or in the environment:

Variable Default Port of
SIM_HTTPS_PORT 8443 sim (HTTPS)
SIM_HTTP_PORT 8080 sim (HTTP)
SIM_MANAGEMENT_PORT 9990 Wildfly management
SIM_KEYCLOAK_PORT 8081 Keycloak
SIM_KEYCLOAK_MANAGEMENT_PORT 9991 Keycloak management
SIM_ORACLE_PORT 1521 Oracle
SIM_ORACLE_EM_PORT 5500 Oracle Enterprise Manager
SIM_PUPPET_PORT 3000 Puppet Show
SIM_SMTP_PORT 1025 MailHog SMTP
SIM_MAILHOG_PORT 8025 MailHog web UI

Keycloak's login redirects and the app's links follow SIM_KEYCLOAK_PORT and SIM_HTTPS_PORT, and Wildfly listens for HTTPS on SIM_HTTPS_PORT inside the container too, so its redirects from HTTP to HTTPS reach it. Compose names the containers, network, and images after the project's directory, such as sim-oracle-1, so a copy in another directory, such as a git worktree, gets its own.

See: Docker Compose Strategy

Dependencies

What sim 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 container images in deps.yaml, compose.yaml and the Dockerfile.

To run it

Dependency Used for Source License Maintenance
Java 17 or later Runs the application server Eclipse Temurin or another OpenJDK build GPL-2.0 with Classpath Exception Active (Eclipse Adoptium)
WildFly 37.0.1 Jakarta EE 10 application server; provides the Jakarta EE API, JSTL and Hibernate ORM to the app wildfly.org Apache-2.0; the Hibernate ORM 6.6 in it is LGPL-2.1 Active; the project's latest is 42.0.0 (October 2026)
Oracle Database 19 or later Stores the inventory Oracle Commercial Supported by Oracle
Oracle JDBC driver WildFly's datasource for the database Maven Central Oracle Free Use Terms and Conditions Active (Oracle)
Keycloak Login with OpenID Connect, and the user directory keycloak.org; tested with 26.6 Apache-2.0 Active; latest is 26.8.2 (November 2026)
Puppet Show PDF and image export of pages Docker Hub MIT JLab's own; last release 3.0.2 (December 2024)
SMTP server Sends email Any
Smoothness weblib Page layout, login, settings and setup pages; in the war Maven Central MIT JLab's own; active, latest is 5.3.0 (October 2026)
jsoup Reads the web pages a sync takes software from; in the war Maven Central MIT Active; latest is 1.24.1 (November 2026)
UrlRewriteFilter Rewrites versioned resource links and sync addresses; installed in WildFly Maven Central BSD Dormant: 5.1.3 (October 2023) is the latest release, and the repository last changed in February 2024

The sync pages also read GitHub's and code.jlab.org's web APIs and three JLab web pages: see Runtime.

To build and test it

Dependency Used for Source License Maintenance
Gradle 9 Builds the war The wrapper in this repository; the gradle:9-jdk21 image for the Docker build Apache-2.0 Active
JUnit 5 Unit and integration tests Maven Central EPL-2.0 Active; the project's current line is JUnit 6
Eclipse Parsson JSON-P for the tests; WildFly provides it to the app Maven Central EPL-2.0 or GPL-2.0 with Classpath Exception Active
Spotless with google-java-format Checks formatting Gradle Plugin Portal Apache-2.0 Active
PMD Static analysis Maven Central, through Gradle's pmd plugin BSD-style Active
SpotBugs Static analysis Gradle Plugin Portal Plugin Apache-2.0; SpotBugs LGPL-2.1 Active
gvenzl/oracle-xe image Oracle database for development and tests Docker Hub Image scripts Apache-2.0; Oracle Database XE under Oracle's terms Repository last changed in December 2024
jeffersonlab/wildfly and jeffersonlab/keycloak images WildFly and Keycloak, set up for development, tests and the demo image Docker Hub MIT JLab's own; active, latest is 4.1.0 (November 2026)
MailHog image Catches email in development and tests Docker Hub MIT Unmaintained: last release 1.0.1 (August 2020)
nginx image Serves the sync stand-in's fixed data Docker Hub BSD-2-Clause Active
Zensical Builds the user guide website PyPI, pinned by uv.lock MIT Active

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 sim.war and deploy it to Wildfly
  5. Navigate your web browser to localhost:8080/sim

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.

The sync pages read each source from its usual address. An environment variable replaces it, such as to read a stand-in:

Variable Default
SYNC_GITHUB_URL https://api.github.com/search/repositories?per_page=100&q=topic%3Aacg+org%3AJeffersonLab
SYNC_GITLAB_URL https://code.jlab.org/api/v4/groups/acc/projects?include_subgroups=Y&per_page=100
SYNC_CSUE_URL https://opweb.acc.jlab.org/CSUEApps/csueTools/csueAppsWeb.php
SYNC_CERTIFIED_URL https://devweb.acc.jlab.org/controls_web/cjs/CSD/csd_db.php (the sync adds ?type=app, lib or script)
SYNC_LLAPP_URL https://devweb.acc.jlab.org/llapp.php

The Compose stacks set them to the sync-stand-in container, which serves fixed data from container/sync-stand-in, so their syncs never reach GitHub, GitLab or JLab's servers.

Database

This application requires an Oracle 19+ database with the following schema installed. A release that changes the schema comes with a script for existing databases in container/oracle/upgrade, named for the release; the release notes say when one is needed. 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/sim
cd sim
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.

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

Test

Unit tests run with the build (gradlew build, or gradlew test alone). Integration tests send requests to a running app and its services, and log in as the test accounts, so start them first with docker compose -f build.yaml up -d --build --wait, then run:

gradlew integrationTest

The sync tests (SyncIT) expect the stand-in's data in container/sync-stand-in. If the stack runs on other ports (see Ports), point the tests at them with SIM_URL (such as https://localhost:48443/sim) and KEYCLOAK_URL (such as http://localhost:48081/auth).

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/sim and internally at acctest.acc.jlab.org/sim. 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 sim v1.2.3

JLab Internal Docs: RHEL9 Wildfly

See Also

About

Software Inventory Manager app

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

8 watching

Forks

Releases

Used by

Contributors

Languages