Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions client/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ configure/*.local

*~
.*.swp
.ci
5 changes: 3 additions & 2 deletions client/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ RUN mv docker/RELEASE.local configure/RELEASE.local
ENV EPICS_ROOT=/epics
ENV EPICS_BASE=${EPICS_ROOT}/base
RUN make
WORKDIR /recsync/iocBoot/iocdemo

FROM recsync-base AS ioc-runner

CMD /recsync/bin/${EPICS_HOST_ARCH}/demo st.cmd
WORKDIR /recsync/bin/${EPICS_HOST_ARCH}

CMD ./demo /recsync/iocBoot/iocdemo/st.cmd
3 changes: 2 additions & 1 deletion client/demoApp/Db/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ include $(TOP)/configure/CONFIG
# Create and install (or just install) into <top>/db
# databases, templates, substitutions like this
DB += somerecords.db

DB += archive.db
DB += archive_bugtest.db
#----------------------------------------------------
# If <anyname>.db template is not named <anyname>*.template add
# <anyname>_template = <templatename>
Expand Down
10 changes: 10 additions & 0 deletions client/demoApp/Db/archive_bugtest.db
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

record(ai, "$(P)ai:archive") {
info("test", "testing")
}

record(longout, "$(P)lo:archive") {
info("test", "testing")
info("hello", "world")
info("archive", "default")
}
6 changes: 3 additions & 3 deletions client/example-compose.yml → client/ioc-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ services:
ioc1:
build: ../client
environment:
- IOCSH_NAME=IOC1-2
- IOCSH_NAME=IOC1
tty: true
networks:
- net-recc-1
- net-1-recc-1

networks:
net-recc-1:
net-1-recc-1:
driver: bridge
1 change: 1 addition & 0 deletions client/iocBoot/iocdemo/st.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ addReccasterEnvVars("BUILDING")
## Load record instances
dbLoadRecords("../../db/reccaster.db", "P=$(IOCSH_NAME):")
dbLoadRecords("../../db/somerecords.db","P=$(IOCSH_NAME):")
dbLoadRecords("../../db/archive.db", "P=$(IOCSH_NAME):")

iocInit()
31 changes: 31 additions & 0 deletions client/iocBoot/iocdemo/st_bugtest.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!../../bin/linux-x86_64-debug/demo

## You may have to change demo to something else
## everywhere it appears in this file

< envPaths

## Register all support components
dbLoadDatabase("../../dbd/demo.dbd",0,0)
demo_registerRecordDeviceDriver(pdbbase)

var(reccastTimeout, 5.0)
var(reccastMaxHoldoff, 5.0)

epicsEnvSet("IOCNAME", "$(IOCSH_NAME)")
epicsEnvSet("ENGINEER", "myself")
epicsEnvSet("LOCATION", "myplace")

epicsEnvSet("CONTACT", "mycontact")
epicsEnvSet("BUILDING", "mybuilding")
epicsEnvSet("SECTOR", "mysector")

addReccasterEnvVars("CONTACT", "SECTOR")
addReccasterEnvVars("BUILDING")

## Load record instances
dbLoadRecords("../../db/reccaster.db", "P=$(IOCSH_NAME):")
dbLoadRecords("../../db/somerecords.db","P=$(IOCSH_NAME):")
dbLoadRecords("../../db/archive_bugtest.db", "P=$(IOCSH_NAME):")

iocInit()
30 changes: 30 additions & 0 deletions server/compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
include:
- docker/cf-compose.yml
services:
recc:
build: .
depends_on:
cf:
condition: service_healthy
restart: true
healthcheck:
test: netstat | grep cf
interval: 10s
timeout: 30s
retries: 3
volumes:
- type: bind
source: docker/config/cf1.conf
target: /home/recceiver/cf.conf
read_only: true
- type: bind
source: docker/config/cf.conf
target: /home/recceiver/channelfinderapi.conf
read_only: true
networks:
- net-1-recc-1
- net-2-cf

networks:
net-1-recc-1:
driver: bridge
49 changes: 49 additions & 0 deletions server/docker/cf-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: cf-compose
services:
cf:
image: ghcr.io/channelfinder/channelfinderservice:master
hostname: cf
networks:
- net-2-cf
ports:
- "8080:8080"
depends_on:
elasticsearch:
condition: service_healthy
restart: true
environment:
ELASTICSEARCH_NETWORK_HOST: elasticsearch-cf
ELASTICSEARCH_QUERY_SIZE: 10000
demo_auth.enabled: true
demo_auth.users: admin
demo_auth.pwds: password
demo_auth.roles: ADMIN
EPICS_PVAS_INTF_ADDR_LIST: "0.0.0.0"
aa.enabled: false
logging.level.org.springframework.web: INFO
healthcheck:
test: curl -s -f http://cf:8080/ChannelFinder
interval: 10s
timeout: 60s
retries: 5

elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.11.4
hostname: elasticsearch-cf
networks:
- net-2-cf
environment:
cluster.name: channelfinder
discovery.type: single-node
bootstrap.memory_lock: "true"
xpack.security.enabled: "false"
logger.level: WARN
healthcheck:
test: curl -s -f http://localhost:9200/_cluster/health
interval: 10s
timeout: 60s
retries: 5

networks:
net-2-cf:
driver: bridge
5 changes: 5 additions & 0 deletions server/docker/config/cf.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

[DEFAULT]
BaseURL = http://cf:8080/ChannelFinder
username = admin
password = password
4 changes: 1 addition & 3 deletions server/docker/config/cf1.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,5 @@ recordDesc = on
# Mark all channels as 'Inactive' when processor is started (default: True)
cleanOnStart = True

[DEFAULT]
BaseURL = http://cf:8080/ChannelFinder
# Name to used as owner
username = admin
password = password
4 changes: 1 addition & 3 deletions server/docker/config/cf2.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,5 @@ recordDesc = on
# Mark all channels as 'Inactive' when processor is started (default: True)
cleanOnStart = True

[DEFAULT]
BaseURL = http://cf:8080/ChannelFinder
# Name to used as owner
username = admin
password = password
74 changes: 74 additions & 0 deletions server/docker/test-multi-recc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: test-multi-recc
include:
- cf-compose.yml
services:
recc1:
extends:
file: ../compose.yml
service: recc
depends_on:
cf:
condition: service_healthy
restart: true
hostname: recc1
networks:
- net-1-recc-1
- net-2-cf
ioc1-1:
extends:
file: ../../client/ioc-compose.yml
service: ioc1
depends_on:
recc1:
condition: service_healthy
restart: true
environment:
- IOCSH_NAME=IOC1-1
hostname: ioc1-1
networks:
- net-1-recc-1
ioc1-2:
extends:
ioc1-1
depends_on:
recc1:
condition: service_healthy
restart: true
environment:
- IOCSH_NAME=IOC1-2
hostname: ioc1-1
recc2:
extends:
recc1
hostname: recc2
networks:
- net-1-recc-2
- net-2-cf
ioc2-1:
extends:
ioc1-1
depends_on:
recc2:
condition: service_healthy
restart: true
environment:
- IOCSH_NAME=IOC2-1
hostname: ioc2-1
networks:
- net-1-recc-2
ioc2-2:
extends:
ioc2-1
depends_on:
recc2:
condition: service_healthy
restart: true
environment:
- IOCSH_NAME=IOC2-2
hostname: ioc2-2

networks:
net-1-recc-1:
driver: bridge
net-1-recc-2:
driver: bridge
34 changes: 34 additions & 0 deletions server/docker/test-remove-infotag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: test-removeinfotag
include:
- cf-compose.yml
services:
recc1:
extends:
file: ../compose.yml
service: recc
depends_on:
cf:
condition: service_healthy
restart: true
hostname: recc1
networks:
- net-1-recc-1
- net-2-cf
ioc1-1:
extends:
file: ../../client/ioc-compose.yml
service: ioc1
environment:
- IOCSH_NAME=IOC1-1
depends_on:
recc1:
condition: service_healthy
restart: true
hostname: ioc1-1
command: bash
networks:
- net-1-recc-1

networks:
net-1-recc-1:
driver: bridge
Loading
Loading