diff --git a/CDB/sdp-sim-config.json b/CDB/sdp-sim-config.json new file mode 100644 index 0000000000000000000000000000000000000000..8953c5a45e5a27d9134b1fbe9d6d77d187b3694a --- /dev/null +++ b/CDB/sdp-sim-config.json @@ -0,0 +1,23 @@ +{ + "servers": { + "SDP": { + "LTS": { + "SDP": { + "LTS/SDP/1": { + "properties": { + "OPC_Server_Name": [ + "sdptr-sim" + ], + "OPC_Server_Port": [ + "4840" + ], + "OPC_Time_Out": [ + "5.0" + ] + } + } + } + } + } + } +} diff --git a/docker-compose/sdptr-sim.yml b/docker-compose/sdptr-sim.yml new file mode 100644 index 0000000000000000000000000000000000000000..677433019a9e7031ed55fb7e1f94591457a6d74a --- /dev/null +++ b/docker-compose/sdptr-sim.yml @@ -0,0 +1,17 @@ +# +# Docker compose file that launches a SDP translator simulator +# +# Defines: +# - sdptr-sim +# +version: '2' + +services: + sdptr-sim: + build: + context: sdptr-sim + container_name: ${CONTAINER_NAME_PREFIX}sdptr-sim + network_mode: ${NETWORK_MODE} + ports: + - "4840:4840" + restart: on-failure diff --git a/docker-compose/sdptr-sim/Dockerfile b/docker-compose/sdptr-sim/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..4ced94162fec862268fb63f13c9fa11c19918a74 --- /dev/null +++ b/docker-compose/sdptr-sim/Dockerfile @@ -0,0 +1,26 @@ +FROM ubuntu:20.04 + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y autoconf automake git make g++ build-essential pkg-config cmake python liburcu-dev libmbedtls-dev libsubunit-dev libboost-dev libboost-regex-dev libboost-system-dev libboost-program-options-dev && \ + apt-get clean + +# Install OPC-UA lib +RUN git clone --depth 1 --branch 1.2 https://github.com/open62541/open62541 && \ + cd /open62541 && \ + git submodule update --init --recursive && \ + mkdir build && cd build && \ + bash -c "cmake .. -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUA_NAMESPACE_ZERO=FULL -DUA_MULTITHREADING=100 && make -j `nproc` install" + +# Update shared library cache +RUN ldconfig + +# Install SDPTR +RUN cd / && git clone --depth 1 --branch master https://git.astron.nl/lofar2.0/sdptr + +RUN cd /sdptr && \ + autoreconf -v -f -i && \ + ./configure && \ + bash -c "make -j `nproc` install" + +WORKDIR /sdptr/src +CMD ["sdptr", "--configfile=uniboard.conf", "--nodaemon"]