Epics@GSI Webhome

Docker Caen DT1470 Ioc Archiver Gui Setup

Introduction

DT1470.png

Issue of this project is to get a docker based EPICS system %br% with:
  • EPICS IOC connecting to an DT1470ET device
    • CAENs DT/N147x family can be connected via USB/ETH
  • Archiving the data with cs-studio archiver "beauty"
    • postgres-database
    • archive engine
  • Phoebus based GUI

Thanks to the groundwork of

... this was more or less finding out the right configuration and bits an peaces, no coding.

Status:
  • Implementation finished
  • To be tested May 2019, Jülich by C.Wendisch and J.Pietraszko.

Development:
  • reimplementing it with docker-compose

Setup and Operation

docker

resources

docker pull pklaus/beauty:db-latest
docker pull pklaus/beauty:app-latest
docker pull pklaus/epics_base:debian-stretch
docker pull pklaus/epics_synapps:debian-jessie
git clone https://git.gsi.de/EPICS/apps/caen_dt1470et.git && git checkout docker

create network


#create common network
docker network create beauty-net

environment

export LOCALPATH=<your local path> # , e.g ~/EPICS/apps/docker/pklaus

IOC

refers to local code compile with epics_synapps docker (not shown)
compile
docker run -i -t --name epics_synapps \ 
-v ${LOCALPATH}/epics_synapps/:/epics/iocs \ 
-w /epics/iocs/caenDT1470ET \ 
-u scs \ 
pklaus/epics_synapps:debian-jessie \ 
bash

# and enter
make distclean && make 

run
run as internal docker user scs

# run IOC
docker run --name caenDT1470 \ 
--restart always \ 
--network beauty-net \ 
--network-alias soft-ioc \ 
-d \ 
-it \ 
-e CAEN_DT_1470_IP=192.168.103.66  \ 
-p 1470:1470 \ 
-v ${LOCALPATH}/epics_synapps/:/epics/iocs \ 
-w /epics/iocs/caenDT1470ET/iocBoot/ioccaenDT1470 \ 
-u scs \ 
pklaus/epics_synapps:debian-jessie \ 
../../bin/linux-x86_64/caenDT1470 ./st.cmd

Archiver-Database

database
local host's folder for database data
# Create a folder on the host for the archiver database
mkdir ~/archiver_db

start database
docker run --name beauty-db \ 
--restart always \ 
--network beauty-net \ 
-d \ 
-e POSTGRES_USER=postgres \ 
-e POSTGRES_PASSWORD=R4R9V2PXBx \ 
-v ${LOCALPATH}/archiver_db:/var/lib/postgresql/data   \ 
-p 0.0.0.0:5432:5432 \ 
pklaus/beauty:db-latest

Archiver engine

configure

# if engine is not already defined
# base is https://git.gsi.de/EPICS/apps/caen_dt1470et.git docker branch
#  dcs_engine.xml is connected to  ${LOCALPATH}/epics_synapps/caenDT1470ET/archiver/configuration/DT1470.xml
#  pluginCustomization is connected to ${LOCALPATH}/epics_synapps/caenDT1470ET/archiver/configuration/pluginCustomization.ini

# Fire up an instance of the RDB archiver application to initialize the database:                                                                        
docker run --name beauty-app \ 
--network beauty-net \    
-v ${LOCALPATH}/epics_synapps/caenDT1470ET/archiver/configuration/pluginCustomization.ini:/archiver/pluginCustomization.ini \ 
-v ${LOCALPATH}/epics_synapps/caenDT1470ET/archiver/configuration/DT1470.xml:/archiver/dcs_engine.xml \ 
-e engine_name=ArchiveEngine \ 
-e engine_description=DT1470_Archiver \ 
-it \ 
pklaus/beauty:app-latest \ 
/bin/sh

# and enter
./config/ArchiveConfigTool \ 
-pluginCustomization ${pluginCustomization} \ 
-engine ${engine_name} \ 
-port ${engine_port} \ 
-config ${engine_configuration_file} \ 
-description ${engine_description} \ 
${engine_replace} \ 
${engine_steal_channels} \ 
-import

start

docker run --name beauty-app \ 
--network beauty-net \ 
-v ${LOCALPATH}/epics_synapps/caenDT1470ET/archiver/configuration/pluginCustomization.ini:/archiver/pluginCustomization.ini \ 
-v ${LOCALPATH}/epics_synapps/caenDT1470ET/archiver/configuration/DT1470.xml:/archiver/dcs_engine.xml \ 
-e engine_name=ArchiveEngine \ 
-e engine_description=DT1470_Archiver \ 
-d \ 
-p 0.0.0.0:4812:4812 \ 
--restart=always \ 
pklaus/beauty:app-latest

Phoebus (heir of CS-studio)

compile
wget https://github.com/pklaus/beauty_docker/archive/master.zip
unzip master.zip
cd beauty_docker_master
./build.sh 

run
#start
# change settings if neccessary before start
cd ~${LOCALPATH}/beauty_docker-master/phoebus && ./run.sh
# connects with ~/EPICS/docker/phoebus to /home/scs/


-- PeterZumbruch - 2019-06-06
-- PeterZumbruch - 2019-07-12
Topic revision: r3 - 2019-07-12, PeterZumbruch
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)