Skip to content

Commit 460af03

Browse files
committed
Clarifications and updates to services docker stuff
1 parent 1746263 commit 460af03

File tree

6 files changed

+53
-11
lines changed

6 files changed

+53
-11
lines changed

services/README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,15 @@ services in this repository depend:
2727

2828
The Docker compose file depends on the environment variable ```HOST_IP_ADDRESS```, which must be set
2929
to the IP address of the host running the Docker container. Kafka clients must use this as the
30-
```bootstrap-server``` IP address.
30+
```bootstrap-server``` IP address.
31+
32+
Docker supports environment variables to be set in a file (default ```.env``` in current directory) like so:
33+
34+
```HOST_IP_ADDRESS=1.2.3.4```
35+
.
36+
.
37+
.
38+
39+
This may be preferable compared to setting environment variables on command line, e.g.
40+
41+
```>export HOST_IP_ADDRESS=1.2.3.4```.

services/alarm-server/README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,27 @@ some useful startup arguments include
5252

5353
Docker compose files are provided for convenience to cover two use cases:
5454

55-
1. ```docker-compose-alarm-server-only.yml``` will run the alarm server. The
56-
environment variable ```KAFKA_HOST``` must be set to identify the Kafka server IP address,
57-
while the environment variable ```CONFIG``` identifies the configuration (topic) name.
55+
1. ```docker-compose-alarm-server-only.yml``` will run the alarm server. Required environment variables:
56+
* ```KAFKA_HOST_IP_ADDRESS``` must be set to identify the Kafka server external IP address.
57+
* ```CONFIG``` identifies the configuration (topic) name.
58+
* ```ALARM_SERVICE_SETTINGS_FILE``` file in user's home directory specifying EPICS related settings, e.g.
59+
```org.phoebus.pv/default=pva```.
5860
2. ```docker-compose-alarm-server-only-import.yml``` will run the alarm server for the
5961
purpose of importing a configuration. Environment variables must be se as in case 1.
6062
Additionally, the environment variable ```CONFIG_FILE``` must identify an alarm
6163
configuration file in the current user's home directory.
64+
65+
Docker supports environment variables to be set in a file (default ```.env``` in current directory) like so:
66+
67+
```KAFKA_HOST_IP_ADDRESS=1.2.3.4```
68+
```CONFIG=Accelerator```
69+
.
70+
.
71+
.
72+
73+
This may be preferable compared to setting environment variables on command line, e.g.
74+
75+
```>export KAFKA_HOST_IP_ADDRESS=1.2.3.4```.
76+
77+
**NOTE:** Accessing IOCs over pva (default mode in the Docker compose files) works **only** if IOC is running on the
78+
same host as the Docker container. Moreover, this has been verified to work only on Linux.

services/alarm-server/docker-compose-alarm-server-only-import.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ services:
55
- /home:/home
66
command: >
77
/bin/bash -c "
8-
java -jar /alarmserver/service-alarm-server-*.jar -config ${CONFIG} -import ${CONFIG_FILE} -server ${KAFKA_HOST}:9092"
8+
java -jar /alarmserver/service-alarm-server-*.jar -config ${CONFIG} -import ${CONFIG_FILE} -server ${KAFKA_HOST_IP_ADDRESS}:9092 -settings"
99
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
services:
22
alarmserver:
33
image: ghcr.io/controlsystemstudio/phoebus/service-alarm-server:master
4+
environment:
5+
EPICS_PVA_ADDR_LIST: ${HOST_IP_ADDRESS}
46
volumes:
57
- /home:/home
68
command: >
79
/bin/bash -c "
8-
java -jar /alarmserver/service-alarm-server-*.jar -config ${CONFIG} -server ${KAFKA_HOST}:9092 -noshell"
10+
java -jar /alarmserver/service-alarm-server-*.jar -settings ${ALARM_SERVICE_SETTINGS_FILE} -config ${CONFIG} -server ${KAFKA_HOST_IP_ADDRESS}:9092 -settings ${SETTINGS_FILE} -noshell"
911

services/save-and-restore/README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,24 @@ The latest version of the service is available as a Docker image (ghcr.io/contro
6262

6363
Docker compose files are provided. These depend on the environment variables as described below.
6464

65-
1. ```docker-compose.yml```. Use this to launch both Elasticsearch and the service. The environment variable ```HOST_EXTERNAL_IP_ADDRESS```
65+
1. ```docker-compose.yml```. Use this to launch both Elasticsearch and the service. The environment variable ```HOST_IP_ADDRESS```
6666
should be set to the host's external IP address (i.e. **not** 127.0.0.1 or localhost).
67-
2. ```docker-compose-save-and-restore.yml```. Use this to launch save-and-restore service only. The environment variable ```HOST_EXTERNAL_IP_ADDRESS```
67+
2. ```docker-compose-save-and-restore.yml```. Use this to launch save-and-restore service only. The environment variable ```HOST_IP_ADDRESS```
6868
should be set to the host's external IP address (i.e. **not** 127.0.0.1 or localhost), while the environment variable ```ELASTIC_HOST``` should
6969
be set to the IP address of the Elasticsearch host. If Elasticsearch is running on localhost, please specify the host's
70-
external IP address.
70+
external IP address.
71+
72+
Docker supports environment variables to be set in a file (default ```.env``` in current directory) like so:
73+
74+
```HOST_IP_ADDRESS=1.2.3.4```
75+
```ELASTIC_HOST=1.2.3.4```
76+
.
77+
.
78+
.
79+
80+
This may be preferable compared to setting environment variables on command line, e.g.
81+
82+
```>export HOST_IP_ADDRESS=1.2.3.4```.
7183

7284
**NOTE:** Accessing IOCs over pva (default mode in the Docker compose files) works **only** if IOC is running on the
73-
same host as the Docker container. Moreover, this has been verified to work only on Linux.
85+
same host as the Docker container. Moreover, this has been verified to work only on Linux.

services/save-and-restore/docker-compose-save-and-restore.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services:
55
- "8080:8080"
66
environment:
77
ELASTICSEARCH_NETWORK_HOST: ${ELASTIC_HOST_IP_ADDRESS}
8-
EPICS_PVA_ADDR_LIST: ${HOST_EXTERNAL_IP_ADDRESS}
8+
EPICS_PVA_ADDR_LIST: ${HOST_IP_ADDRESS}
99
EPICS_PVA_AUTO_ADDR_LIST: "NO"
1010
EPICS_PVA_ENABLE_IPV6: "false"
1111
command: >

0 commit comments

Comments
 (0)