Skip to content

Commit

Permalink
Merge pull request #90 from jacquelinegarrahan/legacy-conversion-demo
Browse files Browse the repository at this point in the history
Completed legacy conversion
  • Loading branch information
jacquelinegarrahan authored Aug 25, 2021
2 parents b6e58f7 + 84a8543 commit e75ecf2
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 27 deletions.
1 change: 0 additions & 1 deletion cli/commands/start-alarm-server
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ if [[ -z "$2" ]]; then
else
CONFIG_FILE="$2"
fi
echo "here"

if [[ -z "$NALMS_KAFKA_BOOTSTRAP" ]]; then
echo "No Kafka bootstrap provided."
Expand Down
20 changes: 10 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
version: "3.0"
services:
zookeeper:
image: jgarrahan/nalms-zookeeper:v0.4
image: jgarrahan/nalms-zookeeper:v0.6
ports:
- "2181:2181"
environment:
ZOOKEEPER_CONFIG: /tmp/zoo.cfg
volumes:
- "./examples/demo/config/zoo.cfg:/tmp/zoo.cfg"
kafka:
image: jgarrahan/nalms-kafka:v0.4
image: jgarrahan/nalms-kafka:v0.6
depends_on:
- zookeeper
ports:
Expand All @@ -31,7 +31,7 @@ services:
reservations:
memory: 8G
kafka1:
image: jgarrahan/nalms-kafka:v0.4
image: jgarrahan/nalms-kafka:v0.6
depends_on:
- zookeeper
ports:
Expand All @@ -53,7 +53,7 @@ services:
reservations:
memory: 8G
kafka2:
image: jgarrahan/nalms-kafka:v0.4
image: jgarrahan/nalms-kafka:v0.6
depends_on:
- zookeeper
ports:
Expand All @@ -75,7 +75,7 @@ services:
reservations:
memory: 8G
phoebus-alarm-server:
image: jgarrahan/nalms-phoebus-alarm-server:v0.4
image: jgarrahan/nalms-phoebus-alarm-server:v0.6
links:
- kafka
- example-ioc
Expand All @@ -93,7 +93,7 @@ services:
EPICS_CA_REPEATER_PORT: 5065
ALARM_SERVER_PROPERTIES: "/opt/nalms/config/alarm_server.properties"
elasticsearch:
image: jgarrahan/nalms-elasticsearch:v0.5
image: jgarrahan/nalms-elasticsearch:v0.6
ports:
- "9200:9200"
volumes:
Expand All @@ -108,7 +108,7 @@ services:
KAFKA_HOST: kafka
KAFKA_PORT: 9092
grafana:
image: jgarrahan/nalms-grafana:v0.5
image: jgarrahan/nalms-grafana:v0.6
ports:
- '3000:3000'
links:
Expand All @@ -122,7 +122,7 @@ services:
ES_HOST: elasticsearch
ES_PORT: 9200
phoebus-alarm-logger:
image: jgarrahan/nalms-phoebus-alarm-logger:v0.4
image: jgarrahan/nalms-phoebus-alarm-logger:v0.6
links:
- elasticsearch
depends_on:
Expand All @@ -139,7 +139,7 @@ services:
- "./examples/heart_of_gold/config/alarm_logger.properties:/opt/nalms/config/alarm_logger.properties"
command: start-logger HeartOfGold /tmp/nalms/heart_of_gold.xml
example-ioc:
image: jgarrahan/nalms-example-ioc:v0.4
image: jgarrahan/nalms-example-ioc:v0.6
ports:
- "5075:5065/tcp"
- "5074:5064/tcp"
Expand All @@ -149,7 +149,7 @@ services:
EPICS_CA_SERVER_PORT: 5064
EPICS_CA_REPEATER_PORT: 5065
cruise-control:
image: jgarrahan/nalms-cruise-control:v0.4
image: jgarrahan/nalms-cruise-control:v0.6
ports:
- "9090:9090"
environment:
Expand Down
6 changes: 6 additions & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,10 @@ $ bash cli/nalms add-grafana-datasource config_names
Build a Grafana dashboard for a configuration
```
$ bash cli/nalms build-grafana-dashboard config_name
```

## build-alarm-ioc
Build alarm ioc files
```
$ bash cli/nalms build-alarm-ioc app_name ioc_name config_name config_file target_architecture
```
2 changes: 1 addition & 1 deletion docs/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Exit the tmux window using: `Ctr + b + d`
For integration with edm/pydm displays etc., we can use the nalms cli to generate an alarm ioc for a given configuration. In this demo, we will use application name `nalmsDemo`, IOC name `demo`.
```
$ source $EPICS_SETUP/epicsenv-7.0.3.1-1.0.bash
$ nalms build-alarm-ioc nalmsDemo demo Demo ${NALMS_HOME}/examples/demo/demo.xml
$ nalms build-alarm-ioc nalmsDemo demo Demo ${NALMS_HOME}/examples/demo/demo.xml rhel7-x86_64
$ cd nalmsDemo
$ make
$ cd iocBoot/iocdemo
Expand Down
14 changes: 7 additions & 7 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ Newer versioned releases should be indicated to the nalms package by updates to

```
# versions
export NALMS_DOCKER_ES_VERSION=v0.4
export NALMS_DOCKER_GRAFANA_VERSION=v0.4
export NALMS_DOCKER_ALARM_SERVER_VERSION=v0.4
export NALMS_DOCKER_ALARM_LOGGER_VERSION=v0.4
export NALMS_DOCKER_ZOOKEEPER_VERSION=v0.4
export NALMS_DOCKER_CRUISE_CONTROL_VERSION=v0.4
export NALMS_DOCKER_KAFKA_VERSION=v0.4
export NALMS_DOCKER_ES_VERSION=v0.6
export NALMS_DOCKER_GRAFANA_VERSION=v0.6
export NALMS_DOCKER_ALARM_SERVER_VERSION=v0.6
export NALMS_DOCKER_ALARM_LOGGER_VERSION=v0.6
export NALMS_DOCKER_ZOOKEEPER_VERSION=v0.6
export NALMS_DOCKER_CRUISE_CONTROL_VERSION=v0.6
export NALMS_DOCKER_KAFKA_VERSION=v0.6
```


Expand Down
8 changes: 0 additions & 8 deletions phoebus-alarm-server/scripts/update_ioc.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,6 @@ def monitor(config_name:str, kafka_bootstrap:str, retry_count:int=10):
else:
epics.caput(f"{pv}FP", 0)

elif "state:" in message.key:
print(f"writing alarm {pv}ACK")
if val.get("severity"):
if "ACK" in val.get("severity"):
epics.caput(f"{pv}ACK", 1)

else:
epics.caput(f"{pv}ACK", 0)
assert 1 == 5

except KeyboardInterrupt:
Expand Down

0 comments on commit e75ecf2

Please sign in to comment.