A Kafka Streams application to compute alarm state and output to the alarm-state topic in JAWS given registered-alarms, active-alarms, and overridden-alarms topics.
- Grab project
git clone https://github.com/JeffersonLab/alarm-state-processor
cd alarm-state-processor
- Launch Docker
docker-compose up
- Set an override
docker exec jaws /scripts/client/set-overridden.py --override Disabled alarm1
- Verify state
docker exec state /opt/alarm-state-processor/bin/list-state.sh
This Java 11 project uses the Gradle 6 build tool to automatically download dependencies and build the project from source:
git clone https://github.com/JeffersonLab/alarm-state-processor
cd alarm-state-processor
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: Jefferson Lab has an intercepting proxy
Note: When developing the app you can mount the build artifact into the container by substituting the docker-compose up
command with:
docker-compose -f docker-compose.yml -f docker-compose-dev.yml up
Runtime Environment Variables
Name | Description |
---|---|
BOOTSTRAP_SERVERS | Comma-separated list of host and port pairs pointing to a Kafka server to bootstrap the client connection to a Kafka Cluser; example: kafka:9092 |
SCHEMA_REGISTRY | URL to Confluent Schema Registry; example: http://registry:8081 |
The Kafka Streams app is a regular Java application, and start scripts are created and dependencies collected by the Gradle distribution targets:
gradlew assembleDist
Launch with:
UNIX:
bin/alarm-state-processor
Windows:
bin/alarm-state-processor.bat
docker pull slominskir/alarm-state-processor
Image hosted on DockerHub