Skip to content

JeffersonLab/wave

Repository files navigation

WAVE CI Docker

Web Archive Viewer and Expositor



Overview

Uses myquery and epics2web to provide an EPICS data viewer and analysis tool for the Jefferson Lab archiver MYA as well as plots of live data.

Examples

Features

Use Cases

Quick Start with Compose

  1. Grab project
git clone https://github.com/JeffersonLab/wave
cd wave
  1. Launch Compose
docker compose up
  1. Use web browser to view channel1 on August 12 2019

localhost/wave?pv=channel1

Install

  1. Download Java JDK 17+
  2. Download Apache Tomcat 10+ (Compiled against Jakarta EE)
  3. Download wave.war and drop it into the Tomcat webapps directory
  4. Install myquery and epics2web.
  5. Configure Tomcat
  6. Start Tomcat and navigate your web browser to localhost:8080/wave

Configure

Set the environment variables:

  • EPICS_2_WEB_HOST: host (and port) of epics2web
  • MYQUERY_HOST: host (and port) of myquery
  • MYQUERY_DEFAULT_DEPLOYMENT: default MYA deployment

Build

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

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

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.yml up

Test

Manual tests can be run on a local workstation using:

docker compose -f build.yml up

Release

  1. Bump the version number and release date in build.gradle and commit and push to GitHub (using Semantic Versioning).
  2. Create a new release on the GitHub Releases page corresponding to same version in build.gradle (Enumerate changes and link issues). Attach war file for users to download.
  3. Build and publish a new Docker image from the GitHub tag. GitHub is configured to do this automatically on git push of semver tag (typically part of GitHub release) or the Publish to DockerHub action can be manually triggered after selecting a tag.
  4. Bump and commit quick start image version.

Deploy

At JLab this app is found at epicsweb.jlab.org/wave and internally at epicswebtest.acc.jlab.org/wave. However, those servers are proxies for tomcat1.acc.jlab.org and tomcattest1.acc.jlab.org respectively. Use wget or the like to grab the release war file. Don't download directly into webapps dir as file scanner may attempt to deploy before fully downloaded. Be careful of previous war file as by default wget won't overrwite. The war file should be attached to each release, so right click it and copy location (or just update version in path provided in the example below). Example:

cd /tmp
rm wave.war
wget https://github.com/JeffersonLab/wave/releases/download/v1.2.3/wave.war
mv  wave.war /opt/tomcat/webapps

JLab Internal Docs: InstallGuideTomcatRHEL9