diff --git a/CHANGES.md b/CHANGES.md index f6c6b41..599823c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,7 +4,7 @@ ### New features -* base: add `ether_ip` IOC and module. by @guirodrigueslima in +* base: add OPCUA and `ether_ip` IOCs and modules. by @guirodrigueslima in https://github.com/cnpem/epics-in-docker/pull/57 ## v0.7.0 diff --git a/base/.env b/base/.env index 9908946..2220a35 100644 --- a/base/.env +++ b/base/.env @@ -23,3 +23,5 @@ LIBSSCPIMEGA_VERSION=fb8acf533a7c01b5266bf32d60d1a5f923e19523 MOTOR_VERSION=R7-3-1 PMAC_VERSION=2-6-1 + +OPCUA_VERSION=0.9.4 diff --git a/base/Dockerfile b/base/Dockerfile index f6a9a48..4a22930 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -17,6 +17,7 @@ RUN apt update -y && \ libtiff-dev \ libusb-1.0-0-dev \ libxml2-dev \ + libssl-dev \ re2c \ wget \ ca-certificates @@ -69,3 +70,9 @@ ARG PMAC_VERSION COPY install_motor.sh . RUN ./install_motor.sh + +ARG DEBIAN_VERSION +ARG OPCUA_VERSION + +COPY install_opcua.sh . +RUN ./install_opcua.sh diff --git a/base/docker-compose.yml b/base/docker-compose.yml index 22d20dc..a1a0d01 100644 --- a/base/docker-compose.yml +++ b/base/docker-compose.yml @@ -30,3 +30,4 @@ services: LIBSSCPIMEGA_VERSION: ${LIBSSCPIMEGA_VERSION} MOTOR_VERSION: ${MOTOR_VERSION} PMAC_VERSION: ${PMAC_VERSION} + OPCUA_VERSION: ${OPCUA_VERSION} diff --git a/base/install_opcua.sh b/base/install_opcua.sh new file mode 100755 index 0000000..e61890a --- /dev/null +++ b/base/install_opcua.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -ex + +. /opt/epics/install-functions.sh + +opcua_release_url=https://github.com/epics-modules/opcua/releases/download/v${OPCUA_VERSION} +opcua_release_file=IOC_opcua-${OPCUA_VERSION}_Base-${EPICS_BASE_VERSION}_debian${DEBIAN_VERSION%.*}.tar.gz +lnls-get-n-unpack -l $opcua_release_url/$opcua_release_file + +mv binaryOpcuaIoc opcua +install_module -i opcua OPCUA " +EPICS_BASE +" + +EPICS_HOST_ARCH=`perl ${EPICS_BASE_PATH}/lib/perl/EpicsHostArch.pl` +ln -s ${EPICS_MODULES_PATH}/opcua/{opcuaIocApp/libopcua.so.0.9,lib/${EPICS_HOST_ARCH}/libopcua.so}